--- SlimServer_v5.4.0.orig/slimserver.pl 2004-12-07 13:50:09.000000000 +0100 +++ SlimServer_v5.4.0/slimserver.pl 2004-12-08 04:00:00.135966272 +0100 @@ -172,7 +172,7 @@ # old preferences settings, only used by the .slim.conf configuration. # real settings are stored in the new preferences file: .slim.pref -use vars qw($audiodir $httpport); +use vars qw($audiodir $playlistdir $httpport); use vars qw( $d_artwork @@ -471,7 +471,7 @@ sub showUsage { print <] [--diag] [--daemon] [--stdio] [--logfile ] +Usage: $0 [--audiodir ] [--playlistdir ] [--diag] [--daemon] [--stdio] [--logfile ] [--user ] [--group ] [--httpport [--httpaddr ]] @@ -482,6 +482,7 @@ --help => Show this usage information. --audiodir => The path to a directory of your MP3 files. + --playlistdir => The path to a directory of your playlist files. --cachedir => Directory for SlimServer to save cached music and web data --diag => Use diagnostics, shows more verbose errors. Also slows down library processing considerably --logfile => Specify a file for error logging. @@ -583,6 +584,7 @@ 'httpport=s' => \$httpport, 'logfile=s' => \$logfile, 'audiodir=s' => \$audiodir, + 'playlistdir=s' => \$playlistdir, 'cachedir=s' => \$cachedir, 'pidfile=s' => \$pidfile, 'playeraddr=s' => \$localClientNetAddr, @@ -659,6 +661,10 @@ if (defined($audiodir)) { Slim::Utils::Prefs::set("audiodir", $audiodir); } + + if (defined($playlistdir)) { + Slim::Utils::Prefs::set("playlistdir", $playlistdir); + } if (defined($cachedir)) { Slim::Utils::Prefs::set("cachedir", $cachedir); @@ -693,6 +699,12 @@ Slim::Utils::Prefs::set("audiodir",$audiodir); } } + + if (defined(Slim::Utils::Prefs::get("playlistdir")) && Slim::Utils::Prefs::get("playlistdir") =~ m|[/\\]$|) { + $playlistdir = Slim::Utils::Prefs::get("playlistdir"); + $playlistdir =~ s|[/\\]$||; + Slim::Utils::Prefs::set("playlistdir",$playlistdir); + } } sub daemonize {