[Feature Request] Playlist All export - Remember last export

Looking for a quality of life feature. When Export > Playlist All Files is used, it seems to default to the launched directory it was called from on context click. Is it possible for Mp3tag to have a running directory list or remember the last export file and path it used? My save location requires at least 6 clicks to get to where I need it for my workflow and if it could remember that path, it would be a helpful feature add.

Thanks.
Chris

Instead of the default playlist generation, you could use an export script like this one

and replace the $filename() statement with an absolute path so that you playlist ends up in the same place all the time.

I gave that a fast spin, I am finding that after I paste in the code to the MTE and execute it... the output is rewriting the MTE file as the playlist... So I'm missing something there... trying to figure it out.

If you need any further ideas, the actual code would be of interest.

I found this (M3U section) and switched the path to D:\20 for my testing: Export Configuration Archive

$filename(D:\20.m3u)#EXTM3U
#EXTINF:-1,----- %_directory% (%_total_time2%) -------------------
X:\----- %_directory% (%_total_time2%) -------------------.x$loop(%_filename_ext%)
#EXTINF:%_length_seconds%,$if($or(%artist%,%title%),$if($not(%track%),,$num(%track%,2). ),)$if(%artist%,%artist% - %title%,%title%)$if($or(%artist%,%title%),,%_filename%)
%_filename_ext%$loopend()

But when I execute the script (for a single file export test), I get a windows error of:

> ---------------------------
> Mp3tag v3.22
> ---------------------------
> File "C:\Users\xxxxxxxxxxx\AppData\Roaming\Mp3tag\export\Export-CMB.mte"
> cannot be opened.
> ---------------------------
**> OK **
> ---------------------------

Could it be that your text editor blocks the MTE file and that you have to close the editor first?
I had no such problems.
I performed the following steps:

  • Copied the code from your post
  • Pressed Ctrl-E to open the Export dialogue,
  • Clicked on "New"
  • got an editor windows with the sampe script code
  • selected all of the code and
  • pasted the code from the clipboard,
  • adapted the filename to c:\temp\20.m3u
    ... and got a file 20 with the extension m3u in the folder c:\temp

It probably didn't work because I'm an idiot. I was trying to run it from the script menu instead of the export menu option (been a while since I'm used the app like this). I got it working "almost" exactly as I want using:

$filename(C:\Users\XXXXXXXXXXXx\Desktop\MP4 Videos For Listening-Test.m3u,utf-8)
#EXTM3U $loop(%track%)$loop(%_filename_ext%)
#EXTINF:%_length_seconds%,%artist% - %title%
%_folderpath%%_filename_ext% $loopend()$loopend()

The file is properly generated and works as expected, with one caveat..... the very first line of the text file is blank and the info starts on line 2 using Notepad++. Is there a way to prevent a carriage return on the first line? I can manually delete it, but that is just silliness over time. Thanks for the help, hopefully this issue is something easily fixed?

The number of lines in the script are also reflected in the output.
So if you merge the first line with the first output word, it should be ok:

$filename(C:\Users\XXXXXXXXXXXx\Desktop\MP4 Videos For Listening-Test.m3u,utf-8)#EXTM3U $loop(%track%)$loop(%_filename_ext%)
#EXTINF:%_length_seconds%,%artist% - %title%
%_folderpath%%_filename_ext% $loopend()$loopend()

That fixed it and it starts at the top now. Thanks.

The only other function thought I had about doing it this way is that I have to force a select all or it only exports a single line or select array... Is there a command that will tell the script to force an internal "select all" kind of like the menu does by default in the program?

And is it possible to remove my deleted posted... the edit history shows my edit... and the point of the delete was to remove my name. I thought deleting it would nuke the post altogether, seems that isn't the case.

In your script you should replace that with $loop()1) so that the order in the file list is kept. Otherwise the files will be sorted by track number.
No, there is no function to generate an export for "all". The export is always generated for the currently selected files. You would have to press Ctrl-A to select all.

Perhaps all this a little over the top. If that was the case: sorry.

I mean: you could also set a default filename for the playlists in the options:
Ctrl-OPlaylist
And if that filename follows similar rules like the one in the export script, you should get the "playlist for all" function.

LOL, it was a good learning experience... the built in playlist in options solves it all... I just put the path and the filename I want... every change.. blamo.... new playlist on save... Thanks for the help and tips... much appreciated.