Magic Nodes 4.2 w/ 380 masks & real GUI (2011-07-01)[MM2+]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Re: Separators in Tags?

Post by ZvezdanD » Tue Dec 11, 2007 3:27 pm

Treponem wrote:I've tagged my Custom1 tag to Styles and used a semicolon ";" as separator (cause of MM3).
MM3 don't support multi-items for all fields, but only some of them (Artist, AlbumArtist, Genre, ...). Custom fields are not multi-items and you cannot use this approach with them.

Maybe you should use Mood or Occasion fields instead, because they are multi-items (next version of the script will support this fields as multi-items). There are some scripts for mass-replacing fields, e.g. Custom1 -> Mood.

baker

Post by baker » Thu Dec 13, 2007 1:23 am

Is it possible to get a MN to sort by the number of tracks per artist? Thx!

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

Post by ZvezdanD » Thu Dec 13, 2007 7:31 am

Thank you for asking this question, it helped me to discover one bug in the script. I introduced keyword All with Statistic qualifier, but I forgot to implement same keyword for Sort by qualifier. Correct syntax should (will) be Sort by:Count(All), but you can temporary use the following mask with same result:

Code: Select all

Artists sorted by the number of tracks\<Artist|Sort by:Count(Length)|Sort Order:Desc>

baker

Post by baker » Thu Dec 13, 2007 12:27 pm

Sweet! Thx! I haven't used MNs b4 so I don't really know what is possible. Can you tell how to limit that mask by rating so that it only counts tracks with 4+ stars? Thx again!

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

Post by ZvezdanD » Thu Dec 13, 2007 2:26 pm

Code: Select all

Artists sorted by the number of tracks with 4+ rating|Filter:Rating >= 4\<Artist|Sort by:Count(Length)|Sort Order:Desc>

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

Post by ZvezdanD » Mon Dec 17, 2007 6:46 am

There is a new version of this script. Link is on the start of this thread. Please, read carefully an information about it which is in the first post.

mattisse
Posts: 65
Joined: Fri Feb 02, 2007 8:07 am

Post by mattisse » Mon Dec 17, 2007 9:39 am

With version 1w5 I'm getting this error message during the start of MM (using MM3 rc5):

Code: Select all

Error #1032 Compilation error in Microsoft VBScript
Invalid character
File "C:\Programme\Mediamonkey3\Scripts\Auto\MagicNodes-1w5.vbs", Line:1511, Column:16
How can this error be resolved?

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

Post by ZvezdanD » Mon Dec 17, 2007 1:11 pm

mattisse wrote:How can this error be resolved?
There is a new version (1.5.0.1) with removed bug. Thank you for reporting this.

MM3 monkey
Posts: 445
Joined: Mon Aug 27, 2007 2:34 am

Thank you

Post by MM3 monkey » Mon Dec 17, 2007 3:46 pm

Thank you very much for the update; it was a nice surprise.

I'd been working around the lack of count(all) by using sort by:sum(rating) - a nightmare compared to the new version. I hadn't thought that it was just that you'd forgotten. I wish I'd asked you! It's fantastic now, though - just what the doctor ordered. And it's just generally a wonderful thing! I can't believe this thread isn't bursting at the seams with praise and thanks now that you've brought this new one out.

And a new beta MM too, aren't we lucky.

I have one question that I'm really hoping for a quick answer on, and then some other not important stuff.

Firstly, thanks to Pablo and you for this wonderful addition to MM.

My questionis, I have this node:

Code: Select all

aArtist 2*+/2+ tracks|filter:rating>=2\<Album Artist|min tracks:2|trim:1|statistic:count(all)>\<Album Artist|min tracks:2|statistic:count(all)>\<Album|statistic:count(all)>
but really I want the min tracks filter to be at the global level. As it is now, with the above node, when I look at my tree at the top level with just the album artists' first letter shown, the statistics shown are as if there is no filter applied. So it says the letter A has 62 files, just as it does for another node I have:

Code: Select all

aArtist 2*+/2+ tracks|filter:rating>=2\<Album Artist|trim:1|statistic:count(all)>\<Album Artist|statistic:count(all)>\<Album|statistic:count(all)>
There are in fact only 44 files in the letter A with minimum 2 tracks, as shown when I click on the letter A. But the tree statistic at the alphabet letter level says there are 62.

When I expand the node of the letter A, I can see the correct statistics for each album artist.

Do you see what I mean?

I think I want to say

Code: Select all

aArtist 2*+/2+ tracks|filter:rating>=2 AND min tracks:2\...
but that gives me a 'catastrophic error'.

I'm sure I'm being stupid - can you enlighten me please? I'll ask the other stuff later.[/code]
MMW 4.1.9.1764|MMA 1.1.3.0482|Android 5.0|Win 8.1 64 bit

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

Post by ZvezdanD » Mon Dec 17, 2007 5:21 pm

MM3 monkey, thank you very much for your kind word :)

I think I can reproduce same problem with Statistic qualifier as you observed. Thank you for this report, it is very valuable. This is interesting and very nasty problem. Unfortunately, I think that solution is not so easy, so I could not predict when I'll fix the script for this.

Your suggestion with a global setting of maximal number of tracks could be currently done with some SQL filters more complicated than your incorrect attempt with min tracks qualifier inside of the SQL query. But such solution will be limited only to specific condition, depending of used fields (in your example they are Album Artist and Rating). I prefer general solutions, so I suggest you to wait for a next version of the script when I'll try to remove this problem on the script level.

BTW, I have a plan for a next major upgrade to implement some counting qualifiers on the global level, as well as custom filters on the local level, but I don't know when it will be ready.

MM3 monkey
Posts: 445
Joined: Mon Aug 27, 2007 2:34 am

Post by MM3 monkey » Mon Dec 17, 2007 5:40 pm

Thanks, ZvezdanD. I'm not too worried about the thing I mentioned; I'm just glad I'm not doing anything wrong.

I've written up a few questions in the meantime. It all sounds very demanding, but I don't mean to. It's just that I'm very ignorant and not very computer-savvy and I don't understand at least half of what you and Pablo are on about! Not because of you, just that stuff goes way over my head. Eg. (although the global count qualifiers I do understand and would be a nice idea) "custom filters on the local level" means nothing to me - or, indeed, "custom filters"!

Here goes anyway:

1. My biggest request by far would be an easier way to reorder the nodes.

2. Minor annoyance. Why do we have to tab twice to get to the 'enter mask' box of the create/edit nodes window?

3. What's Mask0 in the ini file? Why does it come after Mask1 in my current ini file? Do I have to leave it exactly where it is if I rejig my nodes around using the ini file?

4. In fact, is it OK to do all my editing of nodes in the ini file. Eg. I know deleting 'child of' qualifiers requires a reboot - is it OK to add/delete/change a few of those at once while MM is closed and then just fire it up with the new ini file and expect it to be OK?

5. Incorporating playlists into magic nodes would be wonderful, but I'm sure this has been well covered.

6. Any hep on SQL filters would be greatly appreciated. I simply have no idea about it. I don't do ANYTHING that involves the database. Maybe you could put some examples of SQL magic nodes that you've found useful and make bits of it coloured or bold to explain what bit does what and what the node achieves. That's a lot to ask so don't worry about it - only if it's no bother.

7. Is there somewhere I've missed with more examples of nodes? Your "What is new" suggests that I'm missing out on a lot of Magic Nodes's possibilities, but I just am not able to learn much without a shove in the right direction. [I don't really understand "several new fields for displaying (Disc Number,...) and sorting (Custom,...)" for example. Are there more? Where can I find out? What do they do?]

8. Is there any problem with increasing the maximum amount of magic nodes. It only processes one at a time doesn't it? I've set my max to 40; is that OK?
MMW 4.1.9.1764|MMA 1.1.3.0482|Android 5.0|Win 8.1 64 bit

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

Post by ZvezdanD » Mon Dec 17, 2007 7:29 pm

MM3 monkey wrote:"custom filters on the local level" means nothing to me - or, indeed, "custom filters"!
You could currently write Filter and SQL Filter qualifiers only on the root node level, e.g. BlahBlah|Filter:BlahBlah\<Album>. I want to implement a possibility to write Filter qualifier on all node levels, e.g. BlahBlah\<Album|Filter:BlahBlah>. But this is not so simple as it looks, because I need to change Filter syntax (as I wrote in the first post of this thread). So, if I write <Album Artist> after Filter qualifier instead of Album Artist, this could mess parsing mask because in that case we have nested brackets (<>). I have one solution even for this, but maybe it will break compatibility with existing user masks.
MM3 monkey wrote:1. My biggest request by far would be an easier way to reorder the nodes.

2. Minor annoyance. Why do we have to tab twice to get to the 'enter mask' box of the create/edit nodes window?
This things will be resolved in the next major upgrade.
MM3 monkey wrote:3. What's Mask0 in the ini file? Why does it come after Mask1 in my current ini file? Do I have to leave it exactly where it is if I rejig my nodes around using the ini file?
This is a temporary mask which was last entered. You could leave it anywhere inside of the [CustomNodeMasks] section.
MM3 monkey wrote:4. In fact, is it OK to do all my editing of nodes in the ini file.
Yes, you could do all masks editing inside of the Ini file, but with next version there will be not need for this.
MM3 monkey wrote:5. Incorporating playlists into magic nodes would be wonderful, but I'm sure this has been well covered.
I am not sure that I understand what you mean with this.
MM3 monkey wrote:6. Any hep on SQL filters would be greatly appreciated.
Sorry, but this is not so simple and fast as you may think. SQL is a language for manipulation with databases and even if it is not so complex as other programming languages, it still needs some time to learn. If you want to learn, you should buy some good book about it. For the start, you could read short language reference for SQLite on http://www.sqlite.org/lang.html, especially SELECT and expression parts.
MM3 monkey wrote:7. Is there somewhere I've missed with more examples of nodes?... I don't really understand "several new fields for displaying (Disc Number,...) and sorting (Custom,...)" for example. Are there more? Where can I find out?
You should visit Pablo's site mentioned in the first post. You could find there a tutorial with many examples. There is also a reference table where he displayed all fields which are supported by the last official version (http://magicnodes.110mb.com/magicnodes.htm). If you want to know which fields I was added, you could open the script file in the Notepad and take a look on the FieldDict definition near the begin of the file (104-251 lines). If you want to know which fields could be used for sorting/statistic with Min/Max/Avg/Sum aggregate functions, you should take a look on DecimalsDict definition (802-825 lines).

I could re-type same fields here, but with a next major version of the script all of this will be thing of the past. It will be much more user-friendly and you wouldn't need to worry about field names. Please, just be a patient.
MM3 monkey wrote:8. Is there any problem with increasing the maximum amount of magic nodes... I've set my max to 40; is that OK?
Yes, this is OK. I set this amount to 50, but then the menu covers full screen. Next version will resolve this, but I am afraid that I am monotonous repeating same sentence all the time. :)

MM3 monkey
Posts: 445
Joined: Mon Aug 27, 2007 2:34 am

Post by MM3 monkey » Mon Dec 17, 2007 8:15 pm

Thanks for all the other answers to the bits I don't mention here. Nice post.
ZvezdanD wrote: I want to implement a possibility to write Filter qualifier on all node levels... nested brackets (<>). I have one solution even for this, but maybe it will break compatibility with existing user masks.
Personally, I wouldn't worry about that too much. We'll just have to alter our masks. I'd rather give you a free hand, not tie you to old versions.
ZvezdanD wrote:
MM3 monkey wrote:5. Incorporating playlists into magic nodes would be wonderful, but I'm sure this has been well covered.
I am not sure that I understand what you mean with this.
I'm not too sure either. I'll have to try and engage brain. I think I mean that I would like to use playlist like a filter. It would open up other possibilities [but I can't remember what, now!] (and save me having to learn about SQL). I mean, say I wanted to have a root/global filter that all the tracks had to be in the playlist "3 stars or more." That would solve my earlier problem too. Having playlists as a filter in Magic Nodes would allow you to have plalists in a tree in the many varied and wonderful MN ways. ... Wouldn't it? :-?

ZvezdanD wrote:Yes, this is OK. I set this amount to 50, but then the menu covers full screen. Next version will resolve this, but I am afraid that I am monotonous repeating same sentence all the time. :)


Ha ha. I can't wait. It sounds like it's pretty close to happening. Well, I'll do my best to be patient but it's not easy! Any guesses as to when we might see it? Good luck with it and thanks again.
MMW 4.1.9.1764|MMA 1.1.3.0482|Android 5.0|Win 8.1 64 bit

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

Post by ZvezdanD » Tue Dec 18, 2007 5:56 am

MM3 monkey wrote:I think I mean that I would like to use playlist like a filter.
Sorry, but I still don't understand what you mean with this. Did you tried the Playlist field within some mask, e.g. BlahBlah\<Playlist>? Maybe with this you could do something what you want.

Please, take a look again on the first post of this thread. I added Quick reference with lists of supported fields, as you wanted.
MM3 monkey wrote:It sounds like it's pretty close to happening... Any guesses as to when we might see it?
Well, it is not really close to the end and this is a reason why I posted this older working version, but I am trying to do my best.

mattisse
Posts: 65
Joined: Fri Feb 02, 2007 8:07 am

Post by mattisse » Tue Dec 18, 2007 6:13 am

ZvezdanD wrote: There is a new version (1.5.0.1) with removed bug. Thank you for reporting this.
Thank You very much for the fast solution. Works great now.

The changes You made in the new version are very valuable. Well done. :D

I'd also like to make a small suggestion for a future version.
Could you change the entry form a bit? It would be great, if the text field for the Magic Node code was longer or if it was a text area instead of a single-line field. That would make it a lot easier to edit the code.

Post Reply