queue_save: simplify get_song()

Don't try db_get_song() if the URI has a scheme.
This commit is contained in:
Max Kellermann 2010-07-25 12:52:36 +02:00
parent b233c145fa
commit 8341a9f7b2

View File

@ -45,16 +45,9 @@ queue_save(FILE *fp, const struct queue *queue)
static struct song *
get_song(const char *uri)
{
struct song *song;
song = db_get_song(uri);
if (song != NULL)
return song;
if (uri_has_scheme(uri))
return song_remote_new(uri);
return NULL;
return uri_has_scheme(uri)
? song_remote_new(uri)
: db_get_song(uri);
}
void