3.1 - Stats Report Based on Filters Modification Request

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

3.1 - Stats Report Based on Filters Modification Request

Post by nynaevelan » Wed Apr 08, 2009 5:39 am

Hi:

This is not a bug or a problem but I would like to know if it would be too difficult to have the Statistics report extract data based on the active filter? This would be especially useful if you are using the filters to filter out your library in order to have "separate" libraries. Expecially for those that are using MM with different users who have different music. It seems all the features of MM are using the active filter but this report is not. Can this be done?

Nyn
Last edited by nynaevelan on Wed Apr 08, 2009 9:53 am, edited 1 time in total.
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

Ludek
Posts: 3376
Joined: Fri Mar 09, 2007 9:00 am

Re: 3.1 - Statistics Report Based on Filters

Post by Ludek » Wed Apr 08, 2009 6:17 am

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).

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: 3.1 - Statistics Report Based on Filters

Post by nynaevelan » Wed Apr 08, 2009 7:22 am

I think it will be, especially whenever the topic of Multiple Librarires as discussed here comes up the first thing someone says is "you can use filters". Well one of the downfalls of filters is the fact that if you are interested in the stats of your library you truly cannot get that because it is based on the entire library not your portion of it. Which makes users, myself included, want to just have separate libraries. To have true functionality for separate libraries via filters, then all portions of MM should support the filtering. OK, rant over. :wink: Should I request this in the Scripting forum??

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

gege
Posts: 862
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: 3.1 - Statistics Report Based on Filters

Post by gege » Wed Apr 08, 2009 8:56 am

Ludek wrote:Question is whether this would be valuable to have it native (i.e. bundled with MM install package).
For me it would. In my case, I have two main filters: General Music and Quarantined Music.
When I go to stats, I generally want to see statistics for General Music only, not for Quarantined.

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: 3.1 - Statistics Report Based on Filters

Post by nynaevelan » Wed Apr 08, 2009 9:52 am

I would like to know if a scripter is willing to take on this project? I would like to be able to have the statistics report display the stats based on the active filter. Anyone interested?

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

ZvezdanD
Posts: 3106
Joined: Thu Jun 08, 2006 7:40 pm

Re: 3.1 - Stats Report Based on Filters Modification Request

Post by ZvezdanD » Wed Apr 08, 2009 12:56 pm

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

Post by nynaevelan » Wed Apr 08, 2009 1:20 pm

Zvezdand:

Thanks for taking on this project. I downloaded and replaced the stats.vbs file in the \Auto\ folder but it does not seem to be doing anything different. No matter which filter I select as the active filter I get the same results. Should I be doing something else? And yes I restarted MM.
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

gege
Posts: 862
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: 3.1 - Stats Report Based on Filters Modification Request

Post by gege » Wed Apr 08, 2009 1:22 pm

Wow! That was fast. Thanks!

A new entry in scripst.ini and now I have BOTH versions:

Code: Select all

[StatisticsFiltered]
FileName=StatsFiltered.vbs
ProcName=ShowStats
Order=2
DisplayName=Statistics (with &Filter)
Description=Library Statistics Report for the current filter only
Language=VBScript
ScriptType=1
Obviously, I saved vbs file as "StatsFiltered.vbs"

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

Post by nynaevelan » Wed Apr 08, 2009 1:33 pm

Gege:

Are you seeing any differences between the two??

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

gege
Posts: 862
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: 3.1 - Stats Report Based on Filters Modification Request

Post by gege » Wed Apr 08, 2009 1:42 pm

nynaevelan wrote:Are you seeing any differences between the two??
I'm at work now and here I don't have filters. I'll test the script properly when I get home.

ZvezdanD
Posts: 3106
Joined: Thu Jun 08, 2006 7:40 pm

Re: 3.1 - Stats Report Based on Filters Modification Request

Post by ZvezdanD » Wed Apr 08, 2009 2:22 pm

Sorry. There is a new revision on the same link as before. BTW, there is a dropdown list from which you could choose filter, the first empty item is for non-filtered library. BTW2, even the standard version have 3 filters.
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

Post by nynaevelan » Wed Apr 08, 2009 4:58 pm

The revision works. First let me say thank you for taking the time and creating it for me, it's a little slow but I can live with that to get the filtered info. One minor request though, can you have it sort the filters according to the Filters.Pos field instead of Filters.ID?

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

ZvezdanD
Posts: 3106
Joined: Thu Jun 08, 2006 7:40 pm

Re: 3.1 - Stats Report Based on Filters Modification Request

Post by ZvezdanD » Wed Apr 08, 2009 5:13 pm

Instead of the line 92:

Code: Select all

     Set oIter = SDB.Database.OpenSQL("SELECT Name FROM Filters")
you should write:

Code: Select all

    Set oIter = SDB.Database.OpenSQL("SELECT Name FROM Filters ORDER BY Pos")
I am wondering how you didn't ask same thing for Magic Nodes before, since it has same dropdown list ;)
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

Post by nynaevelan » Wed Apr 08, 2009 5:33 pm

ZvezdanD wrote:Instead of the line 92:

Code: Select all

     Set oIter = SDB.Database.OpenSQL("SELECT Name FROM Filters")
you should write:

Code: Select all

    Set oIter = SDB.Database.OpenSQL("SELECT Name FROM Filters ORDER BY Pos")
I am wondering how you didn't ask same thing for Magic Nodes before, since it has same dropdown list ;)
That worked perfectly. As for MN, I never asked because I have not changed my nodes since their creation so I do not go into the menu often.

Is there anything you can do to add some speed to the queries?

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

ZvezdanD
Posts: 3106
Joined: Thu Jun 08, 2006 7:40 pm

Re: 3.1 - Stats Report Based on Filters Modification Request

Post by ZvezdanD » Wed Apr 08, 2009 5:39 pm

nynaevelan wrote:Is there anything you can do to add some speed to the queries?
I will try. Which filter are you using? You know, I still have your database and could get same results.
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

Post Reply