Enable 'refresh db' command for mopidy. Update will not reall yhappen, but Cantata will delete its caches, and reload these
This commit is contained in:
committed by
craig.p.drummond
parent
7cda7b29d5
commit
3f1bcf5f74
@@ -1067,7 +1067,7 @@ void MainWindow::messageWidgetVisibility(bool v)
|
||||
void MainWindow::mpdConnectionStateChanged(bool connected)
|
||||
{
|
||||
serverInfoAction->setEnabled(connected && !MPDConnection::self()->isMopdidy());
|
||||
refreshDbAction->setEnabled(connected && !MPDConnection::self()->isMopdidy());
|
||||
refreshDbAction->setEnabled(connected);
|
||||
addStreamToPlayQueueAction->setEnabled(connected);
|
||||
if (connected) {
|
||||
messageWidget->hide();
|
||||
|
||||
@@ -1220,6 +1220,14 @@ void MPDConnection::update()
|
||||
{
|
||||
if (sendCommand("update").ok) {
|
||||
emit updatingDatabase();
|
||||
|
||||
if (isMopdidy()) {
|
||||
// Mopidy does not support MPD's update command. So, when user presses update DB, what we
|
||||
// do instead is clear library/dir caches, then when response to getStats is received,
|
||||
// library/dir should get refreshed...
|
||||
emit updatedDatabase(); // Emit thi to stop any spinners...
|
||||
getStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user