Page 45 of 46

Re: Style nodes

Posted: Tue Nov 27, 2007 5:34 am
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.

Posted: Tue Nov 27, 2007 2:39 pm
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.

Posted: Tue Nov 27, 2007 4:34 pm
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)

Posted: Tue Nov 27, 2007 6:41 pm
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]

Posted: Tue Nov 27, 2007 9:03 pm
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.

Posted: Wed Nov 28, 2007 2:17 am
by thorgal67
Well, many thanks for this, it's just great ;-)

Posted: Wed Dec 26, 2007 5:32 am
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?

Posted: Wed Dec 26, 2007 7:29 am
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

Posted: Wed Dec 26, 2007 3:21 pm
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. :)

Posted: Mon Dec 31, 2007 6:47 am
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!

multiple filters?

Posted: Thu Jan 24, 2008 12:16 pm
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!

MN using playlist as filter

Posted: Sat Feb 23, 2008 9:05 pm
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

Posted: Mon Mar 17, 2008 12:19 pm
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 :)

Magic Node error

Posted: Tue Apr 08, 2008 11:41 am
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.

Re: Magic Node error

Posted: Tue Apr 08, 2008 7:28 pm
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