command/PlaylistCommands: pass real_uri to LookupRemoteTag()

For querying tags, the real song URI should be used, because if the
(display) URI is different, requesting it will not produce a usable
response.  This is a theoretical problem because none of the existing
playlist plugins sets the real_uri.

This requires changing the URI comparison in playlist::TagModified().

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1154
This commit is contained in:
Max Kellermann
2021-05-18 18:45:07 +02:00
parent dbb18a401b
commit c3f9b38c97
4 changed files with 14 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ handle_load(Client &client, Request args, [[maybe_unused]] Response &r)
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());
instance.LookupRemoteTag(playlist.queue.Get(i).GetRealURI());
return CommandResult::OK;
}