aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/EmbeddedCuePlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-26 15:14:54 +0200
committerMax Kellermann <max@duempel.org>2013-10-26 15:38:29 +0200
commita40246d3123d4bd0d1be638cd7f7b91274d8f23d (patch)
treed1384fdce2b186c00b4697d5475c97bf4dbc4b41 /src/playlist/EmbeddedCuePlaylistPlugin.cxx
parent4a5aad0948eb782ec6b74a1f038c0e5635c1bb9b (diff)
downloadmpd-a40246d3123d4bd0d1be638cd7f7b91274d8f23d.tar.gz
mpd-a40246d3123d4bd0d1be638cd7f7b91274d8f23d.tar.xz
mpd-a40246d3123d4bd0d1be638cd7f7b91274d8f23d.zip
TagFile: use Path instead of const char *
Diffstat (limited to 'src/playlist/EmbeddedCuePlaylistPlugin.cxx')
-rw-r--r--src/playlist/EmbeddedCuePlaylistPlugin.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/playlist/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
index ba2bad7f7..b21d78daa 100644
--- a/src/playlist/EmbeddedCuePlaylistPlugin.cxx
+++ b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
@@ -35,6 +35,7 @@
#include "TagFile.hxx"
#include "cue/CueParser.hxx"
#include "fs/Traits.hxx"
+#include "fs/AllocatedPath.hxx"
#include "util/ASCII.hxx"
#include <assert.h>
@@ -98,13 +99,17 @@ embcue_playlist_open_uri(const char *uri,
/* only local files supported */
return NULL;
+ const auto path_fs = AllocatedPath::FromUTF8(uri);
+ if (path_fs.IsNull())
+ return nullptr;
+
const auto playlist = new EmbeddedCuePlaylist();
- tag_file_scan(uri, &embcue_tag_handler, playlist);
+ tag_file_scan(path_fs, &embcue_tag_handler, playlist);
if (playlist->cuesheet.empty()) {
- tag_ape_scan2(uri, &embcue_tag_handler, playlist);
+ tag_ape_scan2(path_fs, &embcue_tag_handler, playlist);
if (playlist->cuesheet.empty())
- tag_id3_scan(uri, &embcue_tag_handler, playlist);
+ tag_id3_scan(path_fs, &embcue_tag_handler, playlist);
}
if (playlist->cuesheet.empty()) {