command/Queue: move LookupRemoteTag() to the end

Skip the LookupRemoteTag() call if the MoveId() call fails.
This commit is contained in:
Max Kellermann 2021-10-07 21:13:27 +02:00
parent f6035f2dda
commit 7a6d0c2efc

View File

@ -115,7 +115,6 @@ handle_addid(Client &client, Request args, Response &r)
auto &partition = client.GetPartition();
const SongLoader loader(client);
unsigned added_id = partition.AppendURI(loader, uri);
partition.instance.LookupRemoteTag(uri);
if (args.size == 2) {
unsigned to = args.ParseUnsigned(1);
@ -129,6 +128,8 @@ handle_addid(Client &client, Request args, Response &r)
}
}
partition.instance.LookupRemoteTag(uri);
r.Fmt(FMT_STRING("Id: {}\n"), added_id);
return CommandResult::OK;
}