Page 7 of 27

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

Posted: Tue May 18, 2010 9:16 am
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

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

Posted: Tue May 18, 2010 9:36 am
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?

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

Posted: Tue May 18, 2010 12:11 pm
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.

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

Posted: Tue May 18, 2010 12:33 pm
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).

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

Posted: Tue May 18, 2010 2:20 pm
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.

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

Posted: Tue May 18, 2010 2:28 pm
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"?

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

Posted: Tue May 18, 2010 3:35 pm
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.

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

Posted: Tue May 18, 2010 4:00 pm
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.

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

Posted: Tue May 18, 2010 4:07 pm
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?

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

Posted: Tue May 18, 2010 4:24 pm
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.

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

Posted: Tue May 18, 2010 4:45 pm
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.

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

Posted: Tue May 18, 2010 5:21 pm
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.

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

Posted: Tue May 18, 2010 5:30 pm
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.

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

Posted: Wed May 19, 2010 2:53 am
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.

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

Posted: Wed May 19, 2010 12:41 pm
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