Page 1 of 3

3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 5:39 am
by nynaevelan
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

Re: 3.1 - Statistics Report Based on Filters

Posted: Wed Apr 08, 2009 6:17 am
by Ludek
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).

Re: 3.1 - Statistics Report Based on Filters

Posted: Wed Apr 08, 2009 7:22 am
by nynaevelan
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

Re: 3.1 - Statistics Report Based on Filters

Posted: Wed Apr 08, 2009 8:56 am
by gege
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.

Re: 3.1 - Statistics Report Based on Filters

Posted: Wed Apr 08, 2009 9:52 am
by nynaevelan
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

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 12:56 pm
by ZvezdanD

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 1:20 pm
by nynaevelan
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.

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 1:22 pm
by gege
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"

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 1:33 pm
by nynaevelan
Gege:

Are you seeing any differences between the two??

Nyn

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 1:42 pm
by gege
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.

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 2:22 pm
by ZvezdanD
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.

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 4:58 pm
by nynaevelan
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

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 5:13 pm
by ZvezdanD
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 ;)

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 5:33 pm
by nynaevelan
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

Re: 3.1 - Stats Report Based on Filters Modification Request

Posted: Wed Apr 08, 2009 5:39 pm
by ZvezdanD
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.