I'm not sure if this is the right place, but I wanted to share a config that finally gave me good results for best albums and artists sorting, thanks to ZvezdanD.
I used the RegExp Find and Replace script for "Custom 4" field with this :
Code: Select all
SQLQuery("SELECT Sum(max(Rating-50,0) * SongLength) *100 / Sum(SongLength) / count(rating) FROM Songs WHERE IDAlbum = " & oSongData.Album.ID & " GROUP BY IDAlbum HAVING Count(Rating) >= 5")
This rates albums with tracks rating, considering length itself and length over the total album length. The trick is to consider that what makes a good album are specially good tracks, and the "density" of those good tracks, and finally to store an average track score instead of an album score. It doesn't, for me, make a real difference if a track is just not to good or really bad. So a good album with one average track is about the same as if it was a very bad one. So, I only considered the ratio of 3 stars and more tracks (can be changed adjustingthe -50) and all tracks below are counted to 0.
The *100 is to get some precision (also increase impact of good tracks over average one), value could be adjusted but works just fine for me with about 1500 albums.
Then I used magic nodes with, for albums :
Code: Select all
Top Albums|child of:album\<album|Sort by:sum(Custom 4)|sort order:desc|all:no|min tracks:5|top:100>
And for artists :
Code: Select all
Top artists|child of:artist\<artist|Sort by:sum(Custom 4)|sort order:desc|all:no|min tracks:10|top:50>
To be noticed : the calculation is not a scale, there is no maximum to a score. For example, the more a band has good tracks, the higher the score is. Also, this works with partially rated albums.
This sorting finally gave me the result I was expecting, or better, feeling what was really my top albums and artists. Hope it can please some of you.
EDIT: in RegExp, use this "cooking" formula for better results, especially to deal with very short or long tracks/albums.
Code: Select all
round(iif(oSongData.rating-41>0,((oSongData.rating-41)/3)^2,0)*iif(oSongData.songlength>45000,oSongData.songLength-45000,0)/1000000*iif(-0.2*log(oSongData.songlength/1000)+2>1,1,-0.2*log(oSongData.songlength/1000)+2),0)