diff options
Diffstat (limited to 'src/playlist/PlaylistStream.cxx')
-rw-r--r-- | src/playlist/PlaylistStream.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/playlist/PlaylistStream.cxx b/src/playlist/PlaylistStream.cxx index 074f39d66..99e1c3182 100644 --- a/src/playlist/PlaylistStream.cxx +++ b/src/playlist/PlaylistStream.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -35,8 +35,12 @@ playlist_open_path_suffix(Path path, Mutex &mutex, Cond &cond) { assert(!path.IsNull()); - const char *suffix = uri_get_suffix(path.c_str()); - if (suffix == nullptr || !playlist_suffix_supported(suffix)) + const auto *suffix = path.GetSuffix(); + if (suffix == nullptr) + return nullptr; + + const auto suffix_utf8 = Path::FromFS(suffix).ToUTF8(); + if (!playlist_suffix_supported(suffix_utf8.c_str())) return nullptr; Error error; @@ -46,7 +50,8 @@ playlist_open_path_suffix(Path path, Mutex &mutex, Cond &cond) return nullptr; } - auto playlist = playlist_list_open_stream_suffix(*is, suffix); + auto playlist = playlist_list_open_stream_suffix(*is, + suffix_utf8.c_str()); if (playlist != nullptr) playlist = new CloseSongEnumerator(playlist, is); else |