From a40246d3123d4bd0d1be638cd7f7b91274d8f23d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Oct 2013 15:14:54 +0200 Subject: TagFile: use Path instead of const char * --- src/playlist/EmbeddedCuePlaylistPlugin.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/playlist') 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 @@ -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()) { -- cgit v1.2.3