playlist/cue: return the original song URI
The caller should be responsible for building the absolute URI.
This commit is contained in:
parent
627975e897
commit
554b2b0ed9
@ -38,8 +38,6 @@ struct cue_playlist {
|
|||||||
struct Cd *cd;
|
struct Cd *cd;
|
||||||
|
|
||||||
unsigned next;
|
unsigned next;
|
||||||
|
|
||||||
char *path;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct playlist_provider *
|
static struct playlist_provider *
|
||||||
@ -62,7 +60,6 @@ cue_playlist_open_uri(const char *uri)
|
|||||||
playlist_provider_init(&playlist->base, &cue_playlist_plugin);
|
playlist_provider_init(&playlist->base, &cue_playlist_plugin);
|
||||||
playlist->cd = cd;
|
playlist->cd = cd;
|
||||||
playlist->next = 1;
|
playlist->next = 1;
|
||||||
playlist->path = g_path_get_dirname(uri);
|
|
||||||
|
|
||||||
return &playlist->base;
|
return &playlist->base;
|
||||||
}
|
}
|
||||||
@ -72,7 +69,6 @@ cue_playlist_close(struct playlist_provider *_playlist)
|
|||||||
{
|
{
|
||||||
struct cue_playlist *playlist = (struct cue_playlist *)_playlist;
|
struct cue_playlist *playlist = (struct cue_playlist *)_playlist;
|
||||||
|
|
||||||
g_free(playlist->path);
|
|
||||||
cd_delete(playlist->cd);
|
cd_delete(playlist->cd);
|
||||||
g_free(playlist);
|
g_free(playlist);
|
||||||
}
|
}
|
||||||
@ -84,7 +80,6 @@ cue_playlist_read(struct playlist_provider *_playlist)
|
|||||||
struct Track *track;
|
struct Track *track;
|
||||||
struct tag *tag;
|
struct tag *tag;
|
||||||
const char *filename;
|
const char *filename;
|
||||||
char *uri;
|
|
||||||
struct song *song;
|
struct song *song;
|
||||||
|
|
||||||
track = cd_get_track(playlist->cd, playlist->next);
|
track = cd_get_track(playlist->cd, playlist->next);
|
||||||
@ -105,13 +100,9 @@ cue_playlist_read(struct playlist_provider *_playlist)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
uri = g_strconcat(playlist->path, "/", filename, NULL);
|
song = song_remote_new(filename);
|
||||||
|
|
||||||
song = song_file_new(uri, NULL);
|
|
||||||
song->tag = tag;
|
song->tag = tag;
|
||||||
|
|
||||||
g_free(uri);
|
|
||||||
|
|
||||||
return song;
|
return song;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user