Magic Nodes 1.3b (IS OUTDATED SEE NOTE IN FIRST POST)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Re: Style nodes

Post by ZvezdanD »

_Vic333_ wrote:A while ago, Trixmoto recommended this method:
Well you could use the Magic Nodes script to run SQL on the field you've got the styles in, this could then create a node for each style.
Though I've no idea how to use SQL filters or script in general, and it seems quite confusing. :o
If you want to learn how to use this script in general, you should read tutorial which Pablo wrote: http://magicnodes.110mb.com/tutorial.htm.

If you want to know how to write SQL filters, you should read some good book about SQL :) (if you decide to switch to MM3, you can read short SQLite tutorial on http://www.sqlite.org/lang.html).

Here is a mask with SQL filter which you could use to filter only those tracks which have "Prog-Rock" as a style, regardless on number of ";" separators:

Code: Select all

Specific style|SQL filter:Custom1 Like '%Prog-Rock%'\<Album Artist>\<Album>
You should take in consideration that SQL filter is a global qualifier for full node branch, instead of left of and right of qualifiers which can be used together in same node branch (but on different node level, of course). So, you cannot use SQL filter to get "Prog-Rock" style on the one branch level and "Album Rock" on the next sub-level.
thorgal67
Posts: 8
Joined: Tue Nov 27, 2007 2:07 pm
Location: Switzerland
Contact:

Post by thorgal67 »

Well, first of all, i want to thank all the posters here to provide solutions around the clock for people like me ;-).

I really love the Magic Nodes stuff, and I have set up some own ones, reall y helping to manage a larger collection.

There have been people here seeking for a possibility to select all songs coming from an ipod recognized compilation album (Album Artist <> Song Artist), without setting the album artist to 'Various Artists'

-> i'm one of them and meanwhile, i have programmed this to solve it:

Code: Select all

Compilations|child of:album|icon:bottom level|SQL Filter: Songs.IDAlbum IN (SELECT DISTINCT Albums.ID FROM Albums INNER JOIN Songs ON Albums.ID = Songs.IDAlbum WHERE Albums.IDArtist <> Songs.IDArtist AND Songs.IDAlbum >0)\<album|trim:1|min tracks:3>\<album>
I'm not sure if this is the best way to do it, but it works. Maybe someone of the experts in here can find a way to optimize it ?
many thanks in advance. Chris.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden
Contact:

Post by Bex »

I'm at work right now so I can't test it but perhaps this SQL Filter is faster?

Code: Select all

SQL Filter: Songs.IDAlbum IN (SELECT IDAlbum FROM Songs WHERE IDAlbum>0 GROUP BY IDAlbum HAVING COUNT(DISTINCT Artist)>1)
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
thorgal67
Posts: 8
Joined: Tue Nov 27, 2007 2:07 pm
Location: Switzerland
Contact:

Post by thorgal67 »

Well, many thanks for your reply, i've been trying your adapted syntax, but it returns me my whole collection back.

As mentioned before, the album artist must be different than the the song artist, to be recognised as a compilation by ipod (i don't want to use the 'various artists', while having tons of compilations)

For the selection of the album subset:

-> eliminate regular albums: Albums.IDArtist <> Songs.IDArtist (needs a join on Albums.ID = Songs.IDAlbum to complete)
-> eliminate songs with unknown album: Songs.IDAlbum >0
-> the Distinct eliminates me all of the duplicates Albums.ID

The first condition brings a problem in the case the album artist has an own song on its compilation, e.g. with
Blank & Jones - The Mix Vol. 1 : 3 Tracks would be missing...

The next step is to combine the songs with the subset of 'compilations' albums, somehow another join on Songs.IDAlbum being part of the albums subset.
[/b]
ZvezdanD
Posts: 3112
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

thorgal67's filter works only in MM2 and Bex's filter works only in MM3. Here are adapted masks:

thorgal67 (MM3):

Code: Select all

Compilations|icon:bottom level|SQL Filter: Songs.IDAlbum IN (SELECT DISTINCT Songs.IDAlbum FROM Songs WHERE Songs.Artist <> Songs.AlbumArtist AND Songs.IDAlbum > 0)\<album|trim:1|min tracks:3>\<album>
Bex (MM2):

Code: Select all

Compilations|icon:bottom level|SQL Filter: Songs.IDAlbum IN (SELECT IDAlbum FROM Songs WHERE IDAlbum > 0 GROUP BY IDAlbum HAVING Min(IDArtist) <> Max(IDArtist))\<album|trim:1|min tracks:3>\<album>
I think Bex's approach is more reliable, especially in situations when someone have compilations in database with Album Artist's names same as Artist's names.
thorgal67
Posts: 8
Joined: Tue Nov 27, 2007 2:07 pm
Location: Switzerland
Contact:

Post by thorgal67 »

Well, many thanks for this, it's just great ;-)
PoooMukkel
Posts: 223
Joined: Thu Jul 19, 2007 8:36 am
Location: Germany
Contact:

Post by PoooMukkel »

ZvezdanD wrote:
PoooMukkel wrote:Now I want to have the Year behind the Album in the last Tree, e.g.
For this what you want you should not use <Album and Year>, but <Album> with added statistic qualifier:

Code: Select all

Alben|SQL filter:Songs.Album<>''\<Album Artist>\<Album|statistic:Max(Year)>
My new problem is, that some of the album I have, have 2 or more discs. Is it possible, that under <Album|statistic:Max(Year)> a next tree is coming, where you can see the disc?

I tried <Album|statistic:Max(Year)>\<Disc> and <Album|statistic:Max(Year)>\<CD>, but I think, that this is the wrong command.

Can you help me again?
Cu,
PoooMukkel
ZvezdanD
Posts: 3112
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

I suppose you know that this works only in MM3 if you entered Disc # data:

Code: Select all

Alben|SQL filter:Songs.Album<>''\<Album Artist>\<Album|statistic:Max(Year)>\<Disc Number>
There is a Quick reference with lists of all currently supported fields in the first post of the following thread: http://www.mediamonkey.com/forum/viewtopic.php?t=19168
PoooMukkel
Posts: 223
Joined: Thu Jul 19, 2007 8:36 am
Location: Germany
Contact:

Post by PoooMukkel »

Ok, thanks! It works! But I had to update to the newest version 1.5.0.2. I used an older version 1.4.3.1.

Thank you also for the link. Now I have all fields, that are supportet by Magic Nodes. :)
Cu,
PoooMukkel
mikolajek
Posts: 14
Joined: Tue Mar 14, 2006 5:39 am
Location: Warsaw, Poland
Contact:

Post by mikolajek »

Anyone can please give me a tip how to have more than one genre in a node?

I don't want to create many nodes - a single will be just enough for such genres as "rock" and "hard rock" for example.

I tries to do something like that:
filter:genre='Rock' OR genre='Hard Rock'
but unfortunately my MM hangs when I enter this expression :(

Please help!
mothra9999

multiple filters?

Post by mothra9999 »

similar to last post about multiple genres actually.

i am trying to build a node to create my general 'ok to play' list. generally everything that is rated well, or unknown, and is not an audiobook or something like that.

how do you get a magic node that has (ratings>2 or ratings<.5) and genre!='audio book' and (for example) artist!='Eilart Pielarm'?

not that i have anything against the swedish elvis.
thanks!
Lady_Gerbil
Posts: 23
Joined: Wed Sep 13, 2006 12:36 pm
Contact:

MN using playlist as filter

Post by Lady_Gerbil »

Hi there,

I'm looking to make a Magic Node using a playlist as a filter. I'm using:

Full Albums|icon:bottom level|filter:playlist='CompleteAlbums'\<artist>

But nothing is showing up in the node!

What am I doing wrong?

Thank you!
LG
Jon Isaksson
Posts: 20
Joined: Mon Mar 17, 2008 10:50 am
Location: Manchester, England
Contact:

Post by Jon Isaksson »

hi,

I am brand new to MediaMonkey and Magic nodes.
MN looks great from what I can read about it but I dont seem to be able to get it working.

I am running Windows Vista and Mediamonkey 3.0.2.1134.

I tried a really simple node, so Artist \<artist>\<album>

But as soon as I add it, I get an SQL error "There was a problem querying the database. Error executing SQL "Select songs.* ...."

Anyone have any idea what could be going on?

EDIT********
Ignore me, realised that I used an old version of the script. Downloaded the latest version and that resolved the issue :)
harshpshah

Magic Node error

Post by harshpshah »

Hi, I created a node


Too Few\<Album|max tracks:2>

but when I tried clicking on the node, it gave me the following error:

"There was a problem querying the database:
ERROR executing SQL "SELECT SONGS"
FROM Songs
AND Songs.Id in (SELECT Songs.Id FROM Songs WHERE Songs.IdAlbum = Albums.ID)
: near "AND": syntax error (1,1)"

I thought that I may have made a mistake, this is the first time I'm using magic node, so I changed it to simply "Too Few\<Album>, and it still gives the same error. Could you please correct my syntax if it's wrong? I'm trying to locate all the albums that have 1 or 2 tracks in them.

Thanks.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Magic Node error

Post by nohitter151 »

harshpshah wrote:Hi, I created a node


Too Few\<Album|max tracks:2>

but when I tried clicking on the node, it gave me the following error:

"There was a problem querying the database:
ERROR executing SQL "SELECT SONGS"
FROM Songs
AND Songs.Id in (SELECT Songs.Id FROM Songs WHERE Songs.IdAlbum = Albums.ID)
: near "AND": syntax error (1,1)"

I thought that I may have made a mistake, this is the first time I'm using magic node, so I changed it to simply "Too Few\<Album>, and it still gives the same error. Could you please correct my syntax if it's wrong? I'm trying to locate all the albums that have 1 or 2 tracks in them.

Thanks.
Are you using MM3? This thread contains the old script, the new version is here
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.
Locked