Commit 7a6d0c2e authored by Max Kellermann's avatar Max Kellermann

command/Queue: move LookupRemoteTag() to the end

Skip the LookupRemoteTag() call if the MoveId() call fails.
parent f6035f2d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment