From e01503229281b434f945a845ace0eb39a720e693 Mon Sep 17 00:00:00 2001 From: chme Date: Mon, 21 May 2018 07:12:46 +0200 Subject: [PATCH] [mpd] Add duration attribute with millisecond precision --- src/mpd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mpd.c b/src/mpd.c index 0cc77757..e9b65188 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -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,