|
a/src/mpdcli.cxx |
|
b/src/mpdcli.cxx |
|
... |
|
... |
443 |
cp = mpd_song_get_tag(song, MPD_TAG_TRACK, 0);
|
443 |
cp = mpd_song_get_tag(song, MPD_TAG_TRACK, 0);
|
444 |
if (cp != 0)
|
444 |
if (cp != 0)
|
445 |
upsong.tracknum = cp;
|
445 |
upsong.tracknum = cp;
|
446 |
else
|
446 |
else
|
447 |
upsong.tracknum.clear();
|
447 |
upsong.tracknum.clear();
|
|
|
448 |
// MPD may return something like xx/yy
|
|
|
449 |
string::size_type spos = upsong.tracknum.find("/");
|
|
|
450 |
if (spos != string::npos) {
|
|
|
451 |
upsong.tracknum = upsong.tracknum.substr(0, spos);
|
|
|
452 |
}
|
448 |
cp = mpd_song_get_tag(song, MPD_TAG_GENRE, 0);
|
453 |
cp = mpd_song_get_tag(song, MPD_TAG_GENRE, 0);
|
449 |
if (cp != 0)
|
454 |
if (cp != 0)
|
450 |
upsong.genre = cp;
|
455 |
upsong.genre = cp;
|
451 |
else
|
456 |
else
|
452 |
upsong.genre.clear();
|
457 |
upsong.genre.clear();
|