[SlimDevices: Plugins] TrackStat SQL Question
I was trying to find out how many of my tracks I have rated, so I ran: - Begin Query 1 - SELECT COUNT(*), rating FROM slimserver.track_statistics GROUP BY rating COUNT(*) rating 12259 NULL 1420 981 40 7300 60 28714 80 1613 100 - End Query 1 - I thought that was a little curious as the total is 50,881, whereas Slim Server reports 16281 songs. So I did a little more digging. - Begin Query 2 - SELECT DISTINCT url, COUNT(url) as count FROM track_statistics GROUP BY url ORDER BY COUNT(url) DESC This reports: #URLs Count 4 5761 2 2401 2 241 2 190 22 122 24 121 2 54 ~1003 ~20 2 - End Query 2 - I looked at one of the duplicates and all the data seems to be the same. Is there a reason duplicates are allowed in the URL column? Seems to me that should be a primary key or made unique through the combo of url and musicbrainz_id. Am I totally out in left field here? This is with TrackStat 1.39 and Slim Server 6.5.5 on Debian unstable. I first installed TrackStat over a year ago (version forgotten) and have updated as new releases come out. At one point I wiped the database and re-imported from the xml backup. The XML shows a slightly worse story: egrep '' trackstat_scheduled_backup_20071104.xml | sort | uniq -c | sort -n - Begin egrep output - [ snip a bunch of others ] 243 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Fmisc%2Fsoundtrack [snip ] 243 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FClub%2FS [snip ] 272 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FClub%2FS [snip ] 299 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Fmisc%2FTop%252010 [snip ] 379 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Fmp3%2Fbestof%2FGr [snip ] 399 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Fmisc%2FTop%252010 [snip ] 4067 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FMixes%2F [snip ] 5106 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FMixes%2F [snip ] 9914 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FMixes%2F [snip ] 15731 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FMixes%2F [snip ] 20081 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FMixes%2F [snip ] 24768 file%3A%2F%2F%2Fdata%2Faudio%2Fmusic%2Ftrance%2FMixes%2F [snip ] - End egrep output - I cut a bunch, but you get the idea, lots of repeats of the same url. -- "You can't kill electrons, the worst thing you can do is send them on long trips in which they are not interested." ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/plugins
[SlimDevices: Plugins] TrackStat feature request
Quoting erland <[EMAIL PROTECTED]> on Thu, Oct 05 09:04: > > The conversion between the old and new scale would be: > 0 -> 0 > 1 -> 20 > 2 -> 40 > 3 -> 60 > 4 -> 80 > 5 -> 100 While you are looking at this I have a feature request. It would be nice to use the granularity between the numbers (0, 20, 40, etc) to automatically raise or lower the rating based on how long the song is allowed to play. For example, if I skip the song in the first half, remove 1 from the number. If I let it play all the way through add 1 to the number. Thus songs I listen to a lot would eventually gain in ratings, and songs I skip all the time would lower in ratings. This would probably work best if the stars became a range: 0 -> 0 - 9 1 -> 10 - 29 2 -> 30 - 49 3 -> 50 - 69 4 -> 70 - 89 5 -> 90 - 100 When you manually assign a rating put it in the middle of the range. Press and hold 4 -> rating set to 80, press and hold 1 -> rating ste to 20. Omen -- That's user, u s r, and then there's a space ... ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/plugins