playlist/Length: throw PlaylistError::NoSuchList instead of returning false

This commit is contained in:
Max Kellermann
2024-05-15 20:12:01 +02:00
parent c974fc664c
commit a5456a89dc
3 changed files with 13 additions and 17 deletions

View File

@@ -164,11 +164,8 @@ handle_playlistlength(Client &client, Request args, Response &r)
#endif
);
if (playlist_file_length(r, client.GetPartition(), SongLoader(client),
name))
return CommandResult::OK;
throw PlaylistError::NoSuchList();
playlist_file_length(r, client.GetPartition(), SongLoader(client), name);
return CommandResult::OK;
}
CommandResult