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

Post a reply

Visual Confirmation

To prevent automated access and spam, you are required to confirm that you are human. Please place a check mark next to all images of monkeys or apes. If you cannot see any images, please contact the Board Administrator.

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

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

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

Post by LemurTech » Fri Jul 24, 2015 7:23 pm

Greetings, Gurus! Hunted around in this thread and others but can't seem to find the answer to my Magic Nodes question, so here goes!

I want to do a split based on Custom Field 5 ("Keywords"), which is a comma-separated list of keywords: Key1, Key2, Key3, etc. This will be used to create a two-level "Keywords" node that should work like this:

Code: Select all
Key1   (files with Key1 AND any other key)
--Key2 (files with Key1 AND Key2)
--Key3 (files with Key1 AND Key3)

Key2  (files with Key2 AND any other key)
--Key1 (files with Key2 AND Key1)
--Key3 (files with Key2 AND Key3)

Key3  (files with Key3 AND any other key)
--Key1 (files with Key3 AND Key1)
--Key2 (files with Key3 AND Key2)

I have succeed in creating the first-level and second-level nodes; however, I can't get the mask/query set up so that a file that already appears in one node can also appear in a lower node. Is this even possible? My mask looks like this:

Code: Select all
Keywords|Icon:Top level|Position:First child|Child of:Library|MM filter:MyGenre\<Keywords|Unknown:No|Split by:,|Split Mode:Categories>\<Custom 5|Split by:,|Split Mode:Parts After|Split part:1>

Thanks for pointing me in the right direction!

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

Post by willyvds » Tue Jul 21, 2015 2:00 pm

Awesome! I always had the idea of making something like this but I never did...
Some questions from my side:
1. I have put the mask under "playlist". It works but somehow I cannot make it refresh. Any ideas?
2. I'm not sure what "GROUP BY IDAlbum ORDER BY (<Played> - 2*<Year> - <Rating>/20)) " should do?
3. I'm also not sure by which criterion you would want to sort?
But anyway: thanks a lot!
Regards, Willy

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

Post by electricessence » Mon Jul 20, 2015 10:07 pm

Here is my query:
Code: Select all
Songs.ID IN (SELECT ID FROM Songs WHERE Songs.ID IN ( SELECT ID FROM Songs WHERE <Custom 2> NOT LIKE 'Retire%' AND <Custom 2> NOT LIKE 'Duplicate%' AND Rating >= 60 AND ( <Played> < 1 AND <Days since last played> > 1 OR LastTimePlayed = 0.0 OR <Days since last played> > (<Played> * <Played> + 7 + 100-<Rating> ) ) AND Songs.Artist IN ( SELECT Artist FROM Songs GROUP BY Artist HAVING Max(LastTimePlayed) = 0.0 OR JulianDay( Date('now', 'localtime') ) - JulianDay( Date(Max(LastTimePlayed) + JulianDay('1899-12-30')) ) > 7 ) AND ( Songs.Album = "" OR Songs.IDAlbum IN ( SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Max(LastTimePlayed) = 0.0 OR JulianDay( Date('now', 'localtime') ) - JulianDay( Date(Max(LastTimePlayed) + JulianDay('1899-12-30')) ) > 2 ) ) GROUP BY IDAlbum ORDER BY (<Played> - 2*<Year> - <Rating>/20)) GROUP BY Artist)

https://gist.github.com/electricessence ... 53aa4da95d

It works exactly as I want it to with some minor caveats:
  • Sorting (ORDER BY) doesn't work and I'm guessing because it's not ordering by the result set, but the underlying group set. Would really like a working default sort.
  • It's quite complicated. Without using a lot of redundant date code, I was unable to get this to work any other way. Any help at reducing this query would be nice.

What does this query do?
It's a godsend. Thank you Magic Nodes for letting me do this:
It only selects 3+ star songs from artists/albums/compilations that haven't been heard in a while. This is really important in bigger collections since you can very easily play out some songs and not hear from others.
The timeframe is computed by (Days):
  • Song: <Played>^2 + 7 + 100 - <Rating>
  • Artist: Greater than 1 week.[*/]
  • Album/Compilation: Greater than 2 days.
Therefore the more time you play a song, an artist, or album, the longer it will take to repeat a song by that artist or album.

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

Post by TheMcShan » Tue Jul 14, 2015 7:37 pm

Hi

How can i make a node similar to the "Albums with multiple years" only i need one that is for the whore date (YYYY.MM.DD)?
Thanks! love this script!

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

Post by conandrum » Wed Jun 10, 2015 2:12 pm

I recreated the error. and found another bug.

First the bug..
When I right click on a magicnode in playlists, and choose 'refresh magic playlist' or click shift+F5, nothing happens.
The only way to refresh the playlist is to edit the node, and insert a space in the SQL to count as a change and by clicking OK a refresh is generated.
I don't know how I missed this yesterday. Maybe because the installation already created them, I did not try a refresh.

Now for the screenshots of the other minor bug mentioned before.
I started a refresh of a magic playlist and as soon as the first level of subnodes appeared, I opened a new tab and went to click on the music node.
I got a popup before choosing the music node.
Image
I clicked ok and then a second popup.
Image

Also I noticed that the magic playlist below the one I was refreshing was expanded in the new tab I was in (maybe something to do with it?).
Also I noticed that masks disappear and even the names of other playlists disappear, but the playlist is still there.
Big mess if you play with this a few times!!!

The bug does not happen when refreshing short single-node playlists. It does not happen with my last 6000+ playlist with 1 level of sub-folders.
It happens with my playlists of 6000+ 2-level of subfolders.
If I open a new tab before the first sublevels appear, no popups appear and the refresh is just stopped - only the first subnode is shown and I have to start a new refresh to bring the playlist to a healthy state.
At least no orphan playlists arise from this.

Hope this helps you to find the problem.

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

Post by ZvezdanD » Wed Jun 10, 2015 10:29 am

conandrum wrote:1. I found a small bug. If I start updating a MagicNode in playlists, which takes a few minutes, I can switch to another MM tab which could be showing the Music node or anything else. I noticed that this breaks the functionality of MN with multiple errors (something to do with node is missing or somthing). You have to force close MM and restart. It is very unusual that someone would do this while updating a MN but I had to report it to you.

I cannot reproduce it, but I will look at it. The next time you get the error, it would be nice if you post the screenshot saying on which line of code you got it.

conandrum wrote:1. I wish there was some indication as to what it is doing when updating a MN in playlists. At the moment I have a blank status bar. because my MNs take 5 or more minutes
to update, I would like to see a progress bar.

The progress bar cannot be displayed because the script doesn't know in advance how much folders/files should be added to the Playlists branch, but maybe I could add some kind of information to the progress bar when adding/updating such Magic nodes. Also, you could try with the option "Show elapsed time in the progress bar after SQL queries" turned on.

conandrum wrote:2. I am using 6 MN playlists to update to my phone. They are all children of playlists. When I add a few new songs to my library I have to update each one separately before I synchronize the phone. because I have to update each one separately I have to be a slave to my PC for at least 20 minutes.
I tried to stick all my MN playlists under another MN in playlists by manually moving my MNs under it (before the upgrade), but I could not refresh ALL MNs at once.

So, I WISH there was a one-click way to 'Refresh All MNs under Playlists' or even a way to group them under another MN in playlists which allows me to refresh all MNs under it.

I have implemented a possibility to Refresh all Magic playlists that belong to the same group choosing Refresh Magic Playlist command on that group node, but it seems that this command is now broken. Thanks for the report, I will fix it as soon as possible.

By the way, there is already a way to group several Magic nodes under some group in the Playlists branch using the Group option as it is the case with the regular Magic nodes (those that are outside of the Playlists branch).

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

Post by conandrum » Wed Jun 10, 2015 6:43 am

My comments on the new version:

The Positive
1. Robust installation - I had a custom Mask as you know (Decades by Genre) with the old version of MN. When installing the new version, it removed my MNs from playlists and it asked me to add these masks to the playlists area where they were before. Of course it identified errors in the custom mask with the 'decades-genre' field. 2 or 3 errors were poping up but it gave me the option to ignore them and all masks were added after a while with a message 'Installation was successful'.

2. Much more stable. The older version would most often give up half-way when refreshing huge magicnodes (7000 tracks in 100 2-level nested nodes) as a playlist child. It would go through the first 3-4 maybe 5 decades and then give up. I would have to manually update the rest of the decades. The new version is relentless and updates perfectly all child nodes of all my MNs.

3. The new syntax <Genre|Sort by:Decade> works just like I want it. Making "Decade - Pop" for example for each Decade and then sorting the list! Good job.

The Negative
1. I found a small bug. If I start updating a MagicNode in playlists, which takes a few minutes, I can switch to another MM tab which could be showing the Music node or anything else. I noticed that this breaks the functionality of MN with multiple errors (something to do with node is missing or somthing). You have to force close MM and restart. It is very unusual that someone would do this while updating a MN but I had to report it to you.

Wish list:
1. I wish there was some indication as to what it is doing when updating a MN in playlists. At the moment I have a blank status bar. because my MNs take 5 or more minutes
to update, I would like to see a progress bar.

2. I am using 6 MN playlists to update to my phone. They are all children of playlists. When I add a few new songs to my library I have to update each one separately before I synchronize the phone. because I have to update each one separately I have to be a slave to my PC for at least 20 minutes.
I tried to stick all my MN playlists under another MN in playlists by manually moving my MNs under it (before the upgrade), but I could not refresh ALL MNs at once.

So, I WISH there was a one-click way to 'Refresh All MNs under Playlists' or even a way to group them under another MN in playlists which allows me to refresh all MNs under it.

Good job and thanks for making this!

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

Post by conandrum » Sat Jun 06, 2015 11:21 am

Using the older version.

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

Post by ZvezdanD » Sat Jun 06, 2015 10:23 am

conandrum wrote:Can you please make some small adjustment to MagicNodes, so that whenever a magicnode is refreshed, these ghosts are removed from playlists table?

Which version of Magic Nodes did you use when you got those "ghost" playlists? The new version which I recently sent to you has much more improved work with playlists generated by Magic Nodes.

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

Post by conandrum » Sat Jun 06, 2015 10:03 am

Hi all,

I believe I have found a nuisance with MagicNodes.
See topic here - viewtopic.php?f=7&t=81097#p409143.

It has to do with playlists that become orphaned (lose their parent) when a magicnode is refreshed.
These MagicNodes are nodes that have been moved from their normal location and placed as "child of playlists".
In many situations e.g. when the child has an aggregate (count all) appended to the node, e.g. reggae (201 files), and later on more reggae files are added to the library and the node is refreshed, the node becomes reggae (220 files). In this case, the old playlist is orphaned and remains in playlists. It also continues to synchronize to the phone and there is no way to delete it! A ghost playlist. I have 471 of these now.

The only way to remove these is to run a command "delete from playlists where parentplaylist not in (select idplaylist from playlists) and parentplaylist > 0".

Can you please make some small adjustment to MagicNodes, so that whenever a magicnode is refreshed, these ghosts are removed from playlists table?

Thank you very much!

Script error message

Post by terrypin » Mon May 18, 2015 4:13 pm

I recently tried to tidy up but must have moved a script to the wrong place, because I now get this error message when I start MM:

https://dl.dropboxusercontent.com/u/401 ... odes-1.jpg

(I am running the latest MM version, 4.1.7.1741.)

Yet when I close that message, MM loads OK and Magic Nodes is in the tree.

Any suggestions on how I might fix this please?

The files MagicNodes.vbs, MagicNodes.ini and MagicNodes.ico, plus one called MagicNodes-Onenonymous.ini are all in C:\Program Files\MediaMonkey\Scripts\Auto

I'm also puzzled why scripts are in various different locations?

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

Post by willyvds » Thu Apr 30, 2015 6:01 pm

Hi Zvezdan, indeed I've had similar problems before. I tried al your suggestions and in the end I cleaned the library and it seems that that did the trick.
Thanks for helping again!

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

Post by ZvezdanD » Thu Apr 30, 2015 2:38 pm

willyvds wrote:Recently, Magic Nodes has become really ridiculouly slow. Nodes that used to take a few seconds do now need 5 minutes or more.
In the end they do run, but in the meantime I cannot do anything with MM.
Do you have an explanation? Or suggestion what I could do about it?
Regards, Willy

If I remember correctly, we already had the similar conversation. Firstly, please check if you have your database on some networked drive, e.g. NAS. Maybe its slowness is causing that.

Secondly, try some more complicated autoplaylists. If you get the similar timings then you have problem with the database, but not with the Magic Nodes. In that case you could try with the database's optimization.

You could also check if your database is causing slowness by executing the MN related SQL queries in some SQLite editor. To do that you should tick on the options to get the dialog box with the SQL queries whenever you select/expand some MN node ("Allow editing of SQL queries", "when expand field nodes" and "when select a field node"). After that copy displayed SQL query when you have expanded or selected some slow Magic node, paste it to the SQLiteSpy or some another SQLite editor and execute it.

If you have problem only with some MN nodes but not all, or if you have problem only with the latest version of Magic Nodes but not with the previous, then the add-on is causing that. In that case please be more specific with which version of the add-on you got slowness, and copy/paste here the problematic mask(s).

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

Post by willyvds » Thu Apr 30, 2015 11:13 am

Recently, Magic Nodes has become really ridiculouly slow. Nodes that used to take a few seconds do now need 5 minutes or more.
In the end they do run, but in the meantime I cannot do anything with MM.
Do you have an explanation? Or suggestion what I could do about it?
Regards, Willy

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

Post by ZvezdanD » Wed Apr 15, 2015 3:27 am

lostinthought wrote:HELP--MN Playlist saves music to MMA, but not the playlist

As I told you in e-mail, the MN created playlists are behaving in any aspect as regularly created static MM playlists. So, if you could synchronize your manually created MM playlists and get saved playlist files to your device, then you would get saved playlist files for MN created playlists as well.

You should have posted your message in the Device Synchronization forum without mentioning how you got playlists since that doesn't matter for your problem. I.e. your question should be: how to get exported playlists files (M3U) for corresponding MM playlists during synchronization automatically?

I don't have any experience with synchronization, but I suppose that you haven't enabled MN created playlists on the Auto-Sync (-->Device) tab of your Device settings.

Top