queue/PlaylistTag: throw PlaylistError on error

This commit is contained in:
Max Kellermann
2016-02-28 10:40:31 +01:00
parent f8810d7caf
commit c81747dd15
3 changed files with 18 additions and 42 deletions

View File

@@ -41,11 +41,7 @@ handle_addtagid(Client &client, Request args, Response &r)
const char *const value = args[2];
Error error;
if (!client.partition.playlist.AddSongIdTag(song_id, tag_type, value,
error))
return print_error(r, error);
client.partition.playlist.AddSongIdTag(song_id, tag_type, value);
return CommandResult::OK;
}
@@ -65,10 +61,6 @@ handle_cleartagid(Client &client, Request args, Response &r)
}
}
Error error;
if (!client.partition.playlist.ClearSongIdTag(song_id, tag_type,
error))
return print_error(r, error);
client.partition.playlist.ClearSongIdTag(song_id, tag_type);
return CommandResult::OK;
}