queue_save: simplify get_song()
Don't try db_get_song() if the URI has a scheme.
This commit is contained in:
parent
b233c145fa
commit
8341a9f7b2
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user