Export M3U/Playlists for Child Nodes 2.8 (2009-08-25)[MM2+3]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Export M3U/Playlists for Child Nodes 2.8 (2009-08-25)[MM2+3]

Postby ZvezdanD on Thu Nov 27, 2008 4:46 pm

Description:
This script works with MM 2.x (more or less) and 3.x. It has two operation mode, manual and automatic. In the manual mode it allows batch export of .m3u files or creating of playlists for each child node of the node selected in the tree panel. This works with almost all nodes, even the Magic Nodes. In the automatic mode it periodically saves specified playlist node from the Playlists branch. Playlists are saved in a hierarchically organized folder structure within a specified parent folder, in ANSI, UTF-8 or Unicode. Track paths could be stored absolute or relative to the .m3u file path.

Download:
http://solair.eunet.rs/~zvezdand/Export ... bNodes.htm

Image

What is new:
v2.8 - 2009-08-25
- Added: option to save .m3u files in child folders, i.e. one level more in depth (until now they are saved to parent folders only).

v2.7 - 2009-07-08
- Added: option to replace folders in .m3u files with specified string;
- Added: option to remove Byte-order mark (BOM) from the begin of UTF-8 files.

v2.6.1 - 2009-04-21
- Fixed: error with Options sheet and playlists with duplicated names.

v2.6 - 2009-04-20
- Added: option to create a new dated folder once in a day.

v2.5 - 2009-04-20
- Added: option for an automatic export on startup;
- Added: option to create a new folder with a date/time in its name for every auto-export.

v2.4 - 2009-04-19
- Added: option to automatically export specified playlists on shutdown or periodically with customizable time interval.

v2.3 - 2009-04-17
- Added: option to exclude AutoPlaylists from export.

v2.2 - 2009-04-16
- Added: option to save .m3u files in simple or extended format;
- Improved: speed when export nodes from Playlists branch.

v2.1 - 2009-02-25
- Added: option to save .m3u files as ANSI, UTF-8 or Unicode.

v2.0 - 2009-02-12
- Added: possibility to create playlists in the Playlists node in similar way as export of .m3u files.

v1.4 - 2009-01-24
- Improved: speed with MM 3.1.0.1218 and up, especially for empty nodes/folders.

v1.3 - 2009-01-10
- Added: option to export the playlist for the parent (selected) node (beside of child nodes);
- Added: option to exclude unavailable tracks from export;
- Improved: speed and work with the All nodes from My Computer and Location branch;
- Fixed: relative paths;
- Fixed: playlist filenames for some Magic Nodes, e.g. Album Artist with Album (MN v2.0 or up required).

v1.2.1 - 2008-11-29
- Fixed: export when turned on the Regular expressions option and turned off the Skip for folders option.

v1.2 - 2008-11-29
- Added: an option to store track paths relative to the playlist path (default setting as it is in MM);
- Added: an option to skip export of playlists for specified nodes/folders (e.g. DiscXX for multi-CD);
- Added: an option to use Regular expressions for specifying nodes/folders;
- Added: an option to exclude files with specified extensions from export;
- Added: skipping of All node (even for Magic Nodes) and playlist files from My Computer branch from export;
- Fixed: unresponsive program with 100% CPU when trying to export an empty node/folder (e.g. in My Computer node).

v1.1 - 2008-11-28
- Added: an option to recursively scan all sub-levels of the selected node (default setting), playlists are stored in a hierarchically organized folder structure, same as with the selected node.

v1.0 - 2008-11-27
- First public version.

Installation:
  • For MediaMonkey 3.x - just double-click on the ExportM3UsForSubNodes.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 the ExportM3UsForSubNodes.vbs file to the MediaMonkey's "Scripts\Auto" folder and restart MM program.

Usage:
Select File / Export M3Us for child nodes... or right-click on the selected node and choose the Export M3Us for child nodes if you want to export .m3u files. After that you should specify the parent folder.

Select File / Create playlists for child nodes or right-click on the selected node and choose the Create playlists for child nodes if you want to create playlists. After that you should specify the parent playlist node.

Script settings are in the Tools / Options dialog box within Filtered Statistics Report tab.

Limitations:
Refreshing of the tracklist panel works very strange in MediaMonkey 2.x and because of that the user needs to click on the confirmation dialog after every generated playlist, i.e. for every sub-node. This confirmation dialog is not needed with MM 3.x, but speed and reliability are much better if you have installed MM 3.1.0.1218 or up. Nodes within the Playlist branch don't have such limitation, only regular nodes.
Last edited by ZvezdanD on Tue Aug 25, 2009 4:40 pm, edited 18 times in total.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby nynaevelan on Thu Nov 27, 2008 5:35 pm

ZvezdanD:

This script has some great potential but I am running into a problem for nodes which have alot of child nodes. I tried it on a node which had 3 children and each of them had 250 children. It exported the three children but not playlists for the 250 children of each node. I tried it on one of the 3 children and it did export the 250 child nodes as playlists. :( It seems to only process the first child node and none of the child nodes after. This is something that I would enjoy using but I do not have many nodes which I would export which only have one level. :( I can think of some instances where I wouldn't want it to export the children but also instances when I would. Is it possible to have an option to export just the top level or all existing levels? And if you can add it, can the exports be in the same folder structure as they exist in the node?

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4641
Joined: Thu Feb 08, 2007 4:07 am
Location: New Jersey, USA

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby ZvezdanD on Thu Nov 27, 2008 6:22 pm

Well, I though about a possibility to recursively go into all sub-levels of selected branch, but in that case I don't know where to store playlists. It could work if all tracks from some node are in the same folder, e.g. if I have one artist on the first level and its albums on the second level, so I could write playlists for each album into corresponding folders. But where to save playlist file if its node contain tracks from many folders? For example, I have the Year node which contain sub-nodes from many years, and each year contain tracks from different folders... In that case nodes don't have same folder structure as you mentioned.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby nynaevelan on Thu Nov 27, 2008 6:33 pm

I guess that would apply if you are savng the playlists in the same folder as the tracks. But here I have my playlists saved in a separate folder, so the only structure which I would want is the same as the node(s) in MM. But if you are saving them in the same directory as the track, how about saving it in the first location that the tracks exists in. But if you are saving them in multiple locations, wouldn't this make using them more difficult since you would have to look in many locations for the playlists?

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4641
Joined: Thu Feb 08, 2007 4:07 am
Location: New Jersey, USA

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby ZvezdanD on Thu Nov 27, 2008 7:19 pm

Actually, I prefer to store playlists within parent folders of contained tracks. Here is an example how I have organized tracks: <Genre>\<Artist>\<Album>. So, if I select Pink Floyd node which contain nodes "The Piper at the Gates of Dawn", "A Saucerful of Secrets", "More", ... I could store each playlist into folder with contained audio tracks, just because each album has corresponding folder, i.e. connection is unique and unambiguous. But, now if I have Year node which contain nodes 1967, 1968, 1969, ... they could contain tracks from many artists and albums beside of Pink Floyd, and because I don't have folder level for the Year I don't know where to store playlists for corresponding years.

If I understand correctly your suggestion, I could have audio tracks for example in d:\My Music\Rock\Pink Floyd\The Piper at the Gates of Dawn, d:\My Music\Rock\Pink Floyd\A Saucerful of Secrets ..., and playlists into some another location, for example e:\My Playlists\Rock\Pink Floyd\The Piper at the Gates of Dawn, e:\My Playlists\Rock\Pink Floyd\A Saucerful of Secrets, ... Well, I don't see a point to put playlists into some new folder structure into some another location which is not connected with audio tracks when I already have same folder structure with audio tracks. When I have playlists organized into folders and their sub-folders, it doesn't matter if they are stored into d:\My Music\... or e:\My Playlists\..., right?

Anyway, I could add a possibility to this script to recursively store all playlists into location(s) wherever you want, but you should explain me exactly where this should be done because I don't have any idea. This solution should be general and it should work for every possible situation with different nodes, not only Artist and Album, but also Year, Conductor, Classification, custom created nodes...
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby ZvezdanD on Thu Nov 27, 2008 7:27 pm

By the way, i have one stupid question. Is it correctly to say "Child Nodes" or "Children Nodes"? You know, my English is not very well.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby nynaevelan on Thu Nov 27, 2008 7:44 pm

I'm a native English speaker but don't quote me on correct grammar, :wink: but I think Child Nodes is the correct term.

Here is how mine is stored, I have my tracks stored in folders by Genre and that is it. But my playlists are stored in a separate folder based on how the playlists are stored in MM (...\My Playlists\...). Because I use my playlists between many computers I do not want them scattered all over, just one parent folder for me to grab up and be on the go. To use this script as I use the other Export M3U scripts I need for it to be able to maintain the node structure as it is in MM, that way when I use the import M3U feature of DEISync, I can have the file structure whether I have the custom node installed or not. Here is a pic of part of my file structure to give you an idea of what I need. BTW my playlists have a more structured hierarchy than my tracks, once again I need simplicity there to make it easier to move the tracks back and forth on my player and to use the Custom Report script to run reports comparing data between my player and MM.

Image

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4641
Joined: Thu Feb 08, 2007 4:07 am
Location: New Jersey, USA

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby ZvezdanD on Thu Nov 27, 2008 8:00 pm

OK, I will try to add recursion, but I am now just wondering what about a path? It is currently stored in absolute form, i.e. d:\My Music\Rock\ When you transfer your playlists to some another computer it could not have same drive letters, nor root folders. How about portable players, which kind of path they should have? Maybe I should store relative path to files, e.g. ..\Rock\.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby nynaevelan on Thu Nov 27, 2008 8:07 pm

Personally I prefer absolute paths and yes I have all my computers setup to use the same path to ensure minimal problems, but I think to cater to a wider audience relative paths might be best. And the path on my player is different but the script shouldn't have to worry about that because my syncing is based on the playlists within MM and MM will make the necessary changes when syncing to the player(s).

BTW, I am sorry for taking the focus away from your original intent. :oops:

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4641
Joined: Thu Feb 08, 2007 4:07 am
Location: New Jersey, USA

Re: Export M3Us for Child Nodes 1.0 (2008-11-27) [MM2+3]

Postby ZvezdanD on Thu Nov 27, 2008 8:11 pm

You should not be sorry. This is exactly my intent, since I already planed such thing for the next version.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.1 (2008-11-28) [MM2+3]

Postby ZvezdanD on Fri Nov 28, 2008 1:16 am

There is a new version of the script.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.1 (2008-11-28) [MM2+3]

Postby nynaevelan on Fri Nov 28, 2008 2:08 am

Thanks for the quick update and it is quicker now also. Thanks for adding another script to my arsenal. :D :D

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4641
Joined: Thu Feb 08, 2007 4:07 am
Location: New Jersey, USA

Re: Export M3Us for Child Nodes 1.2 (2008-11-29) [MM2+3]

Postby ZvezdanD on Sat Nov 29, 2008 5:29 pm

I am not sure about the speed increase, but the script intentionally is slowing down its execution with one loop because it need to wait for MM to refresh tracklist when node is changed. This is a main reason why things could go wrong, since MM don't expose necessary event for detection when the tracklist is finished with refreshing. I tried to do my best to eliminate unneeded results, but there is some small possibility that sometimes script could not detect that tracklist has any track because MM is not fast enough to refresh it and in that case playlist wouldn't be created at all. So, I recommend to check a result of the script execution, at least in the begin.

By the way, there is a new version of the script (1.2) with some additions and removed one critical bug.
ZvezdanD
 
Posts: 1648
Joined: Fri Jun 09, 2006 12:40 am

Re: Export M3Us for Child Nodes 1.2 (2008-11-29) [MM2+3]

Postby nynaevelan on Sat Nov 29, 2008 7:32 pm

ZvezDanD:

Version 1.2 does not seem to be working for me, it doesn't export any playlists. Here are my settings:

Image

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4641
Joined: Thu Feb 08, 2007 4:07 am
Location: New Jersey, USA

Re: Export M3Us for Child Nodes 1.2.1 (2008-11-29) [MM2+3]

Postby ZvezdanD on Sat Nov 29, 2008 8:30 pm

Sorry. There is a fixed version. Thanks for the report.
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: Ask Jeeves [Bot], Bex, Heartsbane, martialartsguy, Owyn and 8 guests