SongPrint: use DetachedSong::GetDuration()
Fixes the bogus duration of the last track in a CUE sheet.
This commit is contained in:
parent
11a9536271
commit
071d05465a
1
NEWS
1
NEWS
|
@ -17,6 +17,7 @@ ver 0.19 (not yet released)
|
||||||
- nfs: new plugin
|
- nfs: new plugin
|
||||||
- smbclient: new plugin
|
- smbclient: new plugin
|
||||||
* playlist
|
* playlist
|
||||||
|
- cue: fix bogus duration of the last track
|
||||||
- soundcloud: use https instead of http
|
- soundcloud: use https instead of http
|
||||||
- soundcloud: add default API key
|
- soundcloud: add default API key
|
||||||
* archive
|
* archive
|
||||||
|
|
|
@ -114,5 +114,9 @@ song_print_info(Client &client, const DetachedSong &song, bool base)
|
||||||
if (song.GetLastModified() > 0)
|
if (song.GetLastModified() > 0)
|
||||||
time_print(client, "Last-Modified", song.GetLastModified());
|
time_print(client, "Last-Modified", song.GetLastModified());
|
||||||
|
|
||||||
tag_print(client, song.GetTag());
|
tag_print_values(client, song.GetTag());
|
||||||
|
|
||||||
|
double duration = song.GetDuration();
|
||||||
|
if (duration >= 0)
|
||||||
|
client_printf(client, "Time: %u\n", unsigned(duration + 0.5));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue