mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-31 00:44:19 +00:00
BUGFIX: The user can disable permanently recursive torrent download
This commit is contained in:
parent
f699ee1363
commit
80d76ae038
@ -11,6 +11,7 @@
|
|||||||
- FEATURE: Added filter for paused/error torrents
|
- FEATURE: Added filter for paused/error torrents
|
||||||
- FEATURE: Add Check/Uncheck all feature in Web UI
|
- FEATURE: Add Check/Uncheck all feature in Web UI
|
||||||
- BUGFIX: Hide seeding torrents files priorities in Web UI
|
- BUGFIX: Hide seeding torrents files priorities in Web UI
|
||||||
|
- BUGFIX: The user can disable permanently recursive torrent download
|
||||||
- COSMETIC: Display peers country name in tooltip
|
- COSMETIC: Display peers country name in tooltip
|
||||||
- COSMETIC: Display number of torrents in transfers tab label
|
- COSMETIC: Display number of torrents in transfers tab label
|
||||||
|
|
||||||
|
13
src/GUI.cpp
13
src/GUI.cpp
@ -428,8 +428,19 @@ void GUI::balloonClicked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GUI::askRecursiveTorrentDownloadConfirmation(QTorrentHandle &h) {
|
void GUI::askRecursiveTorrentDownloadConfirmation(QTorrentHandle &h) {
|
||||||
if(QMessageBox::question(this, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(h.name()), QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes) {
|
if(Preferences::recursiveDownloadDisabled()) return;
|
||||||
|
QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(h.name()));
|
||||||
|
QPushButton *yes = confirmBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||||
|
/*QPushButton *no = */confirmBox.addButton(tr("No"), QMessageBox::NoRole);
|
||||||
|
QPushButton *never = confirmBox.addButton(tr("Never"), QMessageBox::NoRole);
|
||||||
|
confirmBox.exec();
|
||||||
|
if(confirmBox.clickedButton() == 0) return;
|
||||||
|
if(confirmBox.clickedButton() == yes) {
|
||||||
BTSession->recursiveTorrentDownload(h);
|
BTSession->recursiveTorrentDownload(h);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(confirmBox.clickedButton() == never) {
|
||||||
|
Preferences::disableRecursiveDownload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1002,6 +1002,16 @@ public:
|
|||||||
qBTRSS.setValue("hosts_cookies", hosts_table);
|
qBTRSS.setValue("hosts_cookies", hosts_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool recursiveDownloadDisabled() {
|
||||||
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
|
return settings.value(QString::fromUtf8("Preferences/Advanced/DisableRecursiveDownload"), false).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void disableRecursiveDownload(bool disable=true) {
|
||||||
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
|
settings.setValue(QString::fromUtf8("Preferences/Advanced/DisableRecursiveDownload"), disable);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
static QString getPythonPath() {
|
static QString getPythonPath() {
|
||||||
QSettings reg_python("HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore", QSettings::NativeFormat);
|
QSettings reg_python("HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore", QSettings::NativeFormat);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user