aboutsummaryrefslogtreecommitdiffstats
path: root/src/stored_playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 13:53:16 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 13:53:16 +0100
commit1a59afa388874a2ceadcef2644fa9e08f0a9b828 (patch)
tree8af86cb92d4d843351e2bd8937369fc3b1812563 /src/stored_playlist.c
parent85f7e964dee606ecd6ceb2da7ce0e85d90c3f5ce (diff)
downloadmpd-1a59afa388874a2ceadcef2644fa9e08f0a9b828.tar.gz
mpd-1a59afa388874a2ceadcef2644fa9e08f0a9b828.tar.xz
mpd-1a59afa388874a2ceadcef2644fa9e08f0a9b828.zip
stored_playlist: moved configuration variables from playlist.c
Don't declare and export variables specific to stored playlists in playlist.c/playlist.h.
Diffstat (limited to 'src/stored_playlist.c')
-rw-r--r--src/stored_playlist.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stored_playlist.c b/src/stored_playlist.c
index 26dcb34d3..f802add94 100644
--- a/src/stored_playlist.c
+++ b/src/stored_playlist.c
@@ -24,6 +24,7 @@
#include "ls.h"
#include "database.h"
#include "idle.h"
+#include "conf.h"
#include <assert.h>
#include <sys/types.h>
@@ -33,6 +34,20 @@
#include <string.h>
#include <errno.h>
+static unsigned playlist_max_length;
+bool playlist_saveAbsolutePaths = DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;
+
+void
+spl_global_init(void)
+{
+ playlist_max_length = config_get_positive(CONF_MAX_PLAYLIST_LENGTH,
+ DEFAULT_PLAYLIST_MAX_LENGTH);
+
+ playlist_saveAbsolutePaths =
+ config_get_bool(CONF_SAVE_ABSOLUTE_PATHS,
+ DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS);
+}
+
static struct stored_playlist_info *
load_playlist_info(const char *parent_path_fs, const char *name_fs)
{