Magic Nodes 4.2 w/ 380 masks & real GUI (2011-07-01)[MM2+]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

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

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-14) [MM2+3]

Post by ZvezdanD »

nynaevelan wrote:Any idea why this:

Code: Select all

<Group|Name:Statistics>\December 2008|Filter:<Date last played> Like '%-12-%'\<Genre>
will not work as this?

Code: Select all

<Group|Name:Statistics>\December 2008|Filter:<Date last played> Like '2008-%-%'\<Genre>
Actually, I think that first SQL query works as it should, but second doesn't. I am not sure if MS Jet/Access supports similar expressions with multiple joker symbols inside of the string. Maybe this is something specific only with the SQLite. But, instead of Like '2008-%-%' you could write just Like '2008-%'.

MM is really missing RegExp function with SQL queries, with it all of this could be possible and many more. You know, they are added Sin function to SQL, but not RegExp - I am just wondering who really wants such function as Sin with multimedia database. And if they implemented Sin, why they didn't implemented also Cos, Tan, Ln, Log, ... ;)

Anyway, if you want to extract some part of date value, you could try it with SQLite date functions, instead of Like operator (http://www.sqlite.org/lang_datefunc.html). For example strftime('%m', <field_name>) would return a month. and strftime('%Y', <field_name>) would return a year part of date field. So, if you want to get all tracks played in 2008, you could write:

Code: Select all

<Group|Name:Statistics>\Played in 2008|Filter:strftime('%Y', <Date last played>) = '2008'\<Genre>
However, in this case the next filter gives shorter and maybe even faster SQL query:

Code: Select all

<Group|Name:Statistics>\Played in 2008|Filter:strftime('%Y', Songs.LastTimePlayed) = '2008'\<Genre>
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: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-14) [MM2+3]

Post by nynaevelan »

ZvezdanD wrote: Actually, I think that first SQL query works as it should, but second doesn't. I am not sure if MS Jet/Access supports similar expressions with multiple joker symbols inside of the string. Maybe this is something specific only with the SQLite. But, instead of Like '2008-%-%' you could write just Like '2008-%'.

MM is really missing RegExp function with SQL queries, with it all of this could be possible and many more. You know, they are added Sin function to SQL, but not RegExp - I am just wondering who really wants such function as Sin with multimedia database. And if they implemented Sin, why they didn't implemented also Cos, Tan, Ln, Log, ... ;)

Anyway, if you want to extract some part of date value, you could try it with SQLite date functions, instead of Like operator (http://www.sqlite.org/lang_datefunc.html). For example strftime('%m', <field_name>) would return a month. and strftime('%Y', <field_name>) would return a year part of date field. So, if you want to get all tracks played in 2008, you could write:

Code: Select all

<Group|Name:Statistics>\Played in 2008|Filter:strftime('%Y', <Date last played>) = '2008'\<Genre>
Thank you AGAIN, this one worked perfectly. :D :D

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
Vanechka

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-14) [MM2+3]

Post by Vanechka »

First of all, I deeply appreciate Magic Nodes, it's integral to my enjoyment of MediaMonkey.

Unfortunately, while the new features are aswesome, the script seems to have become slower by a multitude, the old versions of Magic Nodes at most took a second or so to expand the nodes I use, while the latest version use anywhere from 3-6 seconds. The only changed variable is the version of Magic Nodes. This nodes in question are:

Singles|child of:Artist|filter:<kramme>=1\<artist>

Albums|child of:Artist|filter:<kramme>=2\<album artist>\<album|sort by:min(year)|sort order:desc>

"kramme" is simply custom 1 renamed. I've tried using other filters such as location and MM filters but nothing seems to reduce the time needed. I feebly suspect that it is because the sub-nodes aren't cached in the new version, but this is just an unqualified guess. If so, is there anyway to turn on caching (haven't found such an option yet)? Or does anyone have any alternative suggestions?

Thank you,

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

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by ZvezdanD »

Yeah, the newly introduced progress bar slowed down generating of nodes, especially if there are many of them. There is a new revision of the script (2.0.2) with fixed this (I hope so). Thanks for the report.
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
Vanechka

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by Vanechka »

It's far more responsive now, thank you :)
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by Big_Berny »

Hey ZevzdanD,
you you tell us what was the reason for the slowdown? Maybe also other scripts with progressbars could be improved regarding speed...

Thanks! :)
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by nohitter151 »

Big_Berny wrote:Hey ZevzdanD,
you you tell us what was the reason for the slowdown? Maybe also other scripts with progressbars could be improved regarding speed...

Thanks! :)
Maybe this has something to do with it? - http://www.mediamonkey.com/forum/viewto ... 14#p180214
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by ZvezdanD »

Yeah, that was my conclusion - Increase method of the progress bar should be avoided. Here is first example:

Code: Select all

            oProgress.Increase
            If (oProgress.Value Mod 20) = 0 Then
                oProgress.Value = 0
                If oProgress.Terminate Then
                    Exit Do
                End If
                oProgress.Text = "Adding node: " & sFldCaption
            End If
The first example works with some masks 7 seconds, instead of just 1 second with second example:

Code: Select all

            i = i + 1
            If (i Mod 20) = 0 Then
                i = 0
                If oProgress.Terminate Then
                    Exit Do
                End If
                oProgress.Text = "Adding node: " & sFldCaption
            End If
Note that in both cases you don't have visually displayed progress, but I didn't need this anyway since in Magic Nodes I don't know in advance what is a total number of steps in Iter loop, so I could not set MaxValue for progress bar. If you already know which is maximal value of some loop, you could type something like the next example and would get graphically a progress:

Code: Select all

          For i = ....
            ' ...  
            If (i Mod 20) = 0 Then
                If oProgress.Terminate Then
                    Exit For
                End If
                oProgress.Value = i
                oProgress.Text = "Adding node #" & i & ": " & sFldCaption
            End If
However, if you look at the source code of Magic Nodes you could see that I ended with the next code (slightly modified):

Code: Select all

            If CLng(Timer * 5) > i Then
                i = CLng(Timer * 5)
                If oProgress.Terminate Then
                    Exit Do
                End If
                oProgress.Text = "Adding node: " & sFldCaption
            End If
In that way I am refreshing displayed text and checking if an user clicked Terminate option in a pop-up only every 1/5 of seconds, instead of every 20 pass through a loop like with previous examples. So, I could get more uniform refreshing of displayed text in the progress bar, because time for one pass with some masks could last much longer then with another masks.
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
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by Big_Berny »

Thanks, I'll check it out this holidays! :)
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by declan »

ZvezdanD - are you aware that when using the latest 3.1 release of MM there seems to be an issue with magic nodes whereby subnodes are not displayed? i.e.

This mask -

The Fall|Child of: Library|Show tracks:no|icon: top level|Filter:<Artist> = 'The Fall'\<year>\<album>

designed to gives nodes like this -

The Fall
+ Year
+ Album

Only gives -

The Fall
+ Year

I'm not sure whether I need to report that in this thread or in the Beta Testing thread?
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by gege »

declan wrote:ZvezdanD - are you aware that when using the latest 3.1 release of MM there seems to be an issue with magic nodes whereby subnodes are not displayed? i.e.

This mask -

The Fall|Child of: Library|Show tracks:no|icon: top level|Filter:<Artist> = 'The Fall'\<year>\<album>

designed to gives nodes like this -

The Fall
+ Year
+ Album

Only gives -

The Fall
+ Year

I'm not sure whether I need to report that in this thread or in the Beta Testing thread?
I just installed MM 3.1 and I noticed this too.
Note: when the '+' is not displayed, you can double-click the node and it will expand.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by Bex »

This is a bug affecting all script created nodes. It has been fixed and will be in the next beta-build.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by declan »

Note: when the '+' is not displayed, you can double-click the node and it will expand.
Ha! never tried that, so it is just a missing plus sign!

Bex - thanks for the update.
mohikaani
Posts: 63
Joined: Wed Oct 31, 2007 2:25 pm

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by mohikaani »

I can't get the "Show tracks:No" working after Mask2 in the first node of the hierarchy. Mask1 and Mask2 are working normally but after that the first node always shows all the tracks. Here's an example:

Code: Select all

Mask1=Album Artist [A-Z], Album (by Year)|Icon:Top level|show tracks:no\<Album Artist|Trim:1|Statistic:Count(All)>\<Album Artist|Statistic:Count(All)>\<Album|Sort by:Max(Year)|Statistic:Count(All)>
Mask2=Genre, Artist, Album (with number of items)|Icon:Top level|Show tracks:No\<Genre|Statistic:Count(Items)>\<Artist|Statistic:Count(Items)>\<Album|Statistic:Count(All)>
These works just fine.

Code: Select all

Mask3=Rating, Genre, Album Artist with Album|Icon:Top level|Show tracks:No\<Rating|Sort order:Desc|Statistic:Count(All)|Show tracks:No>\<Genre|Sort by:Count(All)|Sort order:Desc>\<Album Artist with Album|Statistic:Count(All)>
This shows the tracks in all of the nodes exept node 2 (Rating).

Code: Select all

Mask4=Format, VBR, Bitrate|Icon:Top level\<Format|Statistic:Count(All)>\<VBR|Statistic:Count(All)>\<Bitrate|Statistic:Count(All)>
Mask5=Cover storage|Icon:Top level|Show tracks:No\<Cover storage|Unknown:No|Statistic:Count(All)>\<Album>
These shows the tracks in all of the nodes.

Here's the MagicNodes ini section in case you need it:

Code: Select all

[MagicNodes]
LastNode=4
SkipExpandOnStartUp=0
AllowEditNodes=1
SortStatOnlyIfDefined=1
RatingsByHalfStar=1
MovePrefixesToEnd=1
IniDate=14.12.2008 16:33:52
EditSQLQueries=1
EditSQLQueryField=0
EditSQLQueryUnknown=0
EditSQLQuerySelect=0
ShowElapsedTime=1
ShowForSeconds=5
ImportFileName=
ImportReadOnly=0
Using 1190.
Windows 7 | MediaMonkey 3.2.0.1294
Dell Studio 1537 (Core 2 Duo T6400, 320GB HD, 4GB RAM, ATI Radeon HD 3450)
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 2.0 w/ 160 masks & real GUI (2008-12-16) [MM2+3]

Post by ZvezdanD »

mohikaani wrote:I can't get the "Show tracks:No" working
There is a new revision (2.0.3). Thanks for the report.
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