add support for loading .pls playlists

only through "Add" prompt since listplaylists command doesn't
list .pls playlists present in mpd playlists directory.
master
Andrzej Rybczak 15 years ago
parent bb4aa9e106
commit aee0361f35
  1. 5
      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);

Loading…
Cancel
Save