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: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-04-21) [MM2+3]

Post by ZvezdanD »

thetudz wrote:select the last 100 albums played AND select the last 100 albums added
Are you sure that you want to use AND operator? Do you understand that the last 100 albums played could not be same as the last 100 albums added and if you use AND operator you would get much less albums as result. Anyway, you could try:

Code: Select all

100 ... Albums|Icon:Top level|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) = Max(Cast(TrackNumber As integer)) AND Count(TrackNumber) > 3 AND Min(LastTimePlayed) > 0.0 ORDER BY Min(LastTimePlayed) DESC LIMIT 100) AND Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) = Max(Cast(TrackNumber As integer)) AND Count(TrackNumber) > 3 ORDER BY Min(DateAdded) DESC LIMIT 100) AND Songs.IDAlbum IN (SELECT IDAlbum FROM Songs WHERE Rating >= 0 GROUP BY IDAlbum HAVING Avg(Rating) >= 80)\<Album with album artist>
Here is same mask with OR operator:

Code: Select all

100 ... Albums|Icon:Top level|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) = Max(Cast(TrackNumber As integer)) AND Count(TrackNumber) > 3 AND Min(LastTimePlayed) > 0.0 ORDER BY Min(LastTimePlayed) DESC LIMIT 100) OR Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) = Max(Cast(TrackNumber As integer)) AND Count(TrackNumber) > 3 ORDER BY Min(DateAdded) DESC LIMIT 100) OR Songs.IDAlbum IN (SELECT IDAlbum FROM Songs WHERE Rating >= 0 GROUP BY IDAlbum HAVING Avg(Rating) >= 80)\<Album with album artist>
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
thetudz
Posts: 6
Joined: Tue Mar 18, 2008 11:56 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-04-21) [MM2+3]

Post by thetudz »

Big THX. Of course OR is the right operator.

TheTudz...
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

There is a new release: v4.0.3 - 2010-05-21
* Fixed: error with String Before/String After arguments used with Left of/Right of qualifiers;
* Fixed: moving of nodes withing some group to the Playlists branch;
* Fixed: plus sign for expanding global node when none sub-node exists.
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
emalvick
Posts: 265
Joined: Tue May 15, 2007 9:44 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by emalvick »

Back at the end of January I posted a question with respect to problems I am having with Multiple Genres in my Nodes that never got answered. I recently installed Magic Nodes 4 thinking it might work better, but my problem still persists:

My files occasionally have multiple genres that show up in multiple GENRE tags in the files:

e.g.

GENRE = Rock
GENRE = Blues


This is by design for use with a couple of other programs as opposed to GENRE = Rock;Blues as one might expect.

Media Monkey generally handles this well in its built in Genre Node and the various windows.

My Magic Nodes however, don't quite get it right... What I end up with is duplic genre nodes depending on whether the genre tag is the first genre tag or second genre tag. The image below shows what I am talking about:

Image

You can see that there multiple entries for items like Pop, Rock, etc. which seem to correspond to whether those GENRES are in the 1st, 2nd, or 3rd occurence of the tag in a file... e.g. if Rock is in the first GENRE tag, it is in the first occurence. If it is the second genre tag it is in the 2nd occurrence. Is there something I can do about this? This seems like it would be a common problem since FLAC headers prefer having multiple GENRE fields rather than one. Perhaps there is something flawed with my Node:

Code: Select all

<Group|Name:Genre Nodes>\Genre_Sub-Genre (Album Artists)|Child of:Genre|Filter:<Path> Not Like 'http://%' AND <Path> Not Like 'mms://%' AND Songs.Custom3 Not Like '%Christmas%' AND <Genre> Not Like '%Christmas%'\<Genre>\<Sub-genres|Split by:/|Split part:-1>\<Album artist>\<Album>
The filters are just there to keep my holiday music our of the node.

Any ideas would be greatly appreciated. I really don't like having this setup as it kind of defeats the purpose of me using Magic Nodes in this instance.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

emalvick wrote:What I end up with is duplic genre nodes depending on whether the genre tag is the first genre tag or second genre tag.
I really have no idea how you got that. It is theoretically impossible since related SQL query is using DISTINCT keyword, something like SELECT DISTINCT Genres.GenreName FROM Songs, GenresSongs, Genres... By the way, the syntax for Split qualifiers changed a lot in v4.0 and I suppose that you need to replace Split part:-1 with Split mode:All parts. Could you send me your database to try to reproduce that problem?
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
emalvick
Posts: 265
Joined: Tue May 15, 2007 9:44 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by emalvick »

ZvezdanD wrote:
emalvick wrote:What I end up with is duplic genre nodes depending on whether the genre tag is the first genre tag or second genre tag.
I really have no idea how you got that. It is theoretically impossible since related SQL query is using DISTINCT keyword, something like SELECT DISTINCT Genres.GenreName FROM Songs, GenresSongs, Genres... By the way, the syntax for Split qualifiers changed a lot in v4.0 and I suppose that you need to replace Split part:-1 with Split mode:All parts. Could you send me your database to try to reproduce that problem?
I am at work at the moment, so I can't easily send the db at the moment (although I can try later), but all I need to do is have a file with two Genre tags to create that problem (i.e. you might be able to recreate it with a file or two with multiple genres).

In MP3tag, it was just a matter of adding a second genre field to an mp3 file such that I end up with

GENRE = genre 1
GENRE = genre 2

Now Mediamonkey seems to handle this well with its default genre node, although I haven't looked at it in a while as I have generally replaced all the standard nodes with MagicNodes. I suppose there could be a problem in the SQL itself that has created this issue. Now in the main library window, the files that have the GENRE fields as shown above show up as "genre 1; genre2" for display purposes anyway, but on inspection in MP3Tag, nothing has actually changed with the tags.

I used to have GENRE = genre 1;genre 2, but I actually found that the system shown above works well for my Zune (and the not so usable Zune software) as well as my Squeezebox which handles the genre fields like this better than with a semi-colon (or other characters as I have tried '/' '|' etc).

As for the split by item, that was more for my sub-genre field (one of the comment fields), and the node was still working, so I left it as is, although I will try to change that for the sake of compatibility and the new version..
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

emalvick wrote:I am at work at the moment, so I can't easily send the db at the moment (although I can try later)
OK, until you get a chance to send me your database file, you could do next: open Options dialog box and turn on "Allow editing of SQL queries" and "when expand field nodes", then collapse mentioned Genre_Sub-Genre (Album Artists) node (if it is already expanded) and expand it, then copy SQL expression and paste it here.
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
emalvick
Posts: 265
Joined: Tue May 15, 2007 9:44 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by emalvick »

ZvezdanD wrote:
emalvick wrote:I am at work at the moment, so I can't easily send the db at the moment (although I can try later)
OK, until you get a chance to send me your database file, you could do next: open Options dialog box and turn on "Allow editing of SQL queries" and "when expand field nodes", then collapse mentioned Genre_Sub-Genre (Album Artists) node (if it is already expanded) and expand it, then copy SQL expression and paste it here.
Here is the results of the SQL query per your description above. I'll get the database for you here shortly as well.

Code: Select all

SELECT DISTINCT Genres.GenreName AS SortField0 FROM Songs, GenresSongs, Genres, (SELECT *, CASE WHEN DriveLetter IS NOT NULL THEN SubStr('ABCDEFGHIJKLMNOPQRSTUVWXYZ', DriveLetter + 1, 1) ELSE '' END AS DriveStr FROM Medias) AS Medias2 WHERE Songs.ID = GenresSongs.IDSong AND GenresSongs.IDGenre = Genres.IDGenre AND (Medias2.DriveStr || Songs.SongPath Not Like 'http://%' AND Medias2.DriveStr || Songs.SongPath Not Like 'mms://%' AND Songs.Custom3 Not Like '%Christmas%' AND Genres.GenreName Not Like '%Christmas%') AND Songs.ID = GenresSongs.IDSong AND GenresSongs.IDGenre = Genres.IDGenre AND Songs.IDMedia = Medias2.IDMedia AND Length(Songs.Custom5 COLLATE IUNICODE) <> Length(Replace(Songs.Custom5 COLLATE IUNICODE, '/', '')) ORDER BY SortField0 ASC
emalvick
Posts: 265
Joined: Tue May 15, 2007 9:44 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by emalvick »

Well, I should add that it looks like the flaw may be with MediaMonkey itself and not your script. When I made the built in Genre node visible, I ended up with the same "problem" that I showed with my Magic Node.

Perhaps you'll see what the flaw is, but you may not be able to actually fix it. I will also likely go ahead and report this as a bug in the appropriate forum.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

emalvick wrote:Well, I should add that it looks like the flaw may be with MediaMonkey itself and not your script.
Yeah, there is some kind of problem with MM itself. I gave you one possible solution for this in the Bugs forum within thread that you started.
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
emalvick
Posts: 265
Joined: Tue May 15, 2007 9:44 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by emalvick »

Thanks for your help with this (and in the bugs forum).

I tried the registry replacement, and I see how that could be made to work, but another thought crossed my mind and I wonder what your thoughts would be?

Can I use that unicode character as a delimiter with the "split-by" option in the MagicNodes script? Could it be as simple as using the \uFEFF as my split-by character? Or is there something that I could change relatively simply in the script code itself to accept unicode as a "split-by" delimiter?

Otherwise, I will keep thinking about exactly what I will do, now that I know what the "fault" is.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

emalvick wrote:Can I use that unicode character as a delimiter with the "split-by" option in the MagicNodes script? Could it be as simple as using the \uFEFF as my split-by character?
No, you cannot specify that character with the Split by qualifier since it is invisible and cannot be entered with the keyboard. However, even if you can do that, it would not be possible to use Split by because there is not constant string that you could specify. If you take a look at my screenshot in Bugs forum, you would see that some genres have one Unicode mark character, but with another genres there are two characters, depending of single genre position inside of the multi-item genre.

I think this is a program bug which MM developers should resolve. I am wondering how nobody reported something similar until now. Did you try Search option in Bug forum to see if it is already reported? With which MM version did you added audio files to the database? If it was some old version, you could try to rescan audio files with the latest one because maybe it has resolved that bug. If that not help, I could only suggest that you implement my solution with RegExp add-on, but make sure that you have turned off "Update tags when editing properties". In that way you would get the database without that Unicode character and audio files would be unchanged. Unfortunately, this also means that your database will be unsynchronized with tags in audio files.
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
markeh
Posts: 269
Joined: Fri May 25, 2007 1:30 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by markeh »

I have a Magic Node that selects the 20 most recently added jazz albums. Works just fine.

What I would like is a MN, or playlist, that plays 30 minutes of randomly selected tracks from those 20 most recently added albums. Even better is if I could sync the list with my iPod.

Suggestions, please??

thnx,


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

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

markeh wrote:I have a Magic Node that selects the 20 most recently added jazz albums. Works just fine.

What I would like is a MN, or playlist, that plays 30 minutes of randomly selected tracks from those 20 most recently added albums.
I already explained how some Magic Node could be moved to the Playlists folder. After that you should create a new auto-playlist specifying Playlist is name_of_Magic_Node_playlist with checked 30 minutes and Sort order: Random.
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
chris@bodar.com

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by chris@bodar.com »

I've tried compacting my database (quick and full) but no matter what Magic Nodes gives me the syntax error " near AND. I've been trying to use it for about a month now (intermittently of course) but sadly to no avail. I've tried doing a manual search for doubled up " and ' but cannot find any.

Any ideas?

Christian
Post Reply