aboutsummaryrefslogtreecommitdiffstats
path: root/src/Playlist.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-04 22:55:11 +0100
committerMax Kellermann <max@duempel.org>2013-01-04 22:55:11 +0100
commite89bd30db56c282c9c97d3d02c01155e7d8daa80 (patch)
tree7d0ca6d39dce6f5f0f156fb50aecf9c0e73fd030 /src/Playlist.cxx
parent2a9d933a81a6192f4d30cbf68253727f92f9bdac (diff)
downloadmpd-e89bd30db56c282c9c97d3d02c01155e7d8daa80.tar.gz
mpd-e89bd30db56c282c9c97d3d02c01155e7d8daa80.tar.xz
mpd-e89bd30db56c282c9c97d3d02c01155e7d8daa80.zip
Playlist: pass max_length to playlist_init()
Move the configuration lookup to Main.cxx.
Diffstat (limited to '')
-rw-r--r--src/Playlist.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Playlist.cxx b/src/Playlist.cxx
index 9f08439a0..f89a7e31a 100644
--- a/src/Playlist.cxx
+++ b/src/Playlist.cxx
@@ -23,7 +23,6 @@
#include "song.h"
extern "C" {
-#include "conf.h"
#include "idle.h"
}
@@ -54,11 +53,9 @@ playlist_tag_changed(struct playlist *playlist)
}
void
-playlist_init(struct playlist *playlist)
+playlist_init(struct playlist *playlist, unsigned max_length)
{
- queue_init(&playlist->queue,
- config_get_positive(CONF_MAX_PLAYLIST_LENGTH,
- DEFAULT_PLAYLIST_MAX_LENGTH));
+ queue_init(&playlist->queue, max_length);
playlist->queued = -1;
playlist->current = -1;