Media library: prevent looping when mopidy is sent 'listallinfo' command

master
Andrzej Rybczak 9 years ago
parent 4fcfb3c851
commit 0185ee7fa4
  1. 11
      src/helpers.cpp

@ -61,6 +61,17 @@ MPD::SongIterator getDatabaseIterator(MPD::Connection &mpd)
else else
throw; throw;
} }
catch (MPD::ServerError &e)
{
// mopidy blacklists 'listallinfo' command by default and throws server
// error when it receives it. Work around that to prevent ncmpcpp from
// continuously retrying to send the command and looping.
if (strstr(e.what(), "listallinfo") != nullptr
&& strstr(e.what(), "disabled") != nullptr)
Statusbar::print("Unable to fetch the data, server refused to process 'listallinfo' command");
else
throw;
}
return result; return result;
} }

Loading…
Cancel
Save