Commit 8341a9f7 authored by Max Kellermann's avatar Max Kellermann

queue_save: simplify get_song()

Don't try db_get_song() if the URI has a scheme.
parent b233c145
...@@ -45,16 +45,9 @@ queue_save(FILE *fp, const struct queue *queue) ...@@ -45,16 +45,9 @@ queue_save(FILE *fp, const struct queue *queue)
static struct song * static struct song *
get_song(const char *uri) get_song(const char *uri)
{ {
struct song *song; return uri_has_scheme(uri)
? song_remote_new(uri)
song = db_get_song(uri); : db_get_song(uri);
if (song != NULL)
return song;
if (uri_has_scheme(uri))
return song_remote_new(uri);
return NULL;
} }
void void
......
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