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

Post by ZvezdanD »

Last public version of Magic Nodes doesn't support multiple arguments of sort by qualifier and I doubt it will ever support a mathematical expression as a multiplication, except if it is inside of SQL filter.

Currently, you have two possibility. First, you could try to use SQL filter qualifier to emulate first query:

Code: Select all

Most Played by Time|icon:top level|SQL filter:Exists (SELECT TOP 150 Nationality, Sum(PlayCounter) FROM Songs GROUP BY Nationality HAVING Count(*) > 1 ORDER BY Sum(PlayCounter) DESC)\<Nationality|sort by:avg(length)|sort order:desc|all:no|unknown:no|top:100|min tracks:40>
Second, you could try statistic qualifier in combination with sort by:

Code: Select all

Most Played by Time|icon:top level\<Nationality|sort by:avg(length)|sort order:desc|all:no|unknown:no|top:100|min tracks:40|statistic:sum(played)>
In the last example, you could try to rotate arguments of sort by and statistic qualifiers.

Code: Select all

Most Played by Time|icon:top level\<Nationality|sort by:sum(played)|sort order:desc|all:no|unknown:no|top:150|min tracks:1|statistic:avg(length)>
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Post by declan »

Thanks, the second of the two is a neat work around. I can quickly put that information onto a spreadsheet.
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Hi ZvezdanD,
two bugs I found:
-Sorting is different from MediaMonkey's one. Underlines come after numbers, but in MM they come before. I just noticed that because I use __Compilations and __Soundtracks.
-<artist> shows the Composer. I have to use <album artist> instead.

Nice work btw! :)
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
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Thanks for reporting this.

1. You are right, underscore is after numbers. This is a problem with MM3 because I was using NOCASE collation to get similar behavior as MS Jet in MM2. Other then that, SQLite by default only support BINARY collation. But now, I see that MM developers added IUNICODE collation which works as expected. So, if you don't want to wait for the next script version and want correct sorting with underscore, you should replace all COLLATE NOCASE to COLLATE IUNICODE inside of the script.

2. Are you sure about that? <Artist> is working correctly to me, and (I think) to many others. Could you post a MN mask which you typed?

BTW, with a last public version of the script, you cannot use Artist, Album artist, Composer, Lyricist and Conductor inside of the same SQL filter, e.g. Artist = 'aaa' And Composer = 'ccc'. I am not sure, but there is also a possibility that you cannot use mentioned persons on different levels of the same root node, e.g. My Node\<Artist>\<Composer>. This bug is removed in a new (non-published) version.
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Hi,
1. Thanks a lot!
2. For example this one: "Interpret\<artist>\<album|sort by:max(year)|sort order:desc>"
I just saw that songs with composer are listed twice, under the artist (correct) and under the composer... Maybe it has something to do with this (see last post)?: http://www.mediamonkey.com/forum/viewtopic.php?t=21146
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
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Yeah, you are right. As I said, this is a problem not only with Composers, but with any person whose name is stored in Artists table (Album artist, Lyricist and Conductor). This behavior is already resolved in a new version.
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Cool, 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
danhackley
Posts: 317
Joined: Fri Aug 31, 2007 6:43 am
Location: Scotland
Contact:

Post by danhackley »

I wonder if anyone can help me with the magicnode code needed to do the following:

I want a tree node called "compilations". Clicking on this will then open a list of genres by which compilations are grouped. Opening the genre then lists the compilation titles in alphabetical order. The year in brackets would also be nice.

E.g.

Genre
Album Artist
Artist
Compilations
---Ambient
---Be-bop
---Cha-cha
---Dance
---------A collection of dance classics (1995)
---------Best of techno (2003)
---------Crazy trance vol.3 (2001) etc


Any help much appreciated !!
Sony Vaio Laptop
Thecus N5200B NAS
Windows 7
MM3 Gold 3.2
Looking for jukebox software that manages a large collection, has good album art integration and plays flac as well as MP3
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

If you use a common Album Artist for your compilations, then something like the following would work:

Code: Select all

Compilations|child of:album|SQL filter:artist='Various Artists'\<Album Artist>\<Genre>\<Album|statistic:max(year)>
If you use something other then "Various Artists" then you'd change that part. Kind of redundant to have the "<album artist>" in there, but when I tried removing it, I received a couple error messages... sooo.... *Shrugs*
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

This is not redundant to have <Album artist> subnode, because maybe someone wants such a display.

Here is a mask without Album artist subnode for MM2:

Code: Select all

Compilations|child of:album|SQL filter:Artists.Artist = 'Various Artists' AND Artists.ID = Albums.IDArtist AND Albums.ID = Songs.IDAlbum\<Genre>\<Album|statistic:max(year)>
Same for MM3:

Code: Select all

Compilations|child of:album|SQL filter:Artists.Artist = 'Various Artists' AND Songs.IDAlbum = ArtistsAlbums.IDAlbum AND ArtistsAlbums.IDArtist = Artists.ID\<Genre>\<Album|statistic:max(year)>
More sophisticated mask would use filtering of albums with more than one artist, instead of filtering with album artists, but this is another story.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

I stated that it was redundant because it seems most people use one Album Artist for all of their compilations, usually "Various Artists" so having the <Album Artist> there simply gives you one node, you know? Doesn't matter though, since you got a different formula to accomplish it (even though I don't know what any of it does after the "Album.Artist = 'Various Artists'", Lol.)
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Well, "most" people doesn't mean "all" people. As I said, maybe someone wants such behavior.

Computer cannot read users mind. If you entered a SQL condition which contains the Album artist field, this not explicitly mean that you don't want to display this field as a subnode. You know, there are many situations with the Album artist field inside of the SQL filter where users exactly want to display this field as a subnode.

BTW, condition is not Album.Artist = '...', but Artists.Artist = '...'. All additional conditions after that is because same Artists table contains all person names (Artist, Album artist, Lyricist, ...).

Actually, in this case a mask for MM3 could be simpler. Instead of all conditions which I wrote, there is enough to write SQL filter: Songs.AlbumArtist = 'Various Artist'. However, the mask mentioned before is generally preferred because it takes in account tracks with multiple Album artists.
danhackley
Posts: 317
Joined: Fri Aug 31, 2007 6:43 am
Location: Scotland
Contact:

Post by danhackley »

Thanks a lot for that code, ZvezdanD - your code seemed to work with my MM3. I now have a tree node arranging compilations by genre, then within that genre alphabetically with year in brackets.

The code was

Compilations|child of:album|SQL filter:Artists.Artist = 'Various Artists' AND Songs.IDAlbum = ArtistsAlbums.IDAlbum AND ArtistsAlbums.IDArtist = Artists.ID\<Genre>\<Album|statistic:max(year)>

One question: is it possible to have next to each genre in this view the number of tracks or (preferably) albums in brackets ?
Sony Vaio Laptop
Thecus N5200B NAS
Windows 7
MM3 Gold 3.2
Looking for jukebox software that manages a large collection, has good album art integration and plays flac as well as MP3
ZvezdanD
Posts: 3264
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

danhackley wrote:is it possible to have next to each genre in this view the number of tracks
http://www.mediamonkey.com/forum/viewto ... 6695#96695
danhackley wrote: or (preferably) albums in brackets ?
http://www.mediamonkey.com/forum/viewto ... 371#102371
nojac
Posts: 517
Joined: Tue Dec 19, 2006 12:23 pm
Location: Norway

Post by nojac »

I use this AlbumArtist node:

Code: Select all

Album Artist MN (##)|child of:Artist\<album artist|statistic:count(all)>\<album|sort by:max(year)|sort order:asc|statistic:count(all)>
Inspired by the MissingTracks script, can I modify my node to also display the max track number in addition to the track count?

I want a display like this: 1965 Help (12/14) if I have 12 of the 14 tracks. (Of course I will need the last track for the number to be correct)
Post Reply