aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-10 19:02:33 +0200
committerMax Kellermann <max@duempel.org>2014-05-10 19:02:33 +0200
commit0adcda387a276f5fcc24e8a3b9d344a736738a4a (patch)
tree68edb57f2c03a9f2590111b610749a5184438637 /src/PlaylistSave.cxx
parentfc1664d9fc432c509c236a5889a0a7ead159e3ba (diff)
downloadmpd-0adcda387a276f5fcc24e8a3b9d344a736738a4a.tar.gz
mpd-0adcda387a276f5fcc24e8a3b9d344a736738a4a.tar.xz
mpd-0adcda387a276f5fcc24e8a3b9d344a736738a4a.zip
PlaylistCommands: remove redundant playlist_load_spl() call
This case is handled already by playlist_open_in_playlist_dir() (via playlist_mapper_open()). And the call didn't work anyway.
Diffstat (limited to 'src/PlaylistSave.cxx')
-rw-r--r--src/PlaylistSave.cxx29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx
index 78a8fdb91..67f05267f 100644
--- a/src/PlaylistSave.cxx
+++ b/src/PlaylistSave.cxx
@@ -99,32 +99,3 @@ spl_save_playlist(const char *name_utf8, const playlist &playlist)
{
return spl_save_queue(name_utf8, playlist.queue);
}
-
-bool
-playlist_load_spl(struct playlist &playlist, PlayerControl &pc,
- const char *name_utf8,
- unsigned start_index, unsigned end_index,
- Error &error)
-{
- PlaylistFileContents contents = LoadPlaylistFile(name_utf8, error);
- if (contents.empty() && error.IsDefined())
- return false;
-
- if (end_index > contents.size())
- end_index = contents.size();
-
- const SongLoader loader(nullptr, nullptr);
- Error error2;
-
- for (unsigned i = start_index; i < end_index; ++i) {
- const auto &uri_utf8 = contents[i];
-
- unsigned id = playlist.AppendURI(pc, loader, uri_utf8.c_str(),
- error2);
- if (id == 0)
- FormatError(error2, "can't add file \"%s\"",
- uri_utf8.c_str());
- }
-
- return true;
-}