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

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

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

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

chris@bodar.com wrote:I've tried compacting my database (quick and full) but no matter what Magic Nodes gives me the syntax error " near AND.
Which version of Magic Nodes add-on do you have installed? Did you get such behavior since you installed it first or you have such problem after some time? When you are getting this error message exactly (during startup or if you click on some node, or...)? When you get the error message, which is the line number displayed in the message box?
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
chris@bodar.com

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by chris@bodar.com »

v1.3

Always happed from installation, I also get a zillion Magic Nodes nodes occasionally (marked Magic Nodes)

NO line number on initial error:
There was a proble querying the database:
Error executing SQL "SELECT Songs.*
FROM Songs
AND Songs.ID IN (SELECT Songs.Id FROM Songs, Artists, Albums WHERE Artists.ID = Songs.IdArtist AND Songs.IdAlbum = Albums.ID
" : near "AND": syntax error (1,1)

If I ignore:

Error #2147418113
File ~1.3b.vbs, Line 1422, Column 3

Then Catastrophic Failure

Hope this helps
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

chris@bodar.com wrote:v1.3
That version is 4 or 5 years old and not compatible with MediaMonkey 3.x. You could take the latest version following the link in the first post of this thread.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
chris@bodar.com

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by chris@bodar.com »

That's embarassing. I blame google myself ;-)

Sorry to waste your time like that, actually thought I really had checked that I got the latest version

Thanks
Christian
toof4st
Posts: 65
Joined: Fri Mar 06, 2009 6:13 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by toof4st »

I wonder if there is a way that you could add the functionality to alter some of the field names returned in the results.
My scenario is, I want to use magicnodes to create a playlist, and for the songs in that playlist, I would like to change the AlbumArtist Name and/or Artist name to "Various Artists".
I want to sync a couple of songs to my Ipod, but not have them appear as an artist on the device but would still sync to the device and would play as part of a playlist.
However, I don't want to alter the original song details.
I appreciate when I sync to my device, I will have to perform a conversion so that the updated field name is reflected correctly on the device.

I have achieved this at the moment, using a junctioned directory, pointing to my original and using some path names to dummy up the artist name. But it is quite tedious. And this means having 2 copies of the song in the database, which slows it down noticably.

Using magic nodes would be elegant.

Thanks

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

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

toof4st wrote:I wonder if there is a way that you could add the functionality to alter some of the field names returned in the results.
I am not so sure that understand what you exactly want, but I suppose it is not possible with any kind of script. Even if I change this script to alter field names, such names would be entered into the database file and eventually into tags of audio files. There is simply no other solution, because such modified filed names should be stored somewhere before sync.

I didn't try the next thing, but you could eventually turn off "Update tags when editing properties" and enter "Various Artists" name for all tracks that you want to sync (only the database file would be updated, but tags in audio files would be unchanged), then you could sync tracks with your device using some type of conversion e.g. to some lower bitrate, and finally resume back changed field names using Add/Rescan option. Eventually, you could make a backup of the database file before you enter "Various Artists" names, and when you finish with sync you could restore that backup file of the database. However, this could only work if MM converts audio files to the device using field names from the database file, not from tags of original audio files. As I said, I didn't try it since I don't use sync option at all, but you could try it by yourself with just few tracks.

If MM converts files during sync using same tags as they are in original audio files, then your only solution is to have additional tracks with modified tags. In that case you could use Track Redirection & Synchronization add-on. With it you have two possibilities: you could create small .asx files or you could make duplicates of original audio files, in both cases those new files would contain tags that could be different from original audio files. By the way, I didn't notice any slow down with duplicated tracks, but maybe you have much more tracks than me.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
toof4st
Posts: 65
Joined: Fri Mar 06, 2009 6:13 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by toof4st »

Thanks for the reply. I tried your Track Redirection, but it wasn't easy to generate for my needs, although I considered writing my own ascx file builder.
What I have done instead, is to fool Media Monkey, by getting it to see the same files by a second directory path (using directory junctioning - tool from sysinternals) and using the directory path to determine the tags of the file for those in the Various Artists path. Media Monkey sees two versions of the file, even though only one exist physically on the disk.
The problem is, I have to duplicate the number of songs in the database, whether I use this method or the ascx method.

I have found if you perform a conversion when you sync, Media Monkey syncs the information it knows about the file, rather than what is physically stored in the tags of the file.

My thoughts are, when you return the list of files via "SELECT * FROM Songs " + [FILTER], if you were able to change this, so that it returns "SELECT 'Various Artists' AS AlbumArtist, [... other fields ...] FROM Songs ", (and I used this as the playlist), then media monkey would sync this alternate information to the IPod.

But Magic Nodes only allows you to alter the filter, not the SELECT statement.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

toof4st wrote:I tried your Track Redirection, but it wasn't easy to generate for my needs, although I considered writing my own ascx file builder.
I am just curious, how would you want to be easier to generate .asx files? Maybe I could adapt it to suit your needs.
toof4st wrote:My thoughts are, when you return the list of files via "SELECT * FROM Songs " + [FILTER], if you were able to change this, so that it returns "SELECT 'Various Artists' AS AlbumArtist, [... other fields ...] FROM Songs ", (and I used this as the playlist), then media monkey would sync this alternate information to the IPod.

But Magic Nodes only allows you to alter the filter, not the SELECT statement.
SELECT is the SQL statement used for returning some record set, it is not used for changing data. There is another SQL statements for that (UPDATE), but using it those data would be entered into the database file which you want to avoid. Here is simplified structure of the MM database: there is Songs table which have all data about tracks (Artist, Album, Title...) where each track has unique ID and there is PlaylistSongs table which contains only IDs of playlists and IDs of tracks that belong to particular playlist (of course, those IDs of tracks are same as IDs from Songs table since those data are related). There are no data about tracks (Artist...) stored into PlaylistSongs table.

You should know that there are two independent processes that you are mistakenly consider as one: the first processes when Magic Nodes generate some playlist with some set of tracks using the SELECT query and the second one when you start sync of those tracks with your device (not matter if it is started manually or automatically). That second process is done by the program itself and during it data are read from the database file, not from some SELECT statement. The program don't care how you made some playlist, using some SELECT query or manually with drag & drop of tracks. As I said before, there is no way to change your data "on-the-fly", you need to modify those data into Songs table of the database or to generate duplicates with modified tags.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
toof4st
Posts: 65
Joined: Fri Mar 06, 2009 6:13 am

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by toof4st »

Yes, I understand SQL. (I've been a developer for Microsoft for 7 years, primarily as a SQL developer). Although SQL Lite is frustrating sometimes.

I use autoplaylists to generate my playlists to sync, so I don't even think the song ids are stored in the database. I don't want to update the database - I only want the data to change on sync to the device. I did write some update statements, to alter songs data in the database prior/post sync which worked, but it was too slow.

I did think about it a bit more, and you are right, there are 2 stages, so at this stage I am only guessing/hope that this might work. I depends who the sync process works, and whether it uses the results of the playlist to build the converted file. If it just gets the SongID, to get a list of Songs to sync, then I also need to write/modify the conversion process. The idea arose from a discussion with one of the MM developers, stating that it would be difficult to compare files where you have altered the metadata.

Is there a function/place in the script that returns the results list, so that I can hardcode a modification just to test my theory?

There would be a change to the ascx Track Redirection process that would be nearly as good. Shall I discuss that on the Track Redirection thread?

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

Re: Magic Nodes 4.0 w/ 313 masks & real GUI (2010-05-21) [MM2+3]

Post by ZvezdanD »

toof4st wrote:Yes, I understand SQL. (I've been a developer for Microsoft for 7 years, primarily as a SQL developer). Although SQL Lite is frustrating sometimes.
Yes, I supposed so after your previous message and because of that I mentioned the short description of the database structure, just to give you a picture that there are only one place where are stored data about tracks. If PlaylistSongs table has stored same fields as Songs table (Artist, Album, Title...) then you could have two different Artist values for same track.

And yes, SQLite is really frustrating sometimes as we scripters already discussed before, especially its lack of some elemental functions, but in same time it has some things realized better than MS Jet.
toof4st wrote:I depends who the sync process works, and whether it uses the results of the playlist to build the converted file. If it just gets the SongID, to get a list of Songs to sync, then I also need to write/modify the conversion process.
I am telling you that, there are only information about IDs of tracks stored in the PlaylistSongs table. If you want to sync some track from the playlist, MM will get its Songs' ID, find it in the Songs table and get its data from there. You should consider that sync could be applied in same way with tracks from Library and other nodes, not only with Playlists node. If you want to write script which would do the sync, then you need to do whole thing from the ground since MM API is very limited in this regard - there is no OnSyncStart and OnSyncEnd events or anything related to that. So, you need to emulate complete sync process using VBScript and I am not sure if it is possible without a support from MM developers with enhanced API.
toof4st wrote:Is there a function/place in the script that returns the results list, so that I can hardcode a modification just to test my theory?
I don't understand exactly what you are looking at, but you could try to turn on the "Allow editing of SQL queries" and "when select a field node" options. After that you will be able to change SQL queries partially (only WHERE part). There is no way to create/modify complete SQL query because existing API function (QuerySongs) doesn't not allow that.
toof4st wrote:There would be a change to the ascx Track Redirection process that would be nearly as good. Shall I discuss that on the Track Redirection thread?
Yes, it is recommended to discuss that on the Track Redirection thread and I am ready for any suggestion. In fact, I added many options after users suggestions.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Big Isch
Posts: 112
Joined: Mon Mar 12, 2007 8:34 am
Location: Austria

Re: Magic Nodes 4.0 w/ 320 masks & real GUI (2010-06-24) [MM2+3]

Post by Big Isch »

Hello,

I'd like to show participating people with their:
  • - "Common" Name, e.g. "Gustav Holst"
  • - "Hierarchical" name, e.g. "Holst, Gustav"
  • - Both names
in different MNs.

So I list both versions in one Custom field. Because different tracks may have different number of
people involved, I use "~" to delimit the "Common" and the "Hierarchical" names. So:

Code: Select all

Custom 4 = "Gustav Holst; Herbert von Karajan~Holst, Gustav; Karajan, Herbert von"

Masks:
    Common Names\<Custom 4|Split by:; |Left of:~>\<Album|All:Yes>
    Hierarchical Names\<Custom 4|Split by:; |Right of:~>\<Album|All:Yes>
Problem:
How can I show all names in one Mask, such that nodes are:

Code: Select all

- Gustav Holst
- Herbert von Karajan
- Holst, Gustav
- Karajan, Herbert von
Well, I could use another Custom field, but custom fileds are too rare.
Or one could use another delimiter to pack up the Custom 4 field with all three version like

Code: Select all

Custom 4 = "Gustav Holst; Herbert von Karajan~Holst, Gustav; Karajan, Herbert von$Gustav Holst; Herbert von Karajan; Holst, Gustav; Karajan, Herbert von"

Masks:
    Common Names\<Custom 4|Split by:; |Exclusive left of:~>\<Album|All:Yes>
    Hierarchical Names\<Custom 4|Split by:; |Exclusive right of:~|Right until:$>\<Album|All:Yes>
    All Names\<Custom 4|Split by:; |Exclusive right of:$>\<Album|All:Yes>
But that is clumsy (although "RegExp Find and replace" could do the work).

Any ideas are welcome ! :D
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 320 masks & real GUI (2010-06-24) [MM2+3]

Post by ZvezdanD »

Big Isch wrote:How can I show all names in one Mask, such that nodes are:

Code: Select all

- Gustav Holst
- Herbert von Karajan
- Holst, Gustav
- Karajan, Herbert von
I don't understand why you want such thing. I understand that you want to get FirstName/Last Name or LastName/First Name, but I don't get it why anybody would want to get Gustav Holst and Holst, Gustav as two nodes on the same level.
Big Isch wrote:I could use another Custom field, but custom fileds are too rare.
Or one could use another delimiter to pack up the Custom 4 field with all three version like

Code: Select all

Custom 4 = "Gustav Holst; Herbert von Karajan~Holst, Gustav; Karajan, Herbert von$Gustav Holst; Herbert von Karajan; Holst, Gustav; Karajan, Herbert von"

Masks:
    Common Names\<Custom 4|Split by:; |Exclusive left of:~>\<Album|All:Yes>
    Hierarchical Names\<Custom 4|Split by:; |Exclusive right of:~|Right until:$>\<Album|All:Yes>
    All Names\<Custom 4|Split by:; |Exclusive right of:$>\<Album|All:Yes>
But that is clumsy (although "RegExp Find and replace" could do the work).
How about to use "; ~; " as a separator for those two sets of names instead of "~", e.g.:
Custom 4 = "Gustav Holst; Herbert von Karajan; ~; Holst, Gustav; Karajan, Herbert von"
Then:

Code: Select all

Common Names\<Custom 4|Split by:; |Left of:; ~>\<Album|All:Yes>

Code: Select all

Hierarchical Names\<Custom 4|Split by:; |Right of:~; >\<Album|All:Yes>

Code: Select all

All Names\<Custom 4|Split by:; >\<Album|All:Yes>
Unfortunately, with the third mask you would have one unwanted sub-node more ("~"), but at least you would not need to change your tags too much.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Big Isch
Posts: 112
Joined: Mon Mar 12, 2007 8:34 am
Location: Austria

Re: Magic Nodes 4.0 w/ 320 masks & real GUI (2010-06-24) [MM2+3]

Post by Big Isch »

ZvezdanD wrote:
Big Isch wrote:How can I show all names in one Mask, such that nodes are:

Code: Select all

- Gustav Holst
- Herbert von Karajan
- Holst, Gustav
- Karajan, Herbert von
I don't understand why you want such thing. I understand that you want to get FirstName/Last Name or LastName/First Name, but I don't get it why anybody would want to get Gustav Holst and Holst, Gustav as two nodes on the same level.
I want the "ALL" version, because some people may browse in a list for "Karajan" while others look for
"Herbert von Karajan" ... so I want supply one list containing both version.
(Likewise for "Beatles, The", "Bach, Johann Sebastian", etc)
ZvezdanD wrote: How about to use "; ~; " as a separator for those two sets of names instead of "~", e.g.:
Custom 4 = "Gustav Holst; Herbert von Karajan; ~; Holst, Gustav; Karajan, Herbert von"
.....
Unfortunately, with the third mask you would have one unwanted sub-node more ("~"), but at least you would not need to change your tags too much.
Yeah, great idea - Thanks ! :D
To remove unwanted sub-node ("~"), I tried "; ; " as separator between versions:

Code: Select all

Custom 4 = "Gustav Holst; Herbert von Karajan; ; Holst, Gustav; Karajan, Herbert von"

Common Names2\<Custom 4|Split by:; |Exclusive left of:; ; >\<Album|All:Yes>
Hierarchical Names2\<Custom 4|Split by:; |Exclusive right of:; ; >\<Album|All:Yes>
All Names2\<Custom 4|Split by:; >\<Album|All:Yes>
The Result looks as wanted ! :P

But what happens when MN-code splits the Custom 4 that contains "; ; " by the "; "? Is result simply a zero-length string and gets discarded ?

kind regards
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Magic Nodes 4.0 w/ 320 masks & real GUI (2010-06-24) [MM2+3]

Post by ZvezdanD »

Big Isch wrote:To remove unwanted sub-node ("~"), I tried "; ; " as separator between versions:

But what happens when MN-code splits the Custom 4 that contains "; ; " by the "; "? Is result simply a zero-length string and gets discarded ?
Yeah, I tried that as well, but I though that a node with the empty caption is not discarded. I just tried again and you are right indeed.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Saiyavenger
Posts: 29
Joined: Mon Apr 13, 2009 7:41 pm

Re: Magic Nodes 4.0 w/ 320 masks & real GUI (2010-06-24) [MM2+3]

Post by Saiyavenger »

Maybe this has already been asked, but is it possible to create an autoplaylist from a Magic Node?
Post Reply