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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Mon Jan 07, 2008 2:27 pm

If you read the first post carefully you should be able to convert the old syntax to the new one.
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

Guest

Post by Guest » Mon Jan 07, 2008 7:10 pm

I sure did before posting.

Anyway, by now I got #2 and "Incomplete Albums" working, although I didn't change anything in the latter (?!).

When I change

"Scarcely played albums\<album|sort by:sum(played)|top:10 percent|min tracks:5>"

to

"Scarcely played albums\<album|sort by:sum(<played>)|top:10 percent|min tracks:5>"

or if I exchange sort by with statistics (in case the limitation of Sort By to a single argument still aplies, which is really unclear from reading the first post), the "invalid mask" error becomes an SQL error.

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

Post by ZvezdanD » Mon Jan 07, 2008 8:01 pm

There is a new version of the script (1.6.2) with resolved a lot of bugs, many of them are not even mentioned in What is new. Well, since I introduced a lot of new code, there is also a possibility for new bugs :) . Please, download it before you post reports and read information about changes. Thanks.

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

Re: Getting old MagicNodes to work with MM3

Post by ZvezdanD » Mon Jan 07, 2008 8:32 pm

Anonymous wrote:I successfully used the following node definitions with the original MagicNodes script in MM2, but I can't get them to work in ModifiedMagicNodes 1.6.1/MM3:
Well, this is not my fault, but it is a consequence of MM developers' decision to switch to SQLite from MS Jet database engine. If you want to write more complicated SQL filters, you need to learn SQL language. Please, take a look on SQLite reference page on: http://www.sqlite.org/lang.html
Anonymous wrote:1) AddedLastMonth|SQL filter:DateDiff('d',Songs.DateAdded,Now)<30\<date added|sort order:desc>\<Album>
Here is same mask for MM3:

Code: Select all

AddedLastMonth|SQL filter:(julianday(date('now', 'localtime')) - julianday('1899-12-30 12:00') - julianday(date(Songs.DateAdded))) < 30\<date added|sort order:desc>\<Album>
Anonymous wrote:2) Neue Alben|filter:playlist in ('Neue Alben')\<Album and artist>
As I wrote in the first post, with 1.6 version of the script names of fields should be enclosed by <>. So, instead of Playlist, you should write <Playlist>. Field names should be enclosed only inside of Filter qualifiers, not inside of aggregate functions (Sum,...) of Sort By or Statistic qualifiers! The Album and artist field name is changed to Album Artist with Album.
Anonymous wrote:3) Incomplete Albums|SQL filter: Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(SongOrder) <> (Max(SongOrder+1)) AND Count(SongOrder) > 1)|show tracks:no\<Album Artist>\<Album>

Invalid mask
Hmm. This is correct mask, but it works only with MM2 and MM3 alpha versions. Since MM3 beta the SongOrder field is renamed to TrackNumber. If you made the database with alpha version this mask could work even with newer MM3 versions. You should take in account that TrackNumer = SongOrder + 1.
Anonymous wrote:3) Scarcely played albums\<album|sort by:sum(played)|top:10 percent|min tracks:5>
As I wrote in the first post, Percent argument of Top qualifier is not supported by SQLite. If you omit this word, you could get specified number of items, e.g. 10.

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Mon Jan 07, 2008 8:41 pm

I really appreciate your work on this, ZvezdanD!
You have taken this script to another level.

I also think that you can completely drop support for MM2 in future versions of this script.
It's would also be nice with an MMIP installer for easier install. :wink:

Thanks a lot for your work!
/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

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

Post by ZvezdanD » Mon Jan 07, 2008 8:46 pm

Anonymous wrote:I'm really interested in finding out how I might be able to sort all of the custom fields 1-5 in a single field.
...
My intention with this is to be able to give each track multiple style/genres
This is not possible with the current version of the script. Maybe you should use Classifications fields (Mood, Occasion,...) for such thing because they support multiple values for each track.

Since there are many similar requests, I think MM developers should consider to implement multi-item behavior for Custom fields as they did with Artist, Genre, Mood,...

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

Post by ZvezdanD » Mon Jan 07, 2008 8:59 pm

Bex wrote:I really appreciate your work on this, ZvezdanD!
You have taken this script to another level.
I am really glad when I hear something like this, especially from such great scripter as you are. Thank you very much. :)
Bex wrote:I also think that you can completely drop support for MM2 in future versions of this script.
It's would also be nice with an MMIP installer for easier install. :wink:
I planed to make installer for the next major upgrade. MM2 will be supported until there is not to much trouble for this, but unfortunately there is one big trouble as I wrote in the first post. I could not believe how much SQLite is faster than MS Jet.

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

Post by ZvezdanD » Mon Jan 07, 2008 9:04 pm

BTW, mentioned mask AddedLastMonth could be written much shorter and it will work with both MM2 and MM3. Instead of SQL Filter, it should be used Filter qualifier:

Code: Select all

AddedLastMonth|Filter:<Days Since Added> < 30\<date added|sort order:desc>\<Album>

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Mon Jan 07, 2008 9:08 pm

Cheers!
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

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

Post by ZvezdanD » Mon Jan 07, 2008 9:33 pm

Anonymous wrote:in case the limitation of Sort By to a single argument still aplies, which is really unclear from reading the first post
Sorry, but English is not my native language.

Sort by and Statistic qualifiers both accept multiple arguments since v1.5. Difference is in the fact that only with the Statistic there are displayed all stated values, but with the Sort By you could get displayed only one value (other arguments of Sort By qualifier are used for defining sorting order as multiple keys). With v1.5 it was displayed only first argument of Sort By, but since 1.6 you could define which of them would be displayed.

So, let say that I defined the Custom 1 field with Live, Studio, Compilation and similar values. I could sort albums first by this field and then by a Year, all of them on the same node level. With Show Sort Key qualifier I could define to display Year in the front of each album, not Custom field even if it is first sorting key.

If you need more explanations, please let me know.

Guest

OK

Post by Guest » Tue Jan 08, 2008 10:50 am

ZvezdanD, thanks for your detailed answer to my messy old MagicNodes. All of them are working now, I use your shorter AddedLastMonth suggestion, and also understand the sort by / statistics issue.

regarding "Incomplete Albums": indeed I made the database with MM3 alpha version, but I changed to TrackNumber anyways. I got completely different results using SongOrder compared to TrackNumber, even considering TrackNubmer = SongOrder + 1

regarding "Neue Alben" -- sorry for that, that was really my stupidity, I fixed that myself last night, as I mentioned above.

Thanks! Claude

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Tue Jan 08, 2008 10:54 am

Regarding "Incomplete Albums", try my Tagging Inconsistencies Script where you find them as "Missing Tracks" plus tons of other errors. Link in signature.
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

Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Tue Jan 08, 2008 11:03 am

I have one small request, on line 1693 is a line " SDB.Objects("CustomNodeRoot").expanded = True" that causes the magic node to expand on startup...

I can't speak for anyone else, but this drives me crazy.. I have to comment it out every time :o It never seemed to affect anything (I even had it commented out in the last official versions).

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

Post by ZvezdanD » Tue Jan 08, 2008 11:49 am

Teknojnky wrote:I can't speak for anyone else, but this drives me crazy.
It drives me crazy too, but this is a default behavior of MM3, even for built-in MM nodes - if you exit MM with selected Artist node for example, after restart it will be expanded. If MM developers add an option in INI file to switch this behavior on/off, I could include detection for it. So, I suggest that you start agitation or poll about that in the MM Wishlist forum.

Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Tue Jan 08, 2008 12:51 pm

well I fix the library expanded and startup node via tweakmonkey...

and if you comment out that line, magic nodes does not expand on startup

Post Reply