Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Add a "Copy files and generate playlist" feature (Read 282 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Add a "Copy files and generate playlist" feature

Foobar can copy files.

Foobar can save playlists.

If only it could combine the two so I can copy all track files in the current playlist to a new directory and have a playlist generated with relative paths (not absolute paths) saved in that new directory.

Currently I'm using a little tool called "M3U-Copy" to do this: https://www.codeproject.com/Articles/885864/M-U-Copy-a-tool-for-playlists
But it's a bit of a clunky process because M3U-Copy doesn't like the m3u files made by foobar since it expects #EXTM3U at the beginning and #EXTINF before every entry. My workaround is to just import and re-export the m3u using Mp3tag.

The foobar 1.4.1 changelog mentions:
Added EXTM3U info writing (enabled via advanced preferences).
But maybe I'm going blind because I can't find this feature anywhere.

 

Re: Add a "Copy files and generate playlist" feature

Reply #1
I agree .m3u playlists handling is a lacking a bit in foobar... but you could do it following a different order.

Instead of saving playlist and copying files, first create a playlist, add the files and then copy them to the desired folder (using index in playlist as name prefix). At that point remove the tracks at the playlist and copy back the (new) files to the playlist, replacing the original ones.

Then save the playlists to m3u. It's supposed foobar uses relative paths if the tracks are in the same folder than the output folder for the playlist, so you would get both of your requisites at that point.

Alternatively you may use Playlist-Manager-SMP
https://hydrogenaud.io/index.php?topic=120979.0
which has full support for EXTM3U structure, relative paths, automatic syncing between playlist file and playlist within foobar, etc.

Re: Add a "Copy files and generate playlist" feature

Reply #2
I don't know if this is true for others, but the way my playlists come into existence basically involves me playing a lot of different music from a whole bunch of places and if I think one random thing sounds good with another thing I have them play next to each other, and this process repeats slowly over time until the playlist gets pretty long (50+ items avg) and everything is in the order that I like it. Very often stuff is saved off YT or SoundCloud and put in various folders likely to never be sorted.

It's fine when everything is accessed from one PC but eventually there comes a time when I want to share my playlists or play them on an entirely different PC. Ideally I would just copy the files and m3u to a flash drive and when the m3u is accessed on the flash drive everything just plays in the expected order. Even if foobar can treat absolute paths as relative if the actual files are indeed in the same directory as the m3u there's no guarantee other programs will do the same, which could be a problem down the line.

Perhaps a simpler thing I could also do is just modify the m3u playlist directly to replace the absolute paths with relative paths, but that would still involve a separate text editor and likely a bit of regex, so it's debatable if this would be faster than just sticking with M3U-Copy. Or would your approach be faster at making my playlists portable?

Re: Add a "Copy files and generate playlist" feature

Reply #3
The foobar 1.4.1 changelog mentions:
Added EXTM3U info writing (enabled via advanced preferences).
The option is under -
Preferences > Advanced > Tools > 'Write EXTM3U playlists'

Re: Add a "Copy files and generate playlist" feature

Reply #4
I don't know if this is true for others, but the way my playlists come into existence basically involves me playing a lot of different music from a whole bunch of places and if I think one random thing sounds good with another thing I have them play next to each other, and this process repeats slowly over time until the playlist gets pretty long (50+ items avg) and everything is in the order that I like it. Very often stuff is saved off YT or SoundCloud and put in various folders likely to never be sorted.

It's fine when everything is accessed from one PC but eventually there comes a time when I want to share my playlists or play them on an entirely different PC. Ideally I would just copy the files and m3u to a flash drive and when the m3u is accessed on the flash drive everything just plays in the expected order. Even if foobar can treat absolute paths as relative if the actual files are indeed in the same directory as the m3u there's no guarantee other programs will do the same, which could be a problem down the line.

Perhaps a simpler thing I could also do is just modify the m3u playlist directly to replace the absolute paths with relative paths, but that would still involve a separate text editor and likely a bit of regex, so it's debatable if this would be faster than just sticking with M3U-Copy. Or would your approach be faster at making my playlists portable?
I don't understand your comment... the steps I described do exactly what you want at first post, with the original order you set on playlist (?). Obviously you have to enable EXTM3U as noted.
The Playlist Manager too, along many more features and utilities which may come handy for syncing playlists between different PCs, a shared music network server, etc.

If any of those solutions are good enough for you, that's something you will have to try by yourself.

 
SimplePortal 1.0.0 RC1 © 2008-2021