Skip to main content


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: [Suggestions / Wishlists] for future updates (Read 56157 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [Suggestions / Wishlists] for future updates

Reply #400
Relative paths in playlist exports.

I'd really like to store my playlists in a separate folder, but it appears that foobar only uses relative paths if the path of the playlist is wholly contained within the path of the music file, and if it does, strip it from the music filepath and put the remainder in the playlist.

playlist_path  = /dir1/dir2/dir3/dir4/playlist.m3u8
music_filepath = /dir1/dir2/dir3/dir4/dir5/track1.flac

So the path that gets written to the playlist becomes dir5/track1.flac

I understand why you'd want to scope the traversal of directories, but how about you opened it up to those contained within the Music Library path?

Music Library Path  = /dir1/dir2/dir3/dir4/dir5/
music_filepath      = /dir1/dir2/dir3/dir4/dir5/music/track1.flac
playlist_path       = /dir1/dir2/dir3/dir4/dir5/playlists/playlist.m3u8

Both contain the "Music Library path" so strip the Music Library path from both, and suffix music_filepath with as many ../ as there are folders remaining in playlist_path.
music_filepath      = music/track1.flac
playlist_path       = playlists/playlist.m3u8

becomes ../music/track1.flac

It handles loading of playlists containing ../, so it would make it more consistent if it could also create them.

Regardless, thanks for the truly excellent piece of software.