Export/Create Playlists 4 Child Nodes 4.0 (2013-07-10)[MM2+]

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

Moderators: Peke, Gurus

markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by markstuartwalker »

I am pretty sure that this is possible with this add-on
The regular expression you reference controls the paths of the mp3 files within the .m3u file. This doesnt do what I want.

I want to create a set of .m3u files in a single folder which point to the original mp3 files. Hence it is the path of the m3u files that I want limit to a single folder - the folder structure always comes from the playlist hierarchy. There is no option to control the name of the .m3u file - it always takes the name of the playlist.

I didn't know about the $1 and $2 regex facilities - they will be part of the solution .... somehow.

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

markstuartwalker wrote:The regular expression you reference controls the paths of the mp3 files within the .m3u file. This doesnt do what I want.

I want to create a set of .m3u files in a single folder which point to the original mp3 files.
Sorry, you are right. Actually, this is a very good idea and I think I will add something like that for the next version, e.g. Export to single folder. However, I want to implement that without changing Options dialog sheet for too much, so I have a few question for you if you could help me. Firstly, could I always replace x: with /x if someone turn on the option Unix separator? Secondly, should I use the option Replace folder ... with ... for .m3u files physical location instead of their path representation inside of the .m3u files?
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
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by markstuartwalker »

Export to single folder
Might I suggest that you replace the "Unix Folder Separator" switch with a more generic solution which can replace chunks of the m3u destination path in a similar style to the "Replace folders in m3u files". After all '\'->'/' replaces the separators to make it unix, I simply want to replace separators with an abstract character, say '-'.

You could have a single string that contains a list of source/destination pairs to be actioned on the m3u path. If the pair separator were ',' and space were the list separators.

Code: Select all

k:,/k \,-
Would replace the drive letter with a unix mount point and swap all the separators from windows to dashes - that's me sorted! But it would be very flexible to allow others to do all sorts of other things.
  • replace spaces with %20 or underscores
  • replace upper and lower cases
Some care needs to be taken with the choice of separators to avoid clashes with regex characters.
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by Lowlander »

I'd like to request that the manual export remembers the last folder used for export. Unfortunately it seems I can't use the automated export as it renders playlists unusable on occasion. I don't know where the issue lies as merely saving the playlist again solves the issue. The issue could be the way MM/script save the files, the NAS is made aware of changes, the NAP is reading these files. I've switched back to manual export to see if the problem goes away, but it's a hassle to have to navigate the playlist folder (somewhere on the network).
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

markstuartwalker wrote:Might I suggest that you replace the "Unix Folder Separator" switch with a more generic solution which can replace chunks of the m3u destination path in a similar style to the "Replace folders in m3u files". After all '\'->'/' replaces the separators to make it unix, I simply want to replace separators with an abstract character, say '-'.
I am already thinking to implement possibility to specify destination path for .m3u files using some option similar to "Replace folders". However, I don't want to change Options sheet so much because I have no free space on it (and I don't like an idea to create one additional option sheet for few extra options). This is a reason why I considered a possibility to use same "Replace folders" controls for both things, i.e. for specifying physical destination path of .m3u files and for their representation inside of .m3u files themselves. Anyway, I think now that it would be better if I just add one more radio button "Export to single folder" in same group with "Export to parent/child folders", then one text box for specifying that folder and one text box for specifying separator which will be used in file names of .m3u files.

I know that "Unix folder separator" option could be replaced with the option similar to "Replace folders", but I though that it is more easier, especially for beginners, to tick just one check box then to specify some complicated Regular expression. This is also a reason why I asked you about Unix/Linux since I have a very limited knowledge about it. I need to know if I could replace x: with /x always (where "x" is arbitrary drive letter), or is it something which is specific to your Subsonic Linux server. If it is general stuff related to Linux, I could implement that replacement of drive letter into the script and instead of "Unix folder separator" option I will make it as "Unix paths in .m3u files".

Also, I think that it is not so simple to just replace all "\" in path with "-" as you suggest. What if someone wants to put all .m3u files into e.g. Playlists folder which is in the root, so instead of e.g. x:\My Music\Rock\Pink Floyd\Dark Side of the Moon\ you want to get x:\Playlists\Rock-Pink Floyd-Dark Side of the Moon.m3u - as you could see, the first two "\" should not be replaced with "-".
markstuartwalker wrote:You could have a single string that contains a list of source/destination pairs to be actioned on the m3u path. If the pair separator were ',' and space were the list separators.

Code: Select all

k:,/k \,-
Again, it is not so simple as you think. What if someone wants to use a comma or a space character for replacement and how script could know that they are not pair/list separators that you are suggesting? I think that "Replace folder" option is already too complicated for most users and I bet that many users don't use it at all. I am not sure that introducing some new, even more complicated syntax for replacement is the best approach.
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
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

Lowlander wrote:I'd like to request that the manual export remembers the last folder used for export.
It is already remembered, i.e folder which you choose for export is stored into .ini file. Are you sure that you get some another folder?
Lowlander wrote:Unfortunately it seems I can't use the automated export as it renders playlists unusable on occasion. I don't know where the issue lies as merely saving the playlist again solves the issue. The issue could be the way MM/script save the files, the NAS is made aware of changes, the NAP is reading these files.
I am not sure that I understand, but it would be nice if you could help me to figure out why this is happening with automated export. What do you mean by "it renders playlists unusable on occasion"?
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
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by Lowlander »

I right click on Playlist node that has sub-playlists and use Export M3Us for child nodes and I get nothing selected at all:
Image

As for the unusable playlist, my NAP fails to read them in on occasion. As said I'm not sure it's the scripts fault and I'm currently testing to see if manual export is failure free.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

Lowlander wrote:I right click on Playlist node that has sub-playlists and use Export M3Us for child nodes and I get nothing selected at all:
Could you open the MediaMonkey.ini file and check LastExportM3UsDir key in the [Scripts] section? This add-on use the same .ini key for storing folder as native Export M3Us script/option, so maybe there is some conflict with it. I think it would be better if I change that .ini key to be unique to this add-on.
Lowlander wrote:As for the unusable playlist, my NAP fails to read them in on occasion.
Maybe it could be helpful if you send me such unusable playlists to take a look at them by myself.
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
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by Lowlander »

LastExportM3UsDir has the correct value, and I don't use the native M3U exporter.

There is nothing wrong with the playlist, opening it in a text editor and saving it solves the problem. I think the issue is with the way the playlist file is created on the NAS. My assumption is that the NAS doesn't get/read/something that there is a newer version of the file and that somehow causes the NAP to hang. The thing that throws me off is that it seems that manual saving works, at least it used to work, but since I have updated the OS on the NAS as well as the script. Am I right that the script doesn't save the file different if it's automated versus manual?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

Lowlander wrote:LastExportM3UsDir has the correct value, and I don't use the native M3U exporter.
Do you want to say that the mentioned key has some existing folder that you want to see, and it is not displayed when you choose Export M3Us for child nodes option again?
Lowlander wrote:There is nothing wrong with the playlist, opening it in a text editor and saving it solves the problem.
Simple open/save solved problem? Which format you have selected in this add-on (ANSI, UTF-8) and which format you choose in a text editor? If you have selected UTF-8, did you try to enable/disable BOM?
Lowlander wrote:Am I right that the script doesn't save the file different if it's automated versus manual?
The same function is using for saving .m3u files for both automated and manual mode.
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
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by Lowlander »

ZvezdanD wrote:Do you want to say that the mentioned key has some existing folder that you want to see, and it is not displayed when you choose Export M3Us for child nodes option again?
Exactly, in my case it's a network location.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

Lowlander wrote:in my case it's a network location.
Well, this should go to the Bug Reports forum. It is not my fault that MM built-in SelectFolder dialog box doesn't support network drives for initial folder.

You didn't answer which format you used for .m3u files when you tried automatic export.
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
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by Lowlander »

Okay, at least it's clear where the issue lies.

I will need to check the latter when I'm at that computer.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by ZvezdanD »

Lowlander wrote:at least it's clear where the issue lies.
There is one more similar MM bug: The Find More from Same\Folder (My Computer) option cannot find a folder inside of the Network branch.
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
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Export M3U/Playlists for Child Nodes 2.9 (2010-04-22)[MM2+3]

Post by Lowlander »

ZvezdanD wrote:There is one more similar MM bug: The Find More from Same\Folder (My Computer) option cannot find a folder inside of the Network branch.
You're right: http://www.ventismedia.com/mantis/view.php?id=6367
Post Reply