From aee0361f352509d96892005776658ddf04ba7b1f Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 21 Dec 2010 18:37:48 +0100 Subject: [PATCH] add support for loading .pls playlists only through "Add" prompt since listplaylists command doesn't list .pls playlists present in mpd playlists directory. --- src/ncmpcpp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 8f4b1a18..6e0228ce 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -1254,7 +1254,10 @@ int main(int argc, char *argv[]) else { static const char lastfm_url[] = "lastfm://"; - if (path.compare(0, static_strlen(lastfm_url), lastfm_url) == 0) + if (path.compare(0, static_strlen(lastfm_url), lastfm_url) == 0 + || (path.find('/') == std::string::npos + && path.find(".pls", path.length()-4) != std::string::npos) + ) Mpd.LoadPlaylist(path); else Mpd.Add(path);