3.1 - Stats Report Based on Filters Modification Request
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: 3.1 - Stats Report Based on Filters Modification Request
I'm using NP - All Playcounts (No Xmas), it's still running but I am 8 minutes in.
EDIT: BTW, now that you mentioned it how do I sort the MN nodes??
EDIT: BTW, now that you mentioned it how do I sort the MN nodes??
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: 3.1 - Stats Report Based on Filters Modification Request
I am not sure that I understand. If you mean about their position, you could move one by one manually using the spinbox after the Move label in the Settings dialog box or Up and Down buttons in the Export/Import dialog box. You could also open the Export/Import dialog box and click on the header of the table, after that all masks/nodes would be alphabetically sorted, but this option could sort only all nodes from the .ini file, not some specific node or group of nodes.nynaevelan wrote:how do I sort the MN nodes??
● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
Re: 3.1 - Stats Report Based on Filters Modification Request
For us. Don't be so selfish!nynaevelan wrote:First let me say thank you for taking the time and creating it for me
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: 3.1 - Stats Report Based on Filters Modification Request
gege wrote:For us. Don't be so selfish!nynaevelan wrote:First let me say thank you for taking the time and creating it for me![]()
![]()
![]()
![]()
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: 3.1 - Stats Report Based on Filters Modification Request
Nyn, can you define "little slow", please?nynaevelan wrote:it's a little slow but I can live with that to get the filtered info.
For me, it took 20min, with 100% of CPU usage, until I gave up and killed MM process.
Looks like that query is too much for my 4 years old Athlon 2600+
Re: 3.1 - Stats Report Based on Filters Modification Request
OK, here is what you could try. Replace the line 643:
with the:
It would be much faster.
Code: Select all
strSQL = strSQL & " AND" & sMMFilter & ")) AND" & sMMFilterCode: Select all
strSQL = strSQL & ")) AND" & sMMFilter● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
-
Mizery_Made
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: 3.1 - Statistics Report Based on Filters
What would be valuable is an updated Statistics script. There's some issues with the one that's apparently been the same since 2005, such as the "Artists" section showing all people, including conductors, composers, etc. Also, some of the statistics seem odd, like the "Played" column for Albums will max out once they've all been played, but you can end up with something like "2928" & "4103" for Library & Played respectively for Artists, when everything has been played in your library.Ludek wrote:This should not be a problem for a script writer to customize the Stats.vbs script.
Question is whether this would be valuable to have it native (i.e. bundled with MM install package).
As for this version, with Filters support, it looks interesting. I've installed it now and might find some use for it in the near future, because it's a good idea.
Re: 3.1 - Stats Report Based on Filters Modification Request
Muuuuuuuuuuuch better! Thanks for fixing it for me...ZvezdanD wrote:It would be much faster.
Re: 3.1 - Statistics Report Based on Filters
I noticed also this issue with the Artist section which could be easily resolved, but I don't know what you mean with the Played column for Albums.Mizery_Made wrote:the "Artists" section showing all people, including conductors, composers, etc. Also, some of the statistics seem odd, like the "Played" column for Albums will max out once they've all been played, but you can end up with something like "2928" & "4103" for Library & Played respectively for Artists, when everything has been played in your library.
● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: 3.1 - Stats Report Based on Filters Modification Request
Z:ZvezdanD wrote:OK, here is what you could try. Replace the line 643:with the:Code: Select all
strSQL = strSQL & " AND" & sMMFilter & ")) AND" & sMMFilterIt would be much faster.Code: Select all
strSQL = strSQL & ")) AND" & sMMFilter
This increased the speed tremendously, now it is just as quick or quicker with some filters.
There were a couple of filters that did not complete quickly but they never finish quickly even when I use them in nodes, they are the songs in playlist/songs not in playlist filters. If you release this publicly you might want to warn users that if they have filters that normally take a significant amount of time to complete, expect the same thing with the statistics report.
THANK YOU FOR THIS SCRIPT AND FOR YOUR QUICK RESPONSE TO MY/GEGE'S REQUEST.
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: 3.1 - Stats Report Based on Filters Modification Request
Yeah, I noticed this as well and tried to see if I could do something about it, but now I need to go to sleep, here is 2:40 AM in my time zonenynaevelan wrote:There were a couple of filters that did not complete quickly but they never finish quickly even when I use them in nodes, they are the songs in playlist/songs not in playlist filters.
I will try to implement all your suggestions.
● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
-
Mizery_Made
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: 3.1 - Statistics Report Based on Filters
ZvezdanD wrote:but I don't know what you mean with the Played column for Albums.
Code: Select all
Totals
Type Library Played
Artists 2928 4103
Albums 812 812
Genres 7 7
Years 26 26
Playlists 8 8
-
Mizery_Made
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: 3.1 - Stats Report Based on Filters Modification Request
I got a little bored and did some digging around.
There's the code snippet from the original file. Looking at the SQL that finds the number of Artists in the library, it bases it off of the Artists.Tracks column, which a Person only has a number <> 0 in this column if they are an Artist for a track and not just a conductor or composer, etc (since they have their own columns). Thus, while it's only counting artists, the other that pulls the played one is pulling any person that has an entry in the Played table, regardless if they're a Artist, Conductor, etc. Toying with it, I got this to work as expected:
As you can see, I've added a "PersonType" clause to the Played SQL, which only accounts for people that are Artists (or I believe, Album Artists), which gives me a number that matches the one from the Library query. It seems the "Top Artists" problem can be fixed with a "PersonType" clause too:
Original:
Edit:
Again, this returns expected results for me, the "Top # Artists" section now only lists Artists, so I no longer have a Top 10 where half of the entries are producers who rarely if ever appear in the Artist field. I went ahead and set up a Top 10 for my producers too, since I have them stored in the Conductor field (yeah, I know... odd place, but it works for me), with a "PersonType=4" in place of "PersonType=1", woo, go me! 
That's really only the beginning of the problems, I think, because in running the script over and over, I began to look closer at other numbers. Some of their purposes make no sense to me at all, or aren't acting as they should be expected to. Take for instance the "Top # Genre" columns. The regular "Top # Genre" and "Top # Genre played" entries are exactly the same. With 33,534 entries in my Played table and a tendency to play my Rap files more than my others, I know Rap should show more than being played 10,003 times when, you guessed it, I have 10,003 Rap files in my Genre, all of which have been played once, and some of which have been played upwards of 30 or 40 times. This Played entry doesn't act like the Artist played entry, which isn't really expected. My Top Artist only has 722 tracks in the library, but in the played entry, shows 3,709 plays, which if it acted like the Genre entry (which I don't think it should), it would only be showing 722 plays.
Another thing I find odd is the Averages section. Since I've played each track in my library once, the Average & Average Played columns show identical information, the only thing different is the "Played Per Day" entry for obvious reasons. Not really sure what this section was going for, but I would expect Played Averages to fluctuate with what I listen to, not to become static once I've played everything once, because then it's no longer relevant information because I could then just look at the Library entry. If my Year average is 1996, I would expect that if I play everything once, then the played Year Average would be 1996, but if I go playing a lot of 2008 files, then I would expect my continued listening to have some kind of impact, such as the average sliding more-so toward what I listen to most (since the older files would have one play each, while the newer ones would have more plays and thus would be closer to the average that I listen to)
After all, if I play two files, one from 1990 and one from 2008 each one time, the average would be 1999. If I then play that second file again, then the average of what I have played would actually be 2002, no? Not still 1999. It's late, so if my math is way off... oops.
Though, it's late, and I've been staring at VBScript coding for a while now (something I barely understand, and that would be stretching it), so maybe my mind has went off into loopy-land and I'm making no sense as everything is viewed as working perfectly fine to the rest of you. *shrugs*
PS -- Rating is the exact same way as Genre down in the Top # sections.
EDIT: I told you it was late, right? Cause I just realized that I had been messing with the Stats script that comes with Monkey, not your modified version. Haha. Though, I doubt you changed much in regards to what I pointed out, since your script when unfiltered presents the same results as the MM Bundled Version.
Code: Select all
'Totals
strSQL = "SELECT Count(*) AS Nombre FROM Artists WHERE ID <> 0 AND Tracks>0" ' Track artists only
Set qryStats = SDB.Database.OpenSQL(strSQL)
intArtistsCount = CLng(NoNull(qryStats.ValueByName("Nombre"),0))
' process background threads
SDB.ProcessMessages
strSQL = "SELECT Count(Distinct Artists.ID) AS CountOfID FROM Artists WHERE Artists.ID IN ( SELECT ArtistsSongs.IDArtist FROM ArtistsSongs WHERE ArtistsSongs.IDSong IN ( SELECT Played.IDSong FROM Played))"
Set qryStats = SDB.Database.OpenSQL(strSQL)
intArtistsCountPlayed = CLng(NoNull(qryStats.ValueByName("CountOfID"),0))Code: Select all
'Totals
strSQL = "SELECT Count(*) AS Nombre FROM Artists WHERE ID <> 0 AND Tracks>0" ' Track artists only
Set qryStats = SDB.Database.OpenSQL(strSQL)
intArtistsCount = CLng(NoNull(qryStats.ValueByName("Nombre"),0))
' process background threads
SDB.ProcessMessages
strSQL = "SELECT Count(Distinct Artists.ID) AS CountOfID FROM Artists WHERE Artists.ID IN ( SELECT ArtistsSongs.IDArtist FROM ArtistsSongs WHERE ArtistsSongs.IDSong IN ( SELECT Played.IDSong FROM Played) AND PersonType=1)"
Set qryStats = SDB.Database.OpenSQL(strSQL)
intArtistsCountPlayed = CLng(NoNull(qryStats.ValueByName("CountOfID"),0))Original:
Code: Select all
strSQL = "SELECT Sum(PlayCounter) AS CountOfID, Sum(SongLength) AS TotalLength, Sum(FileLength) AS TotalFileLength, Artists.Artist "
strSQL = strSQL & "FROM ArtistsSongs, Songs, Artists "
strSQL = strSQL & "WHERE Songs.ID = ArtistsSongs.IDSong AND Songs.ID IN (SELECT Played.IDSong FROM Played) AND ArtistsSongs.IDArtist = Artists.ID "
strSQL = strSQL & "GROUP BY ArtistsSongs.IDArtist "
strSQL = strSQL & "ORDER BY Sum(PlayCounter) DESC LIMIT " & intTopCount & ""
Set qryStats = SDB.Database.OpenSQL(strSQL)
While Not qryStats.EOF
Code: Select all
strSQL = "SELECT Sum(PlayCounter) AS CountOfID, Sum(SongLength) AS TotalLength, Sum(FileLength) AS TotalFileLength, Artists.Artist "
strSQL = strSQL & "FROM ArtistsSongs, Songs, Artists "
strSQL = strSQL & "WHERE Songs.ID = ArtistsSongs.IDSong AND Songs.ID IN (SELECT Played.IDSong FROM Played) AND ArtistsSongs.IDArtist = Artists.ID AND ArtistsSongs.PersonType=1 "
strSQL = strSQL & "GROUP BY ArtistsSongs.IDArtist "
strSQL = strSQL & "ORDER BY Sum(PlayCounter) DESC LIMIT " & intTopCount & ""
Set qryStats = SDB.Database.OpenSQL(strSQL)
While Not qryStats.EOF
That's really only the beginning of the problems, I think, because in running the script over and over, I began to look closer at other numbers. Some of their purposes make no sense to me at all, or aren't acting as they should be expected to. Take for instance the "Top # Genre" columns. The regular "Top # Genre" and "Top # Genre played" entries are exactly the same. With 33,534 entries in my Played table and a tendency to play my Rap files more than my others, I know Rap should show more than being played 10,003 times when, you guessed it, I have 10,003 Rap files in my Genre, all of which have been played once, and some of which have been played upwards of 30 or 40 times. This Played entry doesn't act like the Artist played entry, which isn't really expected. My Top Artist only has 722 tracks in the library, but in the played entry, shows 3,709 plays, which if it acted like the Genre entry (which I don't think it should), it would only be showing 722 plays.
Another thing I find odd is the Averages section. Since I've played each track in my library once, the Average & Average Played columns show identical information, the only thing different is the "Played Per Day" entry for obvious reasons. Not really sure what this section was going for, but I would expect Played Averages to fluctuate with what I listen to, not to become static once I've played everything once, because then it's no longer relevant information because I could then just look at the Library entry. If my Year average is 1996, I would expect that if I play everything once, then the played Year Average would be 1996, but if I go playing a lot of 2008 files, then I would expect my continued listening to have some kind of impact, such as the average sliding more-so toward what I listen to most (since the older files would have one play each, while the newer ones would have more plays and thus would be closer to the average that I listen to)
After all, if I play two files, one from 1990 and one from 2008 each one time, the average would be 1999. If I then play that second file again, then the average of what I have played would actually be 2002, no? Not still 1999. It's late, so if my math is way off... oops.
Though, it's late, and I've been staring at VBScript coding for a while now (something I barely understand, and that would be stretching it), so maybe my mind has went off into loopy-land and I'm making no sense as everything is viewed as working perfectly fine to the rest of you. *shrugs*
PS -- Rating is the exact same way as Genre down in the Top # sections.
EDIT: I told you it was late, right? Cause I just realized that I had been messing with the Stats script that comes with Monkey, not your modified version. Haha. Though, I doubt you changed much in regards to what I pointed out, since your script when unfiltered presents the same results as the MM Bundled Version.
Re: 3.1 - Stats Report Based on Filters Modification Request
You seem to be right.
In M 3.0 we have optimized performance of the queries in the stats.vbs, see:
http://www.ventismedia.com/mantis/view.php?id=4431
But as you indicated we should also try to improve the script somehow or at least fix the issue with PersonType which really looks like bug now.
So I have opened another issue:
http://www.ventismedia.com/mantis/view.php?id=5489
for this purpose.
I believe that some of the points should be fixed before releasing MM 3.1 (e.g. items 2 & 3)
In M 3.0 we have optimized performance of the queries in the stats.vbs, see:
http://www.ventismedia.com/mantis/view.php?id=4431
But as you indicated we should also try to improve the script somehow or at least fix the issue with PersonType which really looks like bug now.
So I have opened another issue:
http://www.ventismedia.com/mantis/view.php?id=5489
for this purpose.
I believe that some of the points should be fixed before releasing MM 3.1 (e.g. items 2 & 3)
-
Mizery_Made
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: 3.1 - Stats Report Based on Filters Modification Request
Indeed you're right about it actually being updated since the time frame I gave, as now that you mention it, I seem to also recall a Bug Entry or Post on here discussing an improved Time or Size formula. So yeah, I admit to speaking wrongly about that, but the notation in the script was freshest in my mind, which only indicates it's coding between December 2004 & January 2005 and not any updates.
I think #2 is definitely a must to fix asap, because while it's fixable by experienced scripters (or people who like to toy around with things like me), the average user probably wouldn't have a clue on where to start. They're sure to scratch there head though if they look in the "Artists" section to see composers, conductors, etc since each of these are entered into separate fields in the properties. Again, that plays into the average user thing, because not everyone opens up the database and is thus aware that all of these fields are stored into one table.
Wow, it was late four hours ago... *goes away*... *for real this time*
I think #2 is definitely a must to fix asap, because while it's fixable by experienced scripters (or people who like to toy around with things like me), the average user probably wouldn't have a clue on where to start. They're sure to scratch there head though if they look in the "Artists" section to see composers, conductors, etc since each of these are entered into separate fields in the properties. Again, that plays into the average user thing, because not everyone opens up the database and is thus aware that all of these fields are stored into one table.
Wow, it was late four hours ago... *goes away*... *for real this time*