diff options
author | Max Kellermann <max@duempel.org> | 2013-09-05 09:37:54 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-05 09:40:55 +0200 |
commit | 8929f88e6d78d538d943e80b66fcf21706e53974 (patch) | |
tree | 01232fd55f40dfa1cded59cb28a79b257ebb19e4 /src/PlaylistPrint.cxx | |
parent | 5348808bf594de927cc64eebae9118d6971343b1 (diff) | |
download | mpd-8929f88e6d78d538d943e80b66fcf21706e53974.tar.gz mpd-8929f88e6d78d538d943e80b66fcf21706e53974.tar.xz mpd-8929f88e6d78d538d943e80b66fcf21706e53974.zip |
PlaylistPlugin: add interface SongEnumerator
Replaces struct playlist_provider.
Diffstat (limited to 'src/PlaylistPrint.cxx')
-rw-r--r-- | src/PlaylistPrint.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx index f95061ca5..012f9600b 100644 --- a/src/PlaylistPrint.cxx +++ b/src/PlaylistPrint.cxx @@ -26,6 +26,7 @@ #include "PlaylistRegistry.hxx" #include "PlaylistPlugin.hxx" #include "QueuePrint.hxx" +#include "SongEnumerator.hxx" #include "SongPrint.hxx" #include "DatabaseGlue.hxx" #include "DatabasePlugin.hxx" @@ -145,12 +146,12 @@ spl_print(Client *client, const char *name_utf8, bool detail, static void playlist_provider_print(Client *client, const char *uri, - struct playlist_provider *playlist, bool detail) + SongEnumerator &e, bool detail) { Song *song; char *base_uri = uri != NULL ? g_path_get_dirname(uri) : NULL; - while ((song = playlist_plugin_read(playlist)) != NULL) { + while ((song = e.NextSong()) != nullptr) { song = playlist_check_translate_song(song, base_uri, false); if (song == NULL) continue; @@ -173,13 +174,12 @@ playlist_file_print(Client *client, const char *uri, bool detail) Cond cond; struct input_stream *is; - struct playlist_provider *playlist = - playlist_open_any(uri, mutex, cond, &is); + SongEnumerator *playlist = playlist_open_any(uri, mutex, cond, &is); if (playlist == NULL) return false; - playlist_provider_print(client, uri, playlist, detail); - playlist_plugin_close(playlist); + playlist_provider_print(client, uri, *playlist, detail); + delete playlist; if (is != NULL) is->Close(); |