Magic Nodes 3.0 w/ 245 masks & real GUI (2009-09-08) [MM2+3]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Magic Nodes 3.0 w/ 245 masks & real GUI (2009-09-08) [MM2+3]

Postby ZvezdanD on Tue Jul 17, 2007 12:15 pm

Description:

Nodes are the elements of the navigation tree structure of the MediaMonkey interface. Magic Nodes is a script which lets you create new tree nodes to help you manage your music library. New nodes could be created in an intuitive and highly configurable way using masks which are loosely based on the way MediaMonkey auto-organize works. This script is based on the original version 1.3b by Pablo Shmerkin, but it is almost completely rewritten and drastically improved.

Download:

http://solair.eunet.yu/~zvezdand/MagicNodes.htm

If you are the first time user, it is recommend that you read the manual in the PDF format written by Rick Parsons (currently covers v1.7.6.2): http://west-penwith.org.uk/misc/MagicNodes.pdf

If you are using some skin which is not supported by default, you could take a look of MN skin styles made by nynaevelan at the next forum thread. There is also a thread with the collection of most useful/wanted MN masks: http://www.mediamonkey.com/forum/viewtopic.php?t=26906

Image

Installation:
  • For MediaMonkey 3.x, just double-click on the MagicNodes.mmip file; if you are on Vista make sure you have MM3 set to "Run as Administrator"; if you downloaded the installation package with IE7 and it changed its extension to a .zip, you should first change it back to a .mmip.
  • For MediaMonkey 2.x, rename a .mmip extension to a .zip, extract MagicNodes.vbs and MagicNodes.ini files to the MediaMonkey's "Scripts\Auto" folder and restart MM program.
Note: The MagicNodes.ini file is used only after the installation. During its work, the Magic Nodes script stores masks into the MediaMonkey.ini file.

Important:

Version 2.0 of this script has an advanced graphical user interface which uses dynamically populated dropdown lists. Skinned versions of MediaMonkey from 3.0 till 3.1 have very serious bug with dropdown lists which sometimes results with unresponsive program and 100% CPU usage. All versions prior of 3.1 also have very serious bug when reading keys from .ini files which are longer than 2048 characters (some Magic Nodes masks could be longer) and this bug sometimes results with disappeared program during execution. So, it is highly recommended to switch to version 3.1 of MediaMonkey as soon as possible. If you want to test your version of program on mentioned bugs, you could get test scripts from the next forum.

Since v1.7.6 of this script there is an installation package. If you have already installed some older version (those with version number in the file name), you should manually remove it from the Script/Auto folder before the installation.

FAQ:
  • Q. Is there a way that when starting MM3 the Magic Nodes tree is NOT expanded?
  • A. Go to Tools / Options / General - Magic Nodes Options, check Skip expanding of the Magic Nodes branch during start-up. Alternatively you could put all your Magic nodes into some new group instead of the Magic Nodes branch. You only need to put the Group pseudo-field in the front of each mask and leave the Magic Nodes branch empty.

  • Q. If I ... (do something), the Magic Nodes nodes disappear. I can get it to reappear by creating a new Magic Node. Any ideas on what else to do to keep Magic Nodes visible?
  • A. You are most probably unchecked Magic Nodes in the Tools / Options / Library - Filter and Views / None (Show all Tracks) / Configure / Default View Options dialog. There exists a faster way to get the mentioned dialog box: right click on the tree panel, select Options / Choose Tree nodes.

  • Q. In the MM artist/album node I can rename the album directly in the node. If I have a Magic node with same fields I can't rename album in the tree. Is this peculiar to MN or should I alter something?
  • A. Go to Tools / Options / General - Magic Nodes Options, check on the option Allow modifying of fields data by drag & drop or renaming tree nodes. By the way, drag & drop and renaming are not allowed for nodes which contain only part of field, i.e. nodes with Left of/Right of/Trim/SubStr/Split by qualifiers."

  • Q: How do I get the mask to skip unrated tracks and just make an average of rated ones? Right now it will only display averages for artists or albums which have all their tracks rated.
  • A: If there are Sort by or Statistic fields that are undefined, then the function is NOT applied by default. For example: <Album|Sort by:avg(Rating)> only displays the average rating for albums where ALL songs have been rated. For the others, just the album in alphabetical order is displayed. If you want to display these values even for those albums which only have some tracks rated, go to Tools / Options / General - Magic Nodes Options, and uncheck Display sorting/statistic results only if all values are defined.

  • Q. Is there any way to stop Magic Nodes from rounding Ratings off to the nearest 0.5 stars? I want to get finer graded values with 2 decimal digits.
  • A. Go to Tools / Options / General - Magic Nodes Options, uncheck Display sorting/statistic results for Rating rounded to the nearest half star.

  • Q. My Album Artist mask lists bands beginning with "the" (e.g. The Rolling Stones) under the letter R, as "The Rolling Stones". How can I get it to still list it under R, but as "Rolling Stones, the"?
  • A. Go to Tools / Options / General - Magic Nodes Options, check on the option Move prefixes to the end when sorting by Artist, Album Artist or Original Artist.

  • Q. I just re-installed MN after a monkey re-install and it only has 83 presets vs. the 170 mentioned.
  • A. By default, the Magic Nodes script installs only initial 83 masks. If you want to add 90 additional masks, you should open the Edit /Magic Nodes Export/Import dialog box, choose File, specify c:\Program Files\MediaMonkey\Scripts\Auto\MN-Onenonymous.ini file and click on the Import button.

What is new:

v3.0.3 - 2009-09-08
- Fixed: groups not created inside of the Library branch until restart (bug introduced in v2.2.2).

v3.0.2 - 2009-09-08
- Fixed: error with the Statistic and Show if empty qualifiers used on the global level;
- Fixed: error with the filter: <Any> = '' (although comparing <Any> field with empty string has not too much sense);
- Fixed: space character on the begin/end of the sub-string when using Split by:-1.

v3.0.1 - 2009-09-07
- Fixed: error during the first install.

v3.0 - 2009-09-06
- Added: possibility to create playlists using Child of:Playlists and Position:Child (a full description at the Information section);
- Added: Refresh Magic Node option to the tree context menu when you right-click on some Magic node in the Playlists branch;
- Added: Modeless MN Settings dialog box (allowed access to other parts of the program) option;
- Added: Expand node after applying the save option, even if it is collapsed option;
- Added: <Any> pseudo-field for the Filter qualifier (using fields specified on the Search tab in the Options dialog box);
- Added: Cover Description, DateTime Played, DateTime Last Played, DateTime Added and DateTime Modified fields;
- Added: Show ordinal numbers option and corresponding Show rank qualifier;
- Added: possibility to use Show if empty option/qualifier for all local nodes except the last (deepest) one, with the hidden plus sign for nodes without sub-nodes; especially useful when Unknown qualifier for the next level is set to No, e.g. <Album|Show if empty:Yes>\<Disc Number|Unknown:No> (mask examples - Genres and sub-genres and Drives & Folders in the Split examples branch);
- Added: possibility to use Split by/Split part qualifiers in combination with Left of/Right of qualifiers (mask example - Sub-folders of Music folder in the Split examples branch);
- Added: support for multiple values with fields that are not multi-items, e.g. Involved people or CustomX, using Split by qualifier and Split part:-1 (mask example - Multi-item Custom 1 field in the Split examples branch);
- Added: support for multiple values with several levels of categorization, e.g. each person in the Involved people field could belong to some involvement group and could have one or more roles (mask examples - Involved People by... in the Split examples branch);
- Added: many new masks, some old improved and better organized;
- Added/Changed: drive letter to the Path field;
- Changed: Save button now have 3 possible states depending of modifications in the Settings dialog - Rename, Update and Add (it is now much easier to create a new mask based on some existing one);
- Improved: speed of Count(Items) function, it is now as fast as Count(some_field) [MM3];
- Fixed: Statistic qualifier used on the global (caption) level with the Filter qualifier.

v2.7 - 2009-06-29
- Added: Multi Artist, Multi Album Artist, Multi Composer, Multi Conductor, Multi Lyricist, Multi Genre, Multi Tempo, Multi Mood, Multi Occasion and Multi Quality fields (e.g., the <Artist> node could have two sub-nodes "David Bowie" and "Queen" for the song "Under Preasure" , but the <Multi Artist> node would have only one sub-node "David Bowie; Queen" for the same song; this is especially useful if you have multi-item genres and want to get the nested display of nodes with genres and sub-genres using Split by/Split part qualifiers, for example: Genres and Sub-Genres\<Multi Genre|Split by:;>\<Multi Genre|Split by:;|Split part:1>\<Multi Genre|Split by:;|Split part:2>) [MM3].

v2.6 - 2009-06-16
- Added: Date and Original Date fields for the Sort by/Statistic qualifiers (e.g. if you want correct sorting order when you have several albums released same year) [MM3];
- Added: possibility to use Substring start/Trim qualifiers in combination with Left of/Right of/Split by qualifiers (e.g. if you have Custom 1 field like "some_fields added.2007-08-31 some_other_fields" you could write Right of:added.|Substr:6|Trim:2 to get the month part);
- Fixed: Statistic qualifier used on the global (caption) level together with the Filter qualifier;
- Fixed: disapeared program during startup in some rare situations with MM v 3.0.x (upgrade to MM v3.1.x is recommended anyway);
- Fixed: editing of node captions on a local level (e.g. the Composer name).

v2.5 - 2009-05-14
- Improved: skin styles;
- Fixed: error when "(" and ")" are used with Left Of/Right Of/Right Until qualifiers.

v2.4.1 - 2009-05-11
- Fixed: error with Sort by/Statistic:Count(some_field) when used with some specific filters;
- Fixed: sufixes like tracks, files, kbps, kHz, ... not displayed with localized versions of Windows;
- Fixed: error when renaming captions of Group nodes using tree view (bug introduced in 2.0);
- Fixed: option "Move prefixes to the end when sorting by Artist" (bug introduced in 2.0.5).

v2.4 - 2009-02-20
- Added: Date Played field (whenever some track is played, not only for the last played time);
- Added: Play Length field (total playing time of tracks, same as Played * Length);
- Added: WAvg custom aggregate function (weighted average, could be used with same fields as other aggregate functions, but most useful with Played, Rating and Bitrate, e.g. WAvg(Played) is same as Sum(Played * Length) / Sum(Length)).

v2.3 - 2009-02-02
- Added: auto-repeat for Up/Down buttons in the Export/Import dialog box with MM 3.1.1220 or up;
- Added: word-wrap option for display of masks in the Export/Import dialog box;
- Added: alphabetical sort of masks in the Export/Import dialog box by click on the table header;
- Added: Original Decade field.

v2.2.3 - 2009-01-24
- Fixed: removal of the first node (the topmost one before the Now Playing branch).

v2.2.2 - 2009-01-23
- Fixed: duplicated display of nodes in some situations.

v2.2.1 - 2009-01-21
- Fixed: duplicated display of groups in some situations.

v2.2 - 2009-01-20
- Improved: look of dialog boxes with some skins (custom configurable with CSS files);
- Added: some new masks.

v2.1 - 2009-01-13
- Added: option Show node if empty and corresponding qualifier Show if empty which could be used only on the global (caption) level when it is a child of the Magic Nodes or belongs to some group.

v2.0.8 - 2009-01-11
- Fixed: installation procedure.

v2.0.7 - 2009-01-09
- Fixed: incorect display when the Ignore prefixes settings has "(" character, and probably some of SQL queries which have it as a part of the string.

v2.0.6 - 2009-01-07
- Fixed: disapearing of nodes when SQL editor is allowed with MM versions older than 3.1 (bug introduced in 2.0.4).

v2.0.5 - 2009-01-07
- Fixed: the Ignore prefixes option with some characters (' ( ) [ ]).

v2.0.4 - 2009-01-01
- Fixed: memory leaks with dialog boxes in MM versions older than 3.1, excluding the Options dialog (anyway, upgrade to MM 3.1.0.1207 or higher is recommended since it has resolved memory leaks).

v2.0.3 - 2008-12-21
- Fixed: Show tracks qualifier;
- Fixed: the "$" sign used in the Filter expression.

v2.0.2 - 2008-12-16
- Fixed: error with Unknown node and some fields when displaying part of field (Trim/Left of/Substr/...);
- Regression: speed of generating nodes was drastically slowed down with introduced progress bar, especially for large number of sub-nodes.

v2.0.1 - 2008-12-14
- Fixed: error during installation and when adding/deleting masks if they are more than 100;
- Fixed: truncated bottom buttons with some skins.

v2.0 - 2008-12-13
- Added: real GUI! (more information about it in the Information section of this post);
- Added: export/import/move up/down of masks;
- Added: SQL editor when expanding/selecting nodes;
- Added: Show nodes qualifier which could be used with the last (bottom) node's level;
- Improved and fixed: to many to mention.

v1.8 - 2008-11-08
- Added: Split by and Split part qualifiers (argument for Split part is an integer >= 0, e.g. Split by:\\|Split part:1);
- Added: possibility to specify a backslash with Left/Right of/until/Split by qualifiers (should be typed as double backslashes, e.g. Right of:\\My Music\\Rock);
- Added: Sort Order:Random (or Sort Order:Rnd), most useful in combination with the Top qualifier;
- Added: possibility to use Count aggregate function with any field (please read information about that in the Information section below) [MM3];
- Fixed: Top qualifier;
- Fixed: drag & drop for some fields;
- Fixed: renaming of nodes with Album Artist with Album, Album with Album Artist (only the album part of a field is renaming) and Disc Number qualifiers.

v1.7.8.4 - 2008-10-30
- Fixed: Drag & drop and renaming of nodes for artists with prefixes (The, ...) when the option "Move prefixes to the end ..." are turned on [MM3];
- Fixed: Drag & drop and renaming of nodes (broken since 1.7.5.2) [MM2].

v1.7.8.3 - 2008-10-26
- Added: detection when the active MM filter is changed with auto-folding of nodes (similar as MM built-in nodes).

v1.7.8.2 - 2008-10-23
- Fixed: combination of Filter, SQL Filter and MM filter qualifiers containing expressions with OR operator.

v1.7.8.1 - 2008-10-12
- Regression: (Exclusive) Left/Right of qualifiers which are broken in the last update.

v1.7.8 - 2008-10-08
- Added: Decade, Time since added and Time since modified fields;
- Added: SubString Start qualifier for taking a part of a field from specified position (could be shortened to SubStr Start or even SubStr, e.g. SubStr:4; if a negative number is specified, the first character of the substring is found by counting from the right rather than the left; the lenght of the substring could be specified with the Trim qualifier);
- Added: MM filter global qualifier for specifying the MediaMonkey filter (could be combined with the Magic Nodes' filters; if not specified, the current MM filter is used) [MM3];
- Added: option "Move prefixes to the end when sorting by Artist" to the Options dialog;
- Fixed: usage of the current MM filter when the last node in some branch is selected [MM3];
- Fixed: display when "Ignore prefixes when sorting by Artist" is unchecked.

v1.7.7 - 2008-06-29
- Added: option sheet in the Options dialog box with several options:
- Added: option Skip expanding of the Magic Nodes branch during start-up;
- Added: option Allow modifying of fields data by drag & drop or renaming tree nodes;
- Added: option Display sorting/statistic results only if all values are defined;
- Added: option Display sorting/statistic results for Rating rounded to the nearest half star;
- Improved: installation process with merging of predefined masks;
- Improved: FirstDayOfWeek determined from the system locale;
- Fixed: expanding/not expanding of Magic nodes during start-up (nasty MM3);
- Fixed: error "This key is already associated..." when Custom field has improper name;
- Fixed: error with the Delete All Magic Nodes command.

v1.7.6.2 - 2008-06-19
- Fixed: Right of in combination with (Exclusive) Right until qualifier;
- Fixed: merging new masks with old ones after installation for multi-user accounts.

v1.7.6.1 - 2008-06-09
- Fixed: Days since added/last played/modified.

v1.7.6 - 2008-05-27
- Added: installation package with 50 predefined masks in INI file;
- Added: support for the Time since last played field with Sort by/Statistic qualifiers (calculation based on seconds);
- Fixed: adding/removing nodes from groups which are children of built-in MM nodes, e.g. Files To Edit;
- Fixed: corrupting masks when renaming nodes on the global level (i.e. Caption nodes).

v1.7.5.4 - 2008-05-19
- Fixed: incorrect "fix" for incorrect display of Avg(Rating) with the Sort by/Statistic qualifiers for some locales.

v1.7.5.3 - 2008-05-16
- Fixed: incorrect display of Avg(Rating) with the Sort by/Statistic qualifiers for some locales.

v1.7.5.2 - 2008-05-07
- Fixed: updating tags into files after drag & drop or renaming nodes.

v1.7.5.1 - 2008-04-07
- Fixed: multiple display of same tracks in the tracklist from multi-item artists;
- Fixed: character ">" on the end of the Filter expression;
- Fixed: Name, Icon and probably some another grouping qualifiers;
- Fixed: error "wrong number of arguments to function substr" for older MM 3.0.x versions (< 3.0.1.1120 RC-5).

v1.7.5 - 2008-03-23
- Added: File Name and Folder fields [MM3];
- Improved: Format and Disc number fields [MM3];
- Fixed: Filter expressions with OR operator;
- Fixed: Count(Items) when used on the first node level.

Example:
Path = ':\My Music\Rock\Pink Floyd\Dark Side of the Moon\03 - Time.mp3'
Folder = ':\My Music\Rock\Pink Floyd\Dark Side of the Moon\'
File Name = '03 - Time'
Format = 'mp3'

v1.7.4.2 - 2008-03-05
- Fixed: bug which sometimes displays an error message during start-up;
- Fixed: descending order with the last sorting key.

v1.7.4.1 - 2008-02-09
-Fixed: weird VB Script's bug, which sometimes is manifesting with the Group pseudo-field.

v1.7.4 - 2008-02-04
- Added: 10 new fields - Grouping (built-in MM field which has nothing in common with existing pseudo-field Group), Weeks since last played/added/modified, Months since last played/added/modified and Years since last played/added/modified (when used with Filter qualifier 0 is current week/month/year, 1 is previous week/month/year, and so on, e.g. <Weeks since added> = 1, which is not same as <Days since added> Between 7 And 14; default value for the first day of week is Sunday, but if you want to use some another day, please edit the iFirstDayOfWeek constant on the begin of the script file).
- Fixed: renaming of group/root caption, now possible editing of existing text.

v1.7.3 - 2008-02-01
- Added: possibility to rename/drag&drop to the node on any level (until now, renaming was possible only to root/group levels, but not fields, and drag&drop was possible only to the first level field), drag&drop updates all nested fields, e.g. if you drop selected tracks to the node on 3rd level, it will be updated 1st and 2nd level fields as well;
- Added: several new fields for drag&drop (allowed fields: Album, Album Artist, Album Artist with Album, Album with Album Artist, Artist, BPM, Comment, Composer, Conductor, Copyright, Custom 1-5, Disc Number, Encoder, Genre, InvolvedPeople, ISRC, Lyricist, Mood, Occasion, Original Artist, Original Lyricist, Original Year, Publisher, Quality, Rating, Tempo, Year), trimmed nodes are not allowed (those which contain Trim/Left of/Right of qualifiers).
- Warning: drag&drop and renaming operations modify the content of the database. You are strongly encouraged to backup your database.

v1.7.2 - 2008-01-28
- Added: using of MM built-in filters in the combination with Magic Nodes' filters [MM3];
- Added: the warning text to the Create/Edit dialog when the entered mask is not correct;
- Added: possibility to display sorting/statistical result, even when some value of the field is negative, i.e unknown (bSortStatOnlyIfPositive = False);
- Fixed: sorting/statistic display when Avg function is used with some fields.

v1.7.1 - 2008-01-26
- Added: Exclusive Right until qualifier (for full description, please read the Information section below);
- Added: possibility for multiple arguments with all Left/Right qualifiers (separated by "|", for full description, please read the Information section below);
- Added: Path field as a node (until now it is used only for statistics/filters, be extremely careful with this because it could return too many sub-nodes and hang the program, this field could be useful only with Left/Right qualifiers);
- Fixed: errors with Left/Right qualifiers in some cases;
- Fixed: error during loading in some cases (with some specific masks);
- Fixed: Icon with numerical values (0 - 57) as global qualifier for the root level.

v1.7 - 2008-01-23
- Added: grouping with the unlimited numbers of hierarchy level, using the Group pseudo-fields in the front of the existing mask (for full description please read the PDF manual or the Information section below);
- Added: the Position qualifier for specifying the location of the node relative to its parent (for full description please read the PDF manual or the Information section below);
- Added: Exclusive Left of, Exclusive Right of and Right until qualifiers (for full description please read the PDF manual or the information section below);
- Added: display of statistics for the root node, i.e. Statistic qualifier could be specified as global qualifier (please be careful with this, it could drastically slow down expanding of nodes);
- Added: display of Unknown node with Trim, (Exclusive) Left of and (Exclusive) Right of qualifiers;
- Added: display of any MM tree icon value (0 - 57), every Group could have its own Icon qualifier;
- Added: on-line checking of the correct syntax while you are typing the mask, the OK button is enabled only when the entered mask is correct;
- Fixed: editing/removing nodes which are not inside of the Magic Nodes branch, also removed annoying message about a need for MM restart;
- Fixed: display with truncated all specified characters of the Right of qualifier;
- Changed: Left of qualifier now returns all field values, even those which don't contain specified string, to be consistent with Right of qualifier (if you want old behavior of the Left of qualifier you should use new Exclusive Left of qualifier).

v1.6.2.4 - 2008-01-15
- Fixed: Left of and Right of qualifiers used with small case letters [MM3];
- Changed: display of Bitrate nodes rounded to multiply of 16 kbps (instead of 32 kbps).

v1.6.2.3 - 2008-01-14
- Added: possibility to put one space character after the name of qualifier for better readability (e.g. Statistic: Count(All));
- Fixed: incorrect display of Avg(Rating) with Sort by/Statistic qualifiers.

v1.6.2.2 - 2008-01-12
- Added: check for TweakMonkey settings (Enable startup node) [MM3];
- Fixed: expand of the node which was last selected on exit (only the first level) [MM3].

v1.6.2.1 - 2008-01-11
- Fixed: Show tracks:no when it is on the global level (root node).

v1.6.2 - 2008-01-08
- Added: item names for Statistic:Count(Items);
- Fixed: statistics and display of nodes/tracks for tracks with entered multiple values in multi-item fields [MM3];
- Fixed: error with Album with Album Artist and Album Artist with Album fields [MM2];
- Fixed: error with Sort By qualifier;
- Fixed: display of Unknown node for several fields (Artist, Album, Genre,...);
- Fixed: formated display for several fields;
- Fixed: display of the Custom 4 and 5 fields [MM3].

v1.6.1 - 2008-01-03
- Added: Send To, Edit and Delete Magic Node options to the Tree window context menu;
- Fixed: Trim and Left of qualifiers;
- Fixed: some incorrect Rating values.

v1.6 - 2007-12-31
- Added: Show Sort Key qualifier to determine which sorting key should be displayed if Sort By is used with multiple keys (e.g. Show Sort Key:n, where n is from 1 to the number of sorting keys or 0 if sorting value shouldn't be displayed at all, 1 is default value);
- Added: automatic use of the character '/' for separation of statistic items for same or similar fields (e.g. result for Statistic:Min(Length), Sum(Length) will be displayed as xx/yy MB instead of xx MB, yy MB), but statistics for different fields are displayed separated with the comma - this only has an effect on displayed result, arguments in the user masks still should be separated as before;
- Fixed: statistics and display of nodes/tracks when using Unknown, Min Tracks and/or Max Tracks qualifiers (Top qualifier still unresolved);
- Fixed: statistics for Unknown node;
- Fixed: display of statistics/sorting information with some fields (Rating, Length,...);
- Fixed: date/time functions [MM3];
- Fixed & changed: fields inside of the Filter qualifier need to be surrounded by < and >, but this qualifier now works correctly (e.g. Filter:Album Artist = 'Various Artists' didn't worked, instead it should be written as Filter:<Album Artist> = 'Various Artists');
- Changed: name of the Album and Artist field to the Album with Album Artist, name of the Album and Year field to the Album Artist with Album (a reason for this is because names could be misinterpreted during parsing);
- Changed: the Album Artist with Album field (former Album and Year) initially will not display year information (if you need such behavior, please use the same field with Statistic:Max(Year));
- Changed: the Tracks argument for statistics/sorting (similar as All, but instead of the text 'files' it show 'tracks').

v1.5.0.2 - 2007-12-20
- Fixed: sorting with the <I>Custom</I> fields;
- Fixed: displaying of the genre with ID = 0 [MM3].

v1.5.0.1 - 2007-12-17
- Added: Track Number and Disc Number fields for statistic/sorting (e.g. <Album|Statistic:Max(Track Number)> to display a number of the last track from each album) - there could be a problem if someone use alphanumeric characters for disc/track numbers, as it is possible with MM3;
- Fixed: bug which is manifesting with some nodes.

v1w5 - 2007-12-17
- Added: multiple arguments for Statistic qualifier separated with the comma character (e.g. Statistic:Count(All), Sum(File Size), Sum(Length));
- Added: multiple sorting keys with Sort by qualifier (similar usage as Statistic, with a possibility to specify sorting order for each sort key, e.g. Sort by:Count(All) Asc, Max(Length) Desc, only first sorting key is displayed);
- Added: keyword Items for Statistic qualifier to get the number of node sub-items (e.g. <Artist|Statistic:Count(Items)>\<Album> for the number of albums for each artist) - a little bit slow, so be a careful and don't use it on top level nodes with too many sub-items;
- Added: several new fields for displaying (Disc Number,...) and sorting (Custom,...);
- Added: support for all multi-item fields (Artist, Genre, Mood,...) [MM3];
- Fixed: Unknown node;
- Fixed: sorted display of items in the Tree list by the number of tracks with Sort by:Count(All);
- Fixed: sorting items with underscore ('_') and maybe some another characters [MM3];
- Fixed: problem with a backslash ('\') inside of the Filter and SQL Filter qualifiers (it can be used now between quotes, e.g. SongPath Like '%\My music\%');
- Fixed: problem with a vertical line ('|') inside of the Filter and SQL Filter qualifiers (it can be used now for string concatenation in MM3);
- Fixed: Artist node wrongly displayed composers, conductors...[MM3];
- Fixed: problem with Artist and Album Artist within same node (e.g. Compilations|Filter:Album Artist = 'Various'\<Artist>\<Album>);
- Fixed: problem with several fields which couldn't worked together in the same node (e.g. Mood/Tempo..., Artist/Composer/...);
- ...

v1.4.3.1 - 2007-07-27
- Fixed: error after click on the parent node with filtered display [MM2].

v1.4.3 - 2007-07-26
- Fixed: duplicated albums in the tree list with <Album and Year> when some albums have songs with different year;
- Fixed: not filtered display of tracks in the tracks window after selecting parent node when Top, Min Tracks and Max Tracks qualifiers are used;
- Fixed: All node;
- Fixed: Left of and Right of qualifiers [MM3];
- Fixed: <Leveling> [MM3].

v1.4.2 - 2007-07-17
- Added: Statistic qualifier for displaying some statistical information about items in the Tree list; e.g. to display number of tracks for each album;
- Added: some new fields for sorting (Length, File Size and Leveling) as well as for Statistic qualifier.

v1.4.1 - 2007-07-14
- Fixed: some small bugs.

v1.4.0 - 2007-07-11
- Added: support for MediaMonkey 3.0.

v1.3c - 2006-08-18
- Fixed: incorrect sorting of Artists with prefixes ("The", "A",...) in some cases (e.g. when Trim qualifier is used).

-------------------------------------------------------------------------------------

Information about 3.0 version:

The main addition to this version is a possibility to create static playlists. Well, I think they are on the half way between static playlists and auto-playlists. Instead of other "normal" Magic nodes which are updated every time when you expand or select them, Magic nodes in the Playlists branch are updated only when you choose the Refresh Magic Nodes option from the tree context menu (or if you change corresponding mask, of course). You could have nested playlists using the Group option in the Settings dialog. To define some mask as playlist you should choose Position: Child of - Playlists (first select Playlists from the second dropdown list, then Child of from the first one). The limitation is that you cannot create local node levels in the playlist branch, only group and global. So, you could create a node with specified filter, but such node cannot contain sub-nodes. Well, you could add sub-levels, but they would not be created/displayed. Show tracks, Statistic and Icon qualifiers also have not any effect on those nodes. Magic nodes from the Playlists branch should be removed or renamed using the MN Settings dialog box (or using the Delete Magic Node option from the context menu if you want to remove a mask/node) - if you remove /rename node using options from the context menu with same name or by press on the Delete/F2 keys, a mask would not be updated.

The second addition to this version which needs explanation is a possibility to use (almost) all fields as multi-item, even if they are not enabled as multi-item by MM. You should enter the splitting character with the Split by qualifier and you should specify -1 for the Split part qualifier. If you specify 0 or some positive value for the Split part qualifier, you would get exactly that part of the field string as before. So, you could use for example Custom1 field for languages and if some tracks has two or more languages in it, all of them would be displayed for that track. The limitation is that you cannot use Sort by/Statistic qualifiers as well as almost none Show... qualifiers.

The third addition is some kind of an extension to the previous. You could specify several categorization levels which is most useful with the Involved People field. So, you could have involvement groups: Band member, Guest musician, Production..., and you could have roles: Vocals, Guitars, Bass... as in the next example: Band member-Vocals:Bono;Band member-Guitars:The Edge;Band member-Bass:Adam Clayton;Band member-Drums:Larry Mullen, Jr.;Guest musician-Guitars:B.B. King;Guest musician-Vocals:B.B. King. You should define the first level of categorization using the Split by:;, Split part:-1 and Exclusive Left of:-. The second level should have Split by:;, Split part:-1, Exclusive Right of:- and Exclusive Right until::. Finally, you could get persons using Split by:;, Split part:-1 and Exclusive Right of:: Of course, you could specify only one level of categorization, e.g. Vocals:Bono;Guitars:The Edge;Bass:Adam Clayton;Drums:Larry Mullen, Jr. Just take a look at sample masks from the Split examples branch.

-------------------------------------------------------------------------------------

Information about 2.0 version:

Just take a look... :wink:

More than 420 KB of source code! Almost twice in size of the previous version, 7 times of the last official version, almost completely rewritten and drastically improved!

Well, I though it would be obvious, but maybe I need to mention several things. First, there are three different ways to edit some existing mask:
1. Edit / Magic Nodes Settings, then choose mask's caption from the Caption dropdown list, edit it and click on the Save button.
2. Edit / Magic Nodes Export/Import, then click on the number of the needed mask from the # column, edit it and click on the OK button.
3. right-click on the needed node in the tree panel, choose Edit Magic Node, then edit mask and click on the OK button.

If you want to create a new mask, you should use Magic Nodes Settings dialog - just click on the New button, type some text in the Caption field and set some fields and its qualifiers.

If you want to create a new mask based on some existing mask by modifying some fields/qualifiers, you should use same dialog, choose initial mask from the Caption dropdown list, change its name and make necessary modifications on parameters; when you finish with them you should close this dialog box and enter it again (note number 0/xx in the Move label), just after that you should click on the Save button and mask will be saved as a new, not overwriting the initial one.

All controls in dialogs are implemented and there are not a fake one! If some control is currently disabled this means that it is not active in that context. For example, Save/OK buttons are not enabled until you make some change in a dialog. This also stand for SQL editor - if you make some change on the SQL query, you could choose the OK button to execute modified query, but if you click on the Cancel button this means that you want to execute initial query before its modification, but not to abort started action. Some qualifiers are active only with some levels of fields or in some combination, for example Trim/Substr. are mutually exclusive with Left of/Right of and Split by/Split part qualifiers; Icon control is active only for global (caption) and group levels, but not for field levels; Sort keys controls are active only for field levels, but not for global/group levels...

I think that almost all existing features with fields and qualifiers are supported with this new GUI, even specifying multiple sorting keys or statistic arguments with listboxes. Only one feature which is not implemented in some easier way e.g. with some kind of list for multiple arguments of Left of/Right of qualifiers - you still could use the "|" symbol to separate them if there are many (for example, you could type featuring|feat.|vs|presents). The backslash could be used with Left of/Right of/Split by - it is enough to type it once, but it is stored in the mask as two backslash characters. The "<" and ">" characters are not allowed for Left of/Right of/Split by qualifiers - if you try to type them, you would get an invalid mask and only way to continue with its modification is to edit the mask in the Mask edit box.

The new Show node qualifier could be used with the last (bottom) level of some branch. It is most useful with Sort order:Random when you don't want to display nodes, but only tracks in the tracklist. However, it could be also used if you want to display only global (caption) node when it contain some field sub-node which contain some filtering qualifiers (e.g. Top, Min tracks, Max tracks).

-------------------------------------------------------------------------------------

Information about 1.8 version:

Most notable additions are Split by and Split part qualifiers. Split by should have specified a string argument and Split part should have an integer greater or equal to 0. For example, if I have <Path> = ':\My Music\Rock\Pink Floyd', with the mask which contain <Path|Split by:\\|Split part:2> I would get "Rock" as a result (the leftmost part before the first "\" is 0, the second part is 1, and so on). The backslash could be specified with Left/Right of/until/Split by qualifiers, but as double characters. Please beware - the Split by qualifier is not very fast, especially for larger Split part arguments.

Next added is a possibility to specify Random or Rnd as argument for the Sort order qualifier which is most useful when combined with the Top qualifier. I think its purpose is self-explanatory, but just to mention - it could be used with any field. For example, <Artist|Sort order:Random|Top:10> would return 10 random artists. If you want 10 random tracks, you could use <Path|Sort order:Random|Top:10> (the Title field is not good for such thing because the title names are not unique).

Since now the Count aggregate function could be used with the Sort by/Statistic qualifiers only with All and Tracks arguments, except that additionally Statistic supports the Item argument. Now you have a possibility to specify any MN field as argument, even with the Statistic qualifier used on the global level. For example: <Genre|Statistic:Count(Artist), Count(Album)> would return the number of artists and albums for each genre. The Count function with specified field is better to use instead of Count(Items) because it is faster. The limitation of this addition is in fact that only MM3 is supported.

-------------------------------------------------------------------------------------

Information about 1.7.x beta version:

Here is one more update. Most significant addition is optional grouping with the unlimited numbers of hierarchy level. Well, we already had grouping in the tree window, but only using existing fields for each new node level. Now, you could add optional Group pseudo-fields in the front of the mask, i.e. before the mask caption and global qualifiers. Here is a new syntax where [] indicates optional and * indicates repeat 0-n times:

Code: Select all
[<Group|Name:characters[|Group qualifier]*>\]*Caption[|Global qualifier]*\<Field[|Local qualifier]*>[\<Field[|Local qualifier]*>]*


New Group pseudo-field should have specified at least Name qualifier with descriptive text which appears as a node caption. It has similar limitations as a caption of the old root node, i.e. characters | and \ are not allowed, but neither < and >.

Others supported qualifiers are Child of, Position, Icon and Show tracks. Most of this qualifiers are already known, except of the Position qualifier for specifying the location of the node relative to its top-most parent, which could have following values: Before, After (default for all nodes, except Magic nodes), First child, Last child (default for Magic nodes). There are some limitations for values of the Position qualifier: Magic nodes could be specified only with First child or Last child, but on another side Location, Artist, Album, Genre, Year, Rating, Virtual CD, Previews, Playlists and My Computer could be only in combination with Before or After. Other supported nodes (Library, Classification, Files to Edit, Now Playing, Net Radio and Web) could be used with all Position values.

Almost all of mentioned Group qualifiers could be specified for each group level. Child of and Position could be specified as global or group qualifiers (after Caption or inside of Group brackets), but they could be used only once for the full mask. Here is an example:

Code: Select all
<Group|Name:Problematic tracks|Show tracks:No|Child of:FilesToEdit|Position:Last child>\Tracks without lyrics|Filter:<Lyrics> = ''\<Title>


Group name "Problematic tracks" represents first level of hierarchy inside of the Files To Edit branch and caption "Tracks without lyrics" represents second level (Caption with Global qualifiers are treated as last grouping level, but they are still not surrounded with angle bracket, instead of Group and Field nodes).

I think it is obvious, but just to mention - general rule is that specified string for the Name qualifier should be the same for all sub-nodes which you want to put inside of the same branch. Well, this is not enough - Child of and Position values should be the same also. This is because you could need to put two groups with the same name inside of two different parents: for example one inside of the Files To Edit and another inside of the Net Radio. So, here is an example for the second node inside of the previously mentioned branch:

Code: Select all
<Group|Name:Problematic tracks|Show tracks:No|Child of:FilesToEdit|Position:Last child>\Tracks without comment|Filter:<Comment> = ''\<Comment>


Last Group level before Global level executes UNION query (if you didn't specified Show tracks:No for that level). For example, if I have Problematic tracks group and inside of it three sub-groups - Incomplete Albums, Missing Lyrics and Empty Genre, after click on Problematic tracks node I could get all tracks which fulfill any of the specified criteria. Be very careful with that. If execution is very slow, put Show tracks:No in the mask for this group level (and any previous group level if you have more of them in depth).

With a new grouping possibilities you don't need to have Magic Nodes branch at all. You could create nested nodes wherever you want - those branch will not be expanded during startup (only Magic Nodes branch is expanded by default).

I added also 4 more qualifiers for parsing of field text: Exclusive Left of, Exclusive Right of, Right until and Exclusive Right until. The Left of qualifier changed its behavior - until now it was displayed all field values, even those which don't contain specified string. I changed that to be consistent with the Right of qualifier (if you want old behavior of the Left of qualifier you should use new Exclusive Left of qualifier). Here is an example with following values of the Path field:

- :\Angie Stone - I Wasn't Kidding [Freemasons Vocal Club].mp3
- :\Faith Evans - Mesmerized [Freemasons Full Vocal Mix].mp3
- :\Freemasons feat. Amanda Wilson - Love on My Mind [Club Mix].mp3
- :\Freemasons feat. Amanda Wilson - I Feel Like.mp3
- :\Freemasons feat. Siedah Garrett - Rain Down Love [Vocal Club Mx].mp3

Left of: feat. (where " feat. " is specified as separator) will now return:
- :\Angie Stone - I Wasn't Kidding [Freemasons Vocal Club].mp3
- :\Faith Evans - Mesmerized [Freemasons Full Vocal Mix].mp3
- :\Freemasons

Exclusive Left of: feat. will return:
- [Unknown node with all values which don't contain " feat."]
- :\Freemasons

Right of: feat. will return:
- :\Angie Stone - I Wasn't Kidding [Freemasons Vocal Club].mp3
- :\Faith Evans - Mesmerized [Freemasons Full Vocal Mix].mp3
- Amanda Wilson - I Feel Like.mp3
- Amanda Wilson - Love on My Mind [Club Mix].mp3
- Siedah Garrett - Rain Down Love [Vocal Club Mx].mp3

Exclusive Right of: feat. will return:
- [Unknown node with all values which don't contain " feat. "]
- Amanda Wilson - I Feel Like.mp3
- Amanda Wilson - Love on My Mind [Club Mix].mp3
- Siedah Garrett - Rain Down Love [Vocal Club Mx].mp3

The Right until: qualifier helps in parsing of fields and should be used in combination with the Right of or the Exclusive Right of qualifiers. Here is an example with previous tracks where "[" is a key string and "Mix]" is terminating string, i.e. it should be returned part of the field value between "[" and "Mix]" or the end of the string:

Right of:[|Right until: Mix] will return:
- Freemasons Vocal Club].mp3
- Freemasons Full Vocal
- Club
- :\Freemasons feat. Amanda Wilson - I Feel Like.mp3
- Vocal Club

Exclusive Right of:[|Right until: Mix] will return:
- [Unknown node with all values which don't contain "["]
- Freemasons Vocal Club].mp3
- Freemasons Full Vocal
- Club
- Vocal Club

The Exclusive Right until: qualifier narrows returned values even more only to those which contain both "[" and " Mix]":

Exclusive Right of:[|Exclusive Right until: Mix] will return:
- [Unknown node with all values which don't contain "[" and " Mix]"]
- Freemasons Full Vocal
- Club
- Vocal Club

Strings for parsing could be specified more than once with all Left/Right qualifiers, even Until ones, and they should be separated with "|".

Exclusive Right of:[|Exclusive Right until: Mix]| Club] will return:
- [Unknown node with all values which don't contain "[" and " Mix]" or " Club]"]
- Freemasons Vocal
- Freemasons Full Vocal
- Club
- Vocal Club

This qualifiers could be used with all textual fields. For example, if I have Involved people field organized like this:

Code: Select all
vocal:Bono;guitar:The Edge;bass:Adam Clayton;drums:Larry Mullen, Jr.


I could use the following mask and get displayed nodes with guitarists:

Code: Select all
Guitarists\<Involved people|Exclusive Right of:guitar:|Right until:;>


I hope that this description is enough for understanding, but if you need somewhat better example, please read the PDF manual: http://west-penwith.org.uk/misc/MagicNodes.pdf

-------------------------------------------------------------------------------------

Information about 1.6.x alpha version:

This is another update with many bug-fixes and some additions. The Unknown, Min Tracks and Max tracks qualifiers are finally(?) resolved (this was hard one), but statistic information and display of nodes/tracks for Top qualifier didn't. This modification works fine in MM3 with SQLite, but it is catastrophically slow in MM2 with MS Jet. So, with 1.6.2 version of the script, I decided to disable this option in MM2, until I discover a better way to get a same behavior (only if I found the motif to continue the support for old version of the program). This means that MM2 don't have accurate display of statistics/nodes/tracks with mentioned qualifiers, sorry for that. With same version of the script there is resolved a problem with a display of tracks which contains multiple values for multi-item fields.

There are some situations when statistics is somewhat confusing, for example with tracks which have entered multiple values in multi-item fields (MM3) or multiple cover arts. Let say that we have a database with only one Rock track Tobacco Road by Eric Burdon & War which have entered Artist = Eric Burdon;War. If we define a mask:
Code: Select all
G+A\<Genre|Statistic:Count(All)>\<Artist|Statistic:Count(All)>

we will get next result:
Code: Select all
-  Rock (1 files)
    +-  Eric Burdon (1 files)
    +-  War (1 files)

Until version 1.6.2 we would get Rock (2 files) as the result which is incorrect, even if the sum of all tracks from all listed artist is 2.

Major syntax change: Field names should be surrounded with < and > when used inside of the Filter qualifier. This resolves a bug with this qualifier because some of masks couldn't worked before, e.g. Filter:Album Artist = 'Various Artist'. Now, it can be written as Filter:<Album Artist> = 'Various Artist' and will work correctly. For similar reason name of the Album and Artist field is changed to the Album with Album Artist and name of the Album and Year field changed to the Album Artist with Album. The Year information from the former Album and Year field is removed, instead for a same result should be used <Album Artist with Album|Statistic:Max(Year)>. Field names should be enclosed only inside of Filter qualifiers, not inside of aggregate functions (Sum,...) of Sort By or Statistic qualifiers!

Examples of new features:
- if you want to display albums sorted by Custom 1 and Year fields, but want to show Year in the front of album names instead of the Custom 1:
Code: Select all
Albums (sorted by Custom 1 and Year)\<Album|Sort by:Max(Custom 1), Max(Year)|Show Sort Key:2>


- if you want to sort albums by Year, but you don't want to display that information in the front of albums:
Code: Select all
Albums (sorted by Year without its display)\<Album|Sort by:Max(Year)|Show Sort Key:0>


- if you want to display album artists followed by albums and years on the same node level:
Code: Select all
Album Artist - Album (Year)\<Album Artist with Album|Statistic:Max(Year)>


-------------------------------------------------------------------------------------

Information about 1.5.x working alpha version:

I am working on the next major upgrade of this script, but I am not sure when I'll finish this work. There was some critical bugs in the last published version, so I decided to release one older (last fully functional) working version of this script with removed almost all observed bugs and added several new notable features. Well, there is also a possibility that I added some new bugs, because I haven't too much time to test it further. So, if you like to experiment, you could take it, but if you don't, you should take previous 1.4.3.1 version from the same link mentioned above.

Major syntax change: Count aggregate function of Sort by and Statistic qualifiers now could have only All and Items arguments, because this is only logical to me. If you think opposite and want to use Count with other arguments which are supported by other aggregate functions (Min, Max, Avg, Sum), you should take old version of the script or give me a very good reason why I should return old behavior of this qualifier.

Just small note: The All keyword could be replaced with the Tracks keyword, so you can write Statistic:Count(Tracks) instead of Statistic:Count(All). Another note is about the Items keyword which could be currently used only with the Statistic qualifier, but not with the Sort by.

Sort by and Statistic qualifiers both accept multiple arguments. 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).

Please, keep in mind that some of new added features have a syntax which could be changed in some next version of this script.

Here are some examples of new features:
- if you want to display total number of tracks and the number of last track from each album:
Code: Select all
Albums (with number of tracks and last track)\<Album|Statistic:Count(Tracks), Max(Track Number)>


- if you want to display same information as it is in the status bar, but for each album:
Code: Select all
Albums (with number of tracks, file size and song length)\<Album|Statistic:Count(All), Sum(File Size), Sum(Length)>


- if you want to display number of albums for each artist and number of artists for each genre:
Code: Select all
Genre, Artist and Album (with number of items)\<Genre|Statistic:Count(Items)>\<Artist|Statistic:Count(Items)>\<Album|Statistic:Count(All)>


-------------------------------------------------------------------------------------

Old information:

Maybe someone of you already knows that I have unofficially modified Magic Node script and posted it in this Forum with permission of Pablo, its original author. His opinion is that this version should have its own thread, so here it is.

If you want to download the original 1.3b script, you should visit Pablo's site http://magicnodes.110mb.com/. Also, if you have some questions related to the script usage, you should go to the thread: http://www.mediamonkey.com/forum/viewtopic.php?t=3358. Unfortunately, Pablo is very busy in this moment and temporarily abandoned his work on this script.

First version 1.3c modified by myself had a removed bug with wrong prefixes ("The", "A",...), which is manifesting in some cases (for example, when you group Artists by first letter). Next modified version 1.4.0 was written mostly to enable its work with MediaMonkey 3.0 alpha. Revision 1.4.1 had only small bug fixes.

There is a new modified version 1.4.2 with some added functionality. Most notably is new qualifier statistic which takes same arguments as sort by qualifier. Those are aggregate functions count, avg, sum, min & max (first & last is not supported in MM3 database). So, what is a difference in statistic and sort by? Let say that you have following mask:
Code: Select all
Album (Sort by Bitrate)|icon:top level\<album|sort by:avg(bitrate)>

With it you could get albums sorted by average bitrate. But now, if you enter next mask:
Code: Select all
Album (Average bitrate)|icon:top level\<album|statistic:avg(bitrate)>

you could get albums with information about average bitrate for each album in the tree list.

Statistical information are displayed next to the main field (in this example, Album) inside of parenthesis. In similar fashion you can display any of mentioned aggregate functions for each of the main field.

Here are some more examples:
- if you want to display number of tracks for each album
Code: Select all
Album (Number of tracks)|icon:top level\<album|statistic:count(all)>

- if you want to display total file sizes for each album
Code: Select all
Album (Total file size)|icon:top level\<album|statistic:sum(file size)>

- if you want to display a release year of the earliest song from each artist
Code: Select all
Artist (Year)|icon:top level\<artist|statistic:min(year)>

- if you want to display average song duration for each genre
Code: Select all
Genre (Average length)|icon:top level\<genre|statistic:avg(length)>


As you can see, there is some new available fields for sorting and, in same manner, for statistic display: Length, File Size and Leveling.

This modified version works with MediaMonkey 2.x and 3.x. It is fairly tested, but there is also a possibility that some combination of input parameters used in MM2 will not work in MM3.

Currently not working in MM3:
- Percent argument of Top qualifier (e.g. Top: 5 Percent);
- First and Last arguments of Sort by qualifier.

Might not work in MM3:
- SQL Filter and Filter qualifiers (especially those which use MS Jet specific functions).

Please, feel free to inform me if you discover some strange behavior with this script.
Last edited by ZvezdanD on Tue Sep 08, 2009 8:29 pm, edited 102 times in total.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Postby Bex on Tue Jul 17, 2007 12:40 pm

Cool, I'll check it out later!
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
Bex
 
Posts: 5698
Joined: Fri May 21, 2004 10:44 am
Location: Sweden

Postby gtbuzz on Wed Jul 18, 2007 4:14 am

Awesome work.

Couple of simple fields to add for MM3:
DiscNo and Custom 4 & 5.
Image
gtbuzz
 
Posts: 131
Joined: Mon Jul 18, 2005 4:09 pm

Postby nojac on Wed Jul 18, 2007 12:35 pm

Thank you very much for the new statistics functions, ZvezdanD. The update of MagicNodes is the best thing that has happened since MM3 alpha was released.

My favourite node is
Album Artist|child of:Artist\<album artist|statistic:count(all)>\<album|sort by:max(year)|sort order:asc|statistic:count(all)>

This gives me an Album Artist node with number of tracks for each artist, with subnodes for each album with year and number of tracks. Great!

My only wish is to be able to expand this node, so I do not have to klick on each artist to see their albums. Anyone??
nojac
 
Posts: 504
Joined: Tue Dec 19, 2006 5:23 pm
Location: Norway

Postby ZvezdanD on Wed Jul 18, 2007 2:37 pm

Thanks to all for response :)

gtbuzz wrote:Couple of simple fields to add for MM3:
DiscNo and Custom 4 & 5.


Those will be added definitely.

nojac wrote:My only wish is to be able to expand this node, so I do not have to klick on each artist to see their albums.


Well, we already talked about that. What about a mask with <album and year>? Doesn't this fits your need?

BTW, I am testing some optimizations of code for speed. Could someone send me some time consuming mask? It should not have SQL filter or filter qualifiers, because I cannot optimize such things (those are responsibility of mask creator).
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Postby Teknojnky on Wed Jul 18, 2007 3:11 pm

ZvezdanD wrote:BTW, I am testing some optimizations of code for speed. Could someone send me some time consuming mask? It should not have SQL filter or filter qualifiers, because I cannot optimize such things (those are responsibility of mask creator).



here are normal magic nodes

[CustomNodeMasks]
Mask1=Leveling\<leveling>\<format>\<artist>\<album>
Mask2=BPM\<bpm>\<format>
Mask3=Encodings\<format>\<vbr>\<bitrate>
Mask4=One Hit Wonders\<artist|max tracks:5>
Mask5=Collections\<album artist|min tracks:600>\<album>
Mask6=Incomplete Albums|SQL filter: IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum, IIf(SongOrder+1>99,Left(SongOrder+1,1),0) HAVING (Max(Val(Right(SongOrder+1,2)))<>Count(*)) and Count(*)>2)|show tracks:no\<Album Artist>\<Album>
Mask7=Cover types\<cover type>\<album>
Mask8=Cover-Storage|show tracks:no\<Cover Storage|unknown:no>

Mask9=High Rating Few Tracks|SQL Filter:Rating>60 and IDArtist in (SELECT IDArtist FROM Songs GROUP BY IDArtist HAVING Count(*)<10)\<Artist>
Mask10=High PlayCount Few Tracks|SQL Filter:PlayCounter>20 and IDArtist in (SELECT IDArtist FROM Songs GROUP BY IDArtist HAVING Count(*)<10)\<Artist>
Mask11=High PlayCount or Rating Few Tracks|SQL Filter:(PlayCounter>20 or Rating>60) and IDArtist in (SELECT IDArtist FROM Songs GROUP BY IDArtist HAVING Count(*)<10)\<Artist>
Mask12=Occasion\<occasion>
Mask13=AddedLastWeek|SQL filter:DateDiff('d',Songs.DateAdded,Now)<7\<date added|sort order:desc>\<Album>
Mask14=Missing Genre by Artist\<genre>\<artist>
Mask15=ExtWithUPPERCASE|SQL filter: iif(SongTitle='',0,Asc(Left(IIf(Left(Right(songpath,3),1)='.',Right(songpath,2),IIf(Left(Right(songpath,4),1)='.',Right(songpath,3),IIf(Left(Right(songpath,5),1)='.',Right(songpath,4),IIf(Left(Right(songpath,6),1)='.',Right(songpath,5),Right([songpath],6))))),1))) Between 65 And 90\<Artist>


Comments\<comments> is also very slow

btw, you can improve performance in alot of places like LOOPs, by including: SDB.ProcessMessages within the loop.

That helps keep the UI responsive and minimizes temporary 'freeze ups'.
Teknojnky
 
Posts: 5123
Joined: Wed Sep 07, 2005 4:01 am

Postby ZvezdanD on Wed Jul 18, 2007 5:23 pm

Teknojnky wrote:here are normal magic nodes


Thank you very much! Some of these are not "normal", but others could help me. I suppose that you already know - IDArtist is not anymore in Songs table, also with MM3 you should not use IIf, Left, Right, Mid, Val, DateDiff, Now, Asc...

BTW, MM3 hung-up if you use Magic Node with incorrect sub-query (with standard query it display error dialog, but will continue; MM2 also show only error dialog, but will not hung-up).

IMHO, I am not sure, but this normal masks are not to slow for me. How much songs do you have in database?

btw, you can improve performance in alot of places like LOOPs, by including: SDB.ProcessMessages within the loop.


Yeah, I was looking for something similar to VB DoEvents, but this is even better. Thanks again.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Postby ZvezdanD on Wed Jul 18, 2007 5:36 pm

Small correction. MM3 not hung-up with all sub-queries, but only with those which have non-existent fields. In your case Mask 9, 10 and 11.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Postby Teknojnky on Wed Jul 18, 2007 5:40 pm

To be honest, I haven't tried your updated nodes, I didn't realize some of them won't work.

I am not using any scripts/plugins with mm3 yet, trying to keep the extra stuff out till its a tad more stable in general before adding more to the mix.

The cover-storage one is extremely slow for me (on MN 1.3b and mm2.5) even with my custom additions of sdb.processmessages. I expect this is more due to database/harddrive performance, than script).

Alot of those sql ones are courtesy of Bex, and yeah I would expect they have to be updated for the mm3 database.

I also have a huge library (800ish gigs), so slow is also relative for me... large library = huge amount of processing.

Right now I have cover-storage node processing on my 2.5 install and its is almost maxing out both my dual core 2.0 ghz, ~60 to 80% on both.
Teknojnky
 
Posts: 5123
Joined: Wed Sep 07, 2005 4:01 am

Postby gtbuzz on Thu Jul 19, 2007 4:27 pm

What I'd like to see is a "split" function to work similar to how artists currently work. I know that this works due to database design. I think it should be possible to take 1 field, split it on some delimiter, and then create multiple nodes.

Involved artists is specifically the field I'm talking about. This way I could split it out for each of the people involved.

Code: Select all
Involved Artist
  ->Person A [Producer]
  ->Person B [Drums]
  ->Person B [Vocals]
  ->Person C [Producer]


Ultimately, I would then want to flips the nodes as well, but this would be more difficult. From the same data:

Code: Select all
Involved Artists
  ->Drums
     ->Person B
  ->Producer
     ->Person A
     ->Person C
  -> Vocals
     ->Person B
Image
gtbuzz
 
Posts: 131
Joined: Mon Jul 18, 2005 4:09 pm

Postby ZvezdanD on Thu Jul 19, 2007 6:18 pm

gtbuzz wrote:What I'd like to see is a "split" function to work similar to how artists currently work. I know that this works due to database design. I think it should be possible to take 1 field, split it on some delimiter, and then create multiple nodes.


If you have a field with only one delimiter, you could try left of and right of qualifiers. Maybe I could add mid of qualifier, if someone tell me how I can replace InStr MS Jet related function with some of available SQLite functions, for work with MM3.

Involved artists is specifically the field I'm talking about. This way I could split it out for each of the people involved.


I got an information that Involved persons will be multi-* field, as there are now Artist, Album Artist and Genre (I am speaking about MM3). When this happens, I'll modify script to support that.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Postby nojac on Thu Jul 19, 2007 7:57 pm

ZvezdanD wrote:
nojac wrote:My only wish is to be able to expand this node, so I do not have to klick on each artist to see their albums.

Well, we already talked about that. What about a mask with <album and year>? Doesn't this fits your need?

I would prefer an option to expand a node with subnodes. I have asked for this in another thread, and Steegy replied "I don't know if it already exists (as script), but it can be easily scripted." Unfortunately, I am not a scripter....

<album and year> would fit my needs if I was able to list the number of tracks after each album (possibly instead of year) I have not yet figured out if this is possible.
nojac
 
Posts: 504
Joined: Tue Dec 19, 2006 5:23 pm
Location: Norway

Postby gtbuzz on Fri Jul 20, 2007 4:22 am

ZvezdanD wrote:I got an information that Involved persons will be multi-* field, as there are now Artist, Album Artist and Genre (I am speaking about MM3). When this happens, I'll modify script to support that.


Very cool...that would handle what I want exactly. Again nice work with getting MagicNodes on MM3.
Image
gtbuzz
 
Posts: 131
Joined: Mon Jul 18, 2005 4:09 pm

Postby ZvezdanD on Fri Jul 20, 2007 11:07 am

gtbuzz wrote:Very cool...that would handle what I want exactly.


Yeah, but I don't know how MM developers would realize a role for each involved person. You know, they could realize multi-persons field, as they realized Artist field with ";" delimiter separating each artists, but involved persons will be much complicated for that. It is not enough to say "John Lennon;Paul McCartney;George Harrison;Ringo Star", but you should have a possibility to specify its musicians role.

ZvezdanD wrote:If you have a field with only one delimiter, you could try left of and right of qualifiers. Maybe I could add mid of qualifier, if someone tell me how I can replace InStr MS Jet related function with some of available SQLite functions, for work with MM3.


When nobody wants to help me, I need to help myself :) I found a solution to replace InStr function which was near of my eye sight, but I was blind to see it, even when I already implemented similar approach with left of and right of qualifiers. If someone is interested, here is a InStr(start, string1, string2) with SQLite functions:

Code: Select all
case
when replace(substr(string1, start, 9999), string2, zeroblob(1)) = substr(string1, start, 9999) then 0
when length(string2) = 0 then start
else length(substr(string1, 1, start - 1) || replace(substr(string1, start, 9999), string2, zeroblob(1))) + 1
end


So, I could implement mid of or split qualifier if you really want.
Last edited by ZvezdanD on Fri Jul 20, 2007 11:31 am, edited 1 time in total.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Postby ZvezdanD on Fri Jul 20, 2007 11:19 am

nojac wrote:<album and year> would fit my needs if I was able to list the number of tracks after each album (possibly instead of year) I have not yet figured out if this is possible.


Well, answer is yes and no. With following mask you should get what you want:

Code: Select all
Album - Artist (Year) (No. of tracks)\<album and year|statistic:count(all)>


Unfortunately, there is a drawback in the script, even in the last official one, 1.4b, and because of it you would get duplicated album entries in the tree list if some songs from the same album have different year information.

I am working to resolve this.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Next

Return to Need Help with Addons?

Who is online

Users browsing this forum: Heartsbane and 6 guests