Help - Search - Members - Calendar
Full Version: m3u playlists & relative paths
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
knathraak
Hi,

I'm using m3u playlists because of their near universal compatibility, and simple format. My problem is that depending on where I access the m3u file from (it's stored on my file server) the path to the actual mp3 file varies.

My mp3s are all stored on a samba file server (soon to add nfs for linux clients). The share gets mounted as s: in windows. The files are stored under s:\mp3s\artist\album\01-track_name.mp3. I store m3u playlists under a separate directory called, imaginatively enough, playlists, i.e., s:\mp3s\playlists\my_favs.m3u.

When I save the m3u files under s:\mp3s\playlists\ the winamp (and foobar, too, it appears) sets an absolute path to the mp3 file as such:
CODE
S:\mp3s\Nine Inch Nails\The Downward Spiral\14 - Nine Inch Nails - Hurt.mp3

This breaks the playlist if I access it from a different computer that, say, doesn't mount the share as s:, but rather browses the network directly, like so:
CODE
\\Babylon\share\mp3s\Nine Inch Nails\The Downward Spiral

or if I'm accessing the mp3s from a linux client then the path would be like so:
CODE
/mnt/mp3s/Nine Inch Nails/The Downward Spiral/

etc.

So I need the mp3s to use relative paths--even if the mp3 is not in a subdirectory from where the playlist is saved. For example, if I edit the m3u playlist so that it reads:
CODE
..\Nine Inch Nails\The Downward Spiral\14 - Nine Inch Nails - Hurt.mp3

This works perfectly in all cases (most players in linux are happy with backslashes). the '..' climbs me back up into the mp3s directory so that I can descend back down into the artist/album/ directory.

Does anyone know of
(a) program that does this
(b) a way to make fubar do this
© a way to make winamp do this
?

Thanks
Klyith
Foobarand Winamp will use relative paths when saving playlists, but only under certian conditions. The mp3 (or whatever) file must be in the same directory or a subdirectory of the location where the playlist is saved. So anything that would need a "..\" is out.

Your options, from most difficult to least:
1. Code a new foobar plugin that changes how playlists are saved to always use relative paths.

2. Use a search and replace tool to do a global replace of all "S:\mp3s\" instances with "..\". You'd have to redo this periodically whenever you saved new playlists. Foobar FPL files are not plain ascii text, so some tools may not work or bugger them up.

3. Save all your playlists in the root "mp3s" directory.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.