Commit 8a5d2c3c authored by Max Kellermann's avatar Max Kellermann

playlist_queue: use the "uri" variable earlier

Preparation for the next patch.
parent 2f8135ef
......@@ -83,14 +83,15 @@ static struct song *
check_translate_song(struct song *song, const char *base_uri)
{
struct song *dest;
char *uri;
if (song_in_database(song))
/* already ok */
return song;
if (uri_has_scheme(song->uri)) {
if (uri_supported_scheme(song->uri))
char *uri = song->uri;
if (uri_has_scheme(uri)) {
if (uri_supported_scheme(uri))
/* valid remote song */
return song;
else {
......@@ -100,7 +101,7 @@ check_translate_song(struct song *song, const char *base_uri)
}
}
if (g_path_is_absolute(song->uri)) {
if (g_path_is_absolute(uri)) {
/* local files must be relative to the music
directory */
song_free(song);
......@@ -108,9 +109,9 @@ check_translate_song(struct song *song, const char *base_uri)
}
if (base_uri != NULL)
uri = g_build_filename(base_uri, song->uri, NULL);
uri = g_build_filename(base_uri, uri, NULL);
else
uri = g_strdup(song->uri);
uri = g_strdup(uri);
if (uri_has_scheme(base_uri)) {
dest = song_remote_new(uri);
......
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