[mpd] Add duration attribute with millisecond precision

This commit is contained in:
chme 2018-05-21 07:12:46 +02:00 committed by ejurgensen
parent 5bd94df4a6
commit e015032292
1 changed files with 2 additions and 0 deletions

View File

@ -557,6 +557,7 @@ mpd_add_db_media_file_info(struct evbuffer *evbuf, struct db_media_file_info *db
"file: %s\n"
"Last-Modified: %s\n"
"Time: %d\n"
"duration: %.3f\n"
"Artist: %s\n"
"AlbumArtist: %s\n"
"ArtistSort: %s\n"
@ -570,6 +571,7 @@ mpd_add_db_media_file_info(struct evbuffer *evbuf, struct db_media_file_info *db
(dbmfi->virtual_path + 1),
modified,
(songlength / 1000),
((float) songlength / 1000),
dbmfi->artist,
dbmfi->album_artist,
dbmfi->artist_sort,