diff options
author | Max Kellermann <max@duempel.org> | 2014-02-02 14:37:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-03 23:32:10 +0100 |
commit | ca36ac2ba196ee2bbe4b54ee9a71d49174803277 (patch) | |
tree | d365b1ac7872e1785befdcebf254885c1c27a268 /src/playlist/PlaylistQueue.cxx | |
parent | ba675d6a55769a6e82a6efaa2f4a812a4eea2362 (diff) | |
download | mpd-ca36ac2ba196ee2bbe4b54ee9a71d49174803277.tar.gz mpd-ca36ac2ba196ee2bbe4b54ee9a71d49174803277.tar.xz mpd-ca36ac2ba196ee2bbe4b54ee9a71d49174803277.zip |
SongLoader: new class that merges duplicate code
There was quite a lot of duplicate code for loading DetachedSong
objects, with different semantics for "securely" loading local files.
Diffstat (limited to 'src/playlist/PlaylistQueue.cxx')
-rw-r--r-- | src/playlist/PlaylistQueue.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/playlist/PlaylistQueue.cxx b/src/playlist/PlaylistQueue.cxx index 564c94d0a..9adea317f 100644 --- a/src/playlist/PlaylistQueue.cxx +++ b/src/playlist/PlaylistQueue.cxx @@ -32,7 +32,7 @@ PlaylistResult playlist_load_into_queue(const char *uri, SongEnumerator &e, unsigned start_index, unsigned end_index, playlist &dest, PlayerControl &pc, - bool secure) + const SongLoader &loader) { const std::string base_uri = uri != nullptr ? PathTraitsUTF8::GetParent(uri) @@ -49,7 +49,7 @@ playlist_load_into_queue(const char *uri, SongEnumerator &e, } if (!playlist_check_translate_song(*song, base_uri.c_str(), - secure)) { + loader)) { delete song; continue; } @@ -67,7 +67,7 @@ PlaylistResult playlist_open_into_queue(const char *uri, unsigned start_index, unsigned end_index, playlist &dest, PlayerControl &pc, - bool secure) + const SongLoader &loader) { Mutex mutex; Cond cond; @@ -80,7 +80,7 @@ playlist_open_into_queue(const char *uri, PlaylistResult result = playlist_load_into_queue(uri, *playlist, start_index, end_index, - dest, pc, secure); + dest, pc, loader); delete playlist; if (is != nullptr) |