Magic Node Help

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

rb1317
Posts: 1
Joined: Fri Jun 23, 2006 9:03 am

Magic Node Help

Post by rb1317 »

I would like to create a node that would exclude certain artists, but not sure how to do it. I assume that it would be easy to do in magic node. I would like to have an artist node that excludes several artists (Bob Dylan, The Black Crowes, Grateful Dead) so that my wife can click on it, press shuffle, and play without having to hear the above artists (for some reason). If anyone has a suggestion on how to do that, using magic nodes or otherwise, I would be thankful for the help.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

You can use the Auto-Playlist for that. Right click on the playlist node and select "New Autoplaylist". In the advanced tab, select Artist and then "doesn't equal", tic the artist you dont want. You can also add other criterias from other fields if you like.

/Bex
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
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

Try this MagicNodes mask:
Reduced Artists List|SQL filter: Artists.ID Not in (Select DISTINCT Artists.ID FROM Artists WHERE Artists.Artist IN ('Bob Dylan', 'The Black Crowes', 'Grateful Dead'))\<Artist>

EDIT: Oops... I forgot the power of auto-playlists again (so better use Bex's recommendation)
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

There is no need to create such a complex SQL filter, since the artists table already is included in the main SQL. The inline workaround is only necessary when you want to include tables not in the main SQL.

This MN will do the trick and much faster on big collections:

Code: Select all

Reduced Artists List|SQL filter: Artists.Artist Not In ('Bob Dylan', 'The Black Crowes', 'Grateful Dead')\<Artist>

/Bex
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
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

I tried that first but that didn't work, so I thought Artists.Artist wasn't included in the default query. Probably again some stupid typing mistake :-?. Anyway, I've learned again...
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
TJOHO
Posts: 108
Joined: Tue Oct 31, 2006 8:00 pm
Location: A Norwegian in Seoul, Korea

Exclude by genre/custom field

Post by TJOHO »

Hi,

Sorry, but I'm completely illiterate when it comes to SQL queries. I was wondering if a similar method is possible to exclude by other criteria than artist.

I have many magic nodes set up where I would like to exclude certain genres (such as Audiobook and Comedy).
Also, I have many dupes that I would like to mark as such using a custom field and then exclude them. For example, if the same track is on both an album and a compilation, I want to only play the album version to keep play history/count (and therefore such things as autorating) in one track only.

However, unless I am mistaken, the "filter" method in Magic Nodes can only be used for including, not excluding.

How can for example this node be modified to exclude either one or both of these two criteria?

Rating - Best by year|child of:rating|filter:rating>=4.5\<year>

My best guess (for one of them to keep it simple) did not work:

Rating - Best by year|child of:rating|filter:rating>=4.5|SQL filter: Genres.Genre Not In ('Audiobook', 'Comedy')\<year>
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

This should do the trick:

Code: Select all

SQL filter: Genre not in (SELECT IDGenre FROM genres WHERE GenreName in ('Audiobook', 'Comedy'))
or...
SQL filter: Genre in (SELECT IDGenre FROM genres WHERE GenreName not in ('Audiobook', 'Comedy'))
I don't know which one is faster...


If you mark custom1 with DUP:

Code: Select all

SQL filter: Custom1 not like 'DUP'
Combined:

Code: Select all

SQL filter: Custom1 not like 'DUP' and Genre not in (SELECT IDGenre FROM genres WHERE GenreName in ('Audiobook', 'Comedy'))
Not tested...
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
TJOHO
Posts: 108
Joined: Tue Oct 31, 2006 8:00 pm
Location: A Norwegian in Seoul, Korea

Post by TJOHO »

Works like a charm! :D

Tested both the Genre excluding filter alone and the combined one, they both work.

Now I have the combined one for all my magic nodes and is very, very happy!! Thanks so much, Bex.
Post Reply