aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-21 10:26:53 +0200
committerMax Kellermann <max@duempel.org>2013-10-21 10:50:22 +0200
commit83c726a34f325ae5be0d5b61b66a97cb41f6973e (patch)
treeff65ffc34bd655cce2a52b9e84d5a762ea0f021e /src/playlist
parenta0415f73d459b5763f59dfa4151ec89834d29526 (diff)
downloadmpd-83c726a34f325ae5be0d5b61b66a97cb41f6973e.tar.gz
mpd-83c726a34f325ae5be0d5b61b66a97cb41f6973e.tar.xz
mpd-83c726a34f325ae5be0d5b61b66a97cb41f6973e.zip
GetBaseUTF8
Diffstat (limited to 'src/playlist')
-rw-r--r--src/playlist/EmbeddedCuePlaylistPlugin.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/playlist/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
index 50390dbd6..51491b38a 100644
--- a/src/playlist/EmbeddedCuePlaylistPlugin.cxx
+++ b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
@@ -48,7 +48,7 @@ public:
* sheet must always point to the song file it is contained
* in.
*/
- char *filename;
+ std::string filename;
/**
* The value of the file's "CUESHEET" tag.
@@ -64,13 +64,12 @@ public:
public:
EmbeddedCuePlaylist()
- :filename(nullptr), cuesheet(nullptr), parser(nullptr) {
+ :cuesheet(nullptr), parser(nullptr) {
}
virtual ~EmbeddedCuePlaylist() {
delete parser;
g_free(cuesheet);
- g_free(filename);
}
virtual Song *NextSong() override;
@@ -116,7 +115,7 @@ embcue_playlist_open_uri(const char *uri,
return NULL;
}
- playlist->filename = g_path_get_basename(uri);
+ playlist->filename = PathTraits::GetBaseUTF8(uri);
playlist->next = playlist->cuesheet;
playlist->parser = new CueParser();
@@ -146,13 +145,13 @@ EmbeddedCuePlaylist::NextSong()
parser->Feed(line);
song = parser->Get();
if (song != NULL)
- return song->ReplaceURI(filename);
+ return song->ReplaceURI(filename.c_str());
}
parser->Finish();
song = parser->Get();
if (song != NULL)
- song = song->ReplaceURI(filename);
+ song = song->ReplaceURI(filename.c_str());
return song;
}