summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2012-05-30 18:45:33 +0000
committerJoe Peterson <lavajoe@gentoo.org>2012-05-30 18:45:33 +0000
commitaeb5cdc83514633583f60d352a5719c5e517f615 (patch)
treecc572c5cef8f8e0fe3ee8e3fb5fc1d0cdc4021a3 /media-sound/logitechmediaserver-bin/files
parentVersion bump. (diff)
downloadgentoo-2-aeb5cdc83514633583f60d352a5719c5e517f615.tar.gz
gentoo-2-aeb5cdc83514633583f60d352a5719c5e517f615.tar.bz2
gentoo-2-aeb5cdc83514633583f60d352a5719c5e517f615.zip
Fix playlist dir issue (bug #416923)
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/logitechmediaserver-bin/files')
-rw-r--r--media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm23
-rw-r--r--media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.2-client-playlists-gentoo.patch11
2 files changed, 29 insertions, 5 deletions
diff --git a/media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm b/media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm
index 67054f1207f1..5e94c14758c5 100644
--- a/media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm
+++ b/media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm,v 1.1 2012/04/12 05:56:03 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/logitechmediaserver-bin/files/gentoo-filepaths.pm,v 1.2 2012/05/30 18:45:33 lavajoe Exp $
# This file contains a custom OS package to provide information on the
# installation structure on Gentoo.
@@ -38,21 +38,34 @@ sub dirsFor {
my ($class, $dir) = @_;
my @dirs = ();
-
- # Use the default behaviour to locate the directory.
- push @dirs, $class->SUPER::dirsFor($dir);
# Overrides for specific directories.
if ($dir eq 'Plugins') {
- # User-installed plugins are in a different place.
+ # Look in the normal places.
+ push @dirs, $class->SUPER::dirsFor($dir);
+
+ # User-installed plugins are in a different place, so add it.
push @dirs, '/var/lib/logitechmediaserver/Plugins';
+ } elsif ($dir eq 'ClientPlaylists') {
+
+ # LMS would normally try to put client playlists in the prefs
+ # directory, but they aren't really prefs since they're dynamic
+ # state of the clients. Effectively, they're the same as the
+ # database cache, so we move these under /var/lib.
+ push @dirs, '/var/lib/logitechmediaserver/ClientPlaylists';
+
} elsif ($dir =~ /^(?:prefs)$/) {
# Server and plugin preferences are in a different place.
push @dirs, $::prefsdir || '/etc/logitechmediaserver';
+ } else {
+
+ # Use the default behaviour to locate the directory.
+ push @dirs, $class->SUPER::dirsFor($dir);
+
}
return wantarray() ? @dirs : $dirs[0];
diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.2-client-playlists-gentoo.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.2-client-playlists-gentoo.patch
new file mode 100644
index 000000000000..ecd614509fa2
--- /dev/null
+++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.2-client-playlists-gentoo.patch
@@ -0,0 +1,11 @@
+--- Slim/Player/Playlist.pm.orig 2012-05-29 12:52:03.351548099 +0100
++++ Slim/Player/Playlist.pm 2012-05-29 12:52:32.676570561 +0100
+@@ -1042,7 +1042,7 @@
+ $id =~ s/://g;
+
+ return Slim::Utils::Misc::fileURLFromPath(
+- catfile(Slim::Utils::OSDetect::dirsFor('prefs'), "clientplaylist_$id.m3u")
++ catfile(Slim::Utils::OSDetect::dirsFor('ClientPlaylists'), "clientplaylist_$id.m3u")
+ );
+ }
+