MinimServer Forum
Playlist (.m3u) and fully qualified file names - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Support (/forumdisplay.php?fid=4)
+--- Thread: Playlist (.m3u) and fully qualified file names (/showthread.php?tid=3213)



Playlist (.m3u) and fully qualified file names - Budgie - 30-05-2016 00:00

I have a number of .m3u playlists which I created years ago and which have each track defined as a fully qualified file name. Trouble is the music data files have all been moved onto NAS and the paths from root have all changed. The manual states that minimserver recognises .m3u files as playlists but the ones I have do not work which comes as no surprise, I believe because of the changed path.

Does anybody have any suggestions as to the easiest way to edit the .m3u files so that they work on the NAS with minimserver. Does each track have to have the fully qualified file name which exists on the NAS or can minimserver build what is needed and if so how do I set this up?

Grateful for some help on this please.


RE: Playlist (.m3u) and fully qualified file names - simoncn - 30-05-2016 07:19

The only solution is to fix the playlists. You should be able to do this using a Linux tool such as sed.

As part of this conversion, it would be a good idea to change the playlists to use relative paths with forward slashes instead of absolute paths. This enables you to move the library in future without needing to change the playlists.


RE: Playlist (.m3u) and fully qualified file names - DavidHB - 30-05-2016 10:32

(30-05-2016 07:19)simoncn Wrote:  As part of this conversion, it would be a good idea to change the playlists to use relative paths with forward slashes instead of absolute paths. This enables you to move the library in future without needing to change the playlists.

I agree with this; it is what I do. You do need to be careful that, in the course of any move, the playlist files stay in the same relative position to the music files. I find that the easiest way to do this is to have a separate Playlists folder in my music folder (where MinimServer will scan it); if the structure of the music folder remains constant, the playlist files will continue to work.

If you have a Windows computer and can access the Music folder on the NAS, you can use the Playlist Creator tool, to regenerate your playlist files directly on the NAS. Playlist Creator has options both to use relative rather than absolute paths and to save files with forward rather than backslashes. Playlist Creator does show you when a file path is valid, so you can check the changes you make as you go. What it does not do is search and replace, so (depending on how extensive your playlists are) an initial stage of text editing as recommended by Simon and then running Playlist Creator may provide the easiest means of working.

David


RE: Playlist (.m3u) and fully qualified file names - Budgie - 30-05-2016 10:34

Hi Simon,
Many thanks. I am OK with sed but am not sure how to set up the relative path. At present the path is, for example:-
/home/alastair/mp3/Rock/music_file.mp3
I have no idea what the fully qualified path is on NAS but agree relative paths would make sense but relative to what?

At present my music files are on nas in:-
?/Multimedia/Music/<genre>/music_file.

The playlists will probably remain in the Music/ directory as /Music/playlist_1.m3u etc. so how should I define the path in .m3u file if it is to be relative?
Sorry to be so dumb once more


RE: Playlist (.m3u) and fully qualified file names - Budgie - 30-05-2016 12:52

Just to confirm I have it now with playlists in ~/Multimedia/Music directory and ./<genre> all is well. I take the point about having a separate directory for playlists but will save that for later.

Just in case anybody follows my footsteps here sed is brilliant but when a directory / appears in the characters to be moved as in my case the delimiter # is best used instead of /, ie;
sed -i -e 's#foo#bar#g' <filename>