Skip to content

Commit

Permalink
Prevent querying metadata with offline mode enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanFeenstra committed Dec 14, 2024
1 parent ae49be5 commit a32cb77
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/downloadstab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ void DownloadsTab::refresh()

void DownloadsTab::queryInfos()
{
if (m_core.settings().network().offlineMode()) {
if (QMessageBox::warning(nullptr, tr("Query Metadata"),
tr("Cannot query metadata while offline mode is enabled. "
"Do you want to disable it?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
m_core.settings().network().setOfflineMode(false);
} else {
return;
}
}

m_core.downloadManager()->queryDownloadListInfo();
}

Expand Down

0 comments on commit a32cb77

Please sign in to comment.