owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.1k stars 237 forks source link

"mpc stats" results are somewhat random #356

Closed LordMyschkin closed 7 years ago

LordMyschkin commented 7 years ago

If tried to co-install mpd and forked-daapd (and failed runnig both at the same time on Debian Jessie AMD64). But I noticed that under mpd, "mpc stats" gives me complete different results from forked-daapd "mpc stats":

MPD: Artists: 5546 Albums: 3755 Songs: 41562

Play Time: 0 days, 0:00:00 Uptime: 0 days, 0:45:39 DB Updated: Sun Feb 26 14:47:55 2017 DB Play Time: 137 days, 0:02:11

Forked-daapd: Artists: 5092 Albums: 8083 Songs: 41580

Play Time: 0 days, 0:00:07 Uptime: 0 days, 0:00:04 DB Updated: Thu Jan 1 01:00:06 1970 DB Play Time: 42 days, 0:51:15

ejurgensen commented 7 years ago

Do you have any inclination about what is correct and what is wrong? The album count from forked-daapd seems high, unless you have a lot of singles.

LordMyschkin commented 7 years ago

My music collection is not very well organised, lots of classical music (which is a pain in the a* to tag) and lots of singles (or only one song from an album). I have no idea what either of these programs consider an "album". But the "DB updated" and the "DB Play Time" should be about the same. 42 days play time means about 1.5 mins per track - which is highly unlikely. So I consider MPD should be right there.

ejurgensen commented 7 years ago

Here an album is a unique combination of album artist + album. So that means that if you have one track with "W. Mozart"/"Die Zauberflöte" and another with "Wolfgang A. Mozart"/"Die Zauberflöte" then they would be considered as two albums. Perhaps mpd only considers the album name? That is obviously a disadvantageous method if separate artists happen to use the same album name.

I think you are right that the total playtime in forked-daapd is wrong. Song lengths are stored in milliseconds, and your 143 days equal something like 11836800000 ms which is too large a number for the data type that is used. @chme, perhaps you could look at that?