Switch to unified view

a/src/upmpdutils.hxx b/src/upmpdutils.hxx
...
...
28
28
29
// This was originally purely a translation of data from mpd. Extended
29
// This was originally purely a translation of data from mpd. Extended
30
// to general purpose track/container descriptor
30
// to general purpose track/container descriptor
31
class UpSong {
31
class UpSong {
32
public:
32
public:
33
    UpSong()
33
    UpSong() {
34
  : duration_secs(0), bitrate(0), samplefreq(0), mpdid(0),
35
    iscontainer(false), searchable(false) {
36
    }
34
    }
37
    void clear() {
35
    void clear() {
38
    *this = UpSong();
36
    *this = UpSong();
39
    }
37
    }
40
    std::string id;
38
    std::string id;
...
...
46
    std::string title;
44
    std::string title;
47
    std::string tracknum; // Reused as annot for containers
45
    std::string tracknum; // Reused as annot for containers
48
    std::string genre;
46
    std::string genre;
49
    std::string artUri;
47
    std::string artUri;
50
    std::string upnpClass;
48
    std::string upnpClass;
51
    std::string mime;
49
    std::string mime{"audio/mpeg"};
52
    
50
    
53
    unsigned int duration_secs;
51
    int duration_secs{0};
54
    unsigned int bitrate;
52
    int64_t size{0};
55
    unsigned int samplefreq;
53
    int bitrate{192000};
54
    int samplefreq{44100};
55
    int channels{2};
56
    
56
    
57
    int mpdid;
57
    int mpdid{0};
58
    bool iscontainer;
58
    bool iscontainer{false};
59
    bool searchable;
59
    bool searchable{false};
60
60
61
    std::string dump() {
61
    std::string dump() {
62
        return std::string("class [" + upnpClass + "] Artist [" + artist +
62
        return std::string("class [" + upnpClass + "] Artist [" + artist +
63
                           "] Album [" +  album + " Title [" + title +
63
                           "] Album [" +  album + " Title [" + title +
64
                           "] Tno [" + tracknum + "] Uri [" + uri + "]");
64
                           "] Tno [" + tracknum + "] Uri [" + uri + "]");