Bugzilla – Bug 236
make m3u files with backslashes from windows systems parse cleanly elsewhere
Last modified: 2008-12-15 13:05:23 UTC
Submitted by Art Mellor I run my slimserver on Linux. I like to create my playlists using a variety of methods on different computers. Some of them are created on windows by winamp. I wanted the slimserver to be able to read the playlists created that way. My mod is below. In the file Slim/Formats/Parse.pm I added the following line right after carriage returns are fixed. I'm assuming you'll need something more general since this probably breaks the playing on windows. sub M3U { my $m3u = shift; my $m3udir = shift; my @items; my $title; my $itemCount = 0; $::d_parse && msg("parsing M3U: $m3u\n"); while(my $entry = <$m3u>) { chomp($entry); # strip carriage return from dos playlists $entry =~ s/\cM//g; #+++art: change backslash to forward slash from dos playlists $entry =~ s/\\/\//g;
something like his might be more appropriate: while(my $entry = <$m3u>) { chomp($entry); # strip carriage return from dos playlists $entry =~ s/\cM//g; # when using iTunes in Linux, use / for paths. if ((Slim::Utils::OSDetect::OS() eq 'unix') && useiTunesLibrary()) { $entry =~ s/\\/\//g; }
The right fix is to make Slim::Misc::fixPath a bit smarter about slashes.
Fixed in subversion change 4099
This bug appears to have been fixed in the latest release! If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look. Make sure to include the version number of the software you are seeing the error with.