summaryrefslogtreecommitdiff
path: root/src/command
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-04-03 12:32:20 +0200
committerMax Kellermann <max@musicpd.org>2019-04-03 12:32:20 +0200
commit7a1b56fe96b3b7d28792a9aad5c82aedc367e7b8 (patch)
tree708d2b3abcea0d97a0bd9d6bd27b3fc5eb317c9f /src/command
parent508e52218809651ca725778b8c789a1434c2c203 (diff)
parentef10354d06f042a795f5ced365baf375300e7b7c (diff)
Merge tag 'v0.21.7'
release v0.21.7
Diffstat (limited to 'src/command')
-rw-r--r--src/command/PlaylistCommands.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx
index 9c0ae779d..8f2801bcc 100644
--- a/src/command/PlaylistCommands.cxx
+++ b/src/command/PlaylistCommands.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "PlaylistCommands.hxx"
#include "Request.hxx"
+#include "Instance.hxx"
#include "db/Selection.hxx"
#include "db/DatabasePlaylist.hxx"
#include "CommandError.hxx"
@@ -28,6 +29,7 @@
#include "PlaylistError.hxx"
#include "db/PlaylistVector.hxx"
#include "SongLoader.hxx"
+#include "song/DetachedSong.hxx"
#include "BulkEdit.hxx"
#include "playlist/PlaylistQueue.hxx"
#include "playlist/Print.hxx"
@@ -77,11 +79,21 @@ handle_load(Client &client, Request args, gcc_unused Response &r)
const ScopeBulkEdit bulk_edit(client.GetPartition());
+ auto &playlist = client.GetPlaylist();
+ const unsigned old_size = playlist.GetLength();
+
const SongLoader loader(client);
playlist_open_into_queue(uri,
range.start, range.end,
- client.GetPlaylist(),
+ playlist,
client.GetPlayerControl(), loader);
+
+ /* invoke the RemoteTagScanner on all newly added songs */
+ auto &instance = client.GetInstance();
+ const unsigned new_size = playlist.GetLength();
+ for (unsigned i = old_size; i < new_size; ++i)
+ instance.LookupRemoteTag(playlist.queue.Get(i).GetURI());
+
return CommandResult::OK;
}