diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index d46171548..2efb3fe01 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -492,7 +492,7 @@ Session::Session(QObject *parent) , m_globalMaxRatio(BITTORRENT_SESSION_KEY("GlobalMaxRatio"), -1, [](qreal r) { return r < 0 ? -1. : r;}) , m_globalMaxSeedingMinutes(BITTORRENT_SESSION_KEY("GlobalMaxSeedingMinutes"), -1, lowerLimited(-1)) , m_isAddTorrentPaused(BITTORRENT_SESSION_KEY("AddTorrentPaused"), false) - , m_isCreateTorrentSubfolder(BITTORRENT_SESSION_KEY("CreateTorrentSubfolder"), true) + , m_isKeepTorrentTopLevelFolder(BITTORRENT_SESSION_KEY("CreateTorrentSubfolder"), true) , m_isAppendExtensionEnabled(BITTORRENT_SESSION_KEY("AddExtensionToIncompleteFiles"), false) , m_refreshInterval(BITTORRENT_SESSION_KEY("RefreshInterval"), 1500) , m_isPreallocationEnabled(BITTORRENT_SESSION_KEY("Preallocation"), false) @@ -4392,14 +4392,14 @@ std::vector Session::getPendingAlerts(const lt::time_duration time) return alerts; } -bool Session::isCreateTorrentSubfolder() const +bool Session::isKeepTorrentTopLevelFolder() const { - return m_isCreateTorrentSubfolder; + return m_isKeepTorrentTopLevelFolder; } -void Session::setCreateTorrentSubfolder(const bool value) +void Session::setKeepTorrentTopLevelFolder(const bool value) { - m_isCreateTorrentSubfolder = value; + m_isKeepTorrentTopLevelFolder = value; } // Read alerts sent by the BitTorrent session diff --git a/src/base/bittorrent/session.h b/src/base/bittorrent/session.h index 37cd68178..bd87f2fd1 100644 --- a/src/base/bittorrent/session.h +++ b/src/base/bittorrent/session.h @@ -267,8 +267,8 @@ namespace BitTorrent void setPeXEnabled(bool enabled); bool isAddTorrentPaused() const; void setAddTorrentPaused(bool value); - bool isCreateTorrentSubfolder() const; - void setCreateTorrentSubfolder(bool value); + bool isKeepTorrentTopLevelFolder() const; + void setKeepTorrentTopLevelFolder(bool value); bool isTrackerEnabled() const; void setTrackerEnabled(bool enabled); bool isAppendExtensionEnabled() const; @@ -677,7 +677,7 @@ namespace BitTorrent CachedSettingValue m_globalMaxRatio; CachedSettingValue m_globalMaxSeedingMinutes; CachedSettingValue m_isAddTorrentPaused; - CachedSettingValue m_isCreateTorrentSubfolder; + CachedSettingValue m_isKeepTorrentTopLevelFolder; CachedSettingValue m_isAppendExtensionEnabled; CachedSettingValue m_refreshInterval; CachedSettingValue m_isPreallocationEnabled; diff --git a/src/base/bittorrent/torrenthandleimpl.cpp b/src/base/bittorrent/torrenthandleimpl.cpp index a0a75cfd1..9be7f7f60 100644 --- a/src/base/bittorrent/torrenthandleimpl.cpp +++ b/src/base/bittorrent/torrenthandleimpl.cpp @@ -140,7 +140,7 @@ CreateTorrentParams::CreateTorrentParams(const AddTorrentParams ¶ms) , hasSeedStatus(params.skipChecking) // do not react on 'torrent_finished_alert' when skipping , skipChecking(params.skipChecking) , hasRootFolder(params.createSubfolder == TriStateBool::Undefined - ? Session::instance()->isCreateTorrentSubfolder() + ? Session::instance()->isKeepTorrentTopLevelFolder() : params.createSubfolder == TriStateBool::True) , forced(params.addForced == TriStateBool::True) , paused(params.addPaused == TriStateBool::Undefined diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 5a93cc697..9380703c5 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -123,11 +123,11 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP m_ui->checkBoxRememberLastSavePath->setChecked(rememberLastSavePath); if (m_torrentParams.createSubfolder == TriStateBool::True) - m_ui->createSubfolderCheckBox->setChecked(true); + m_ui->keepTopLevelFolderCheckBox->setChecked(true); else if (m_torrentParams.createSubfolder == TriStateBool::False) - m_ui->createSubfolderCheckBox->setChecked(false); + m_ui->keepTopLevelFolderCheckBox->setChecked(false); else - m_ui->createSubfolderCheckBox->setChecked(session->isCreateTorrentSubfolder()); + m_ui->keepTopLevelFolderCheckBox->setChecked(session->isKeepTorrentTopLevelFolder()); m_ui->sequentialCheckBox->setChecked(m_torrentParams.sequential); m_ui->firstLastCheckBox->setChecked(m_torrentParams.firstLastPiecePriority); @@ -553,7 +553,7 @@ void AddNewTorrentDialog::accept() m_torrentParams.filePriorities = m_contentModel->model()->getFilePriorities(); m_torrentParams.addPaused = TriStateBool(!m_ui->startTorrentCheckBox->isChecked()); - m_torrentParams.createSubfolder = TriStateBool(m_ui->createSubfolderCheckBox->isChecked()); + m_torrentParams.createSubfolder = TriStateBool(m_ui->keepTopLevelFolderCheckBox->isChecked()); m_torrentParams.sequential = m_ui->sequentialCheckBox->isChecked(); m_torrentParams.firstLastPiecePriority = m_ui->firstLastCheckBox->isChecked(); diff --git a/src/gui/addnewtorrentdialog.ui b/src/gui/addnewtorrentdialog.ui index 181f16410..c5638b545 100644 --- a/src/gui/addnewtorrentdialog.ui +++ b/src/gui/addnewtorrentdialog.ui @@ -167,9 +167,9 @@ - + - Create subfolder + Keep top-level folder diff --git a/src/gui/optionsdialog.cpp b/src/gui/optionsdialog.cpp index abc6fa0d2..5427d984d 100644 --- a/src/gui/optionsdialog.cpp +++ b/src/gui/optionsdialog.cpp @@ -351,7 +351,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) connect(m_ui->checkAdditionDialog, &QGroupBox::toggled, this, &ThisType::enableApplyButton); connect(m_ui->checkAdditionDialogFront, &QAbstractButton::toggled, this, &ThisType::enableApplyButton); connect(m_ui->checkStartPaused, &QAbstractButton::toggled, this, &ThisType::enableApplyButton); - connect(m_ui->checkCreateSubfolder, &QAbstractButton::toggled, this, &ThisType::enableApplyButton); + connect(m_ui->checkKeepTopLevelFolder, &QAbstractButton::toggled, this, &ThisType::enableApplyButton); connect(m_ui->deleteTorrentBox, &QGroupBox::toggled, this, &ThisType::enableApplyButton); connect(m_ui->deleteCancelledTorrentBox, &QAbstractButton::toggled, this, &ThisType::enableApplyButton); connect(m_ui->checkExportDir, &QAbstractButton::toggled, this, &ThisType::enableApplyButton); @@ -733,7 +733,7 @@ void OptionsDialog::saveOptions() AddNewTorrentDialog::setEnabled(useAdditionDialog()); AddNewTorrentDialog::setTopLevel(m_ui->checkAdditionDialogFront->isChecked()); session->setAddTorrentPaused(addTorrentsInPause()); - session->setCreateTorrentSubfolder(m_ui->checkCreateSubfolder->isChecked()); + session->setKeepTorrentTopLevelFolder(m_ui->checkKeepTopLevelFolder->isChecked()); ScanFoldersModel::instance()->removeFromFSWatcher(m_removedScanDirs); ScanFoldersModel::instance()->addToFSWatcher(m_addedScanDirs); ScanFoldersModel::instance()->makePersistent(); @@ -977,7 +977,7 @@ void OptionsDialog::loadOptions() m_ui->checkAdditionDialog->setChecked(AddNewTorrentDialog::isEnabled()); m_ui->checkAdditionDialogFront->setChecked(AddNewTorrentDialog::isTopLevel()); m_ui->checkStartPaused->setChecked(session->isAddTorrentPaused()); - m_ui->checkCreateSubfolder->setChecked(session->isCreateTorrentSubfolder()); + m_ui->checkKeepTopLevelFolder->setChecked(session->isKeepTorrentTopLevelFolder()); const TorrentFileGuard::AutoDeleteMode autoDeleteMode = TorrentFileGuard::autoDeleteMode(); m_ui->deleteTorrentBox->setChecked(autoDeleteMode != TorrentFileGuard::Never); m_ui->deleteCancelledTorrentBox->setChecked(autoDeleteMode == TorrentFileGuard::Always); diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index 2e7e91873..321d5ca6f 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -769,9 +769,9 @@ - + - Create subfolder for torrents with multiple files + Keep top-level folder true diff --git a/src/gui/rss/automatedrssdownloader.ui b/src/gui/rss/automatedrssdownloader.ui index 9b6b8fb67..1b8a929c1 100644 --- a/src/gui/rss/automatedrssdownloader.ui +++ b/src/gui/rss/automatedrssdownloader.ui @@ -325,7 +325,7 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also - + 0 @@ -333,7 +333,7 @@ Supports the formats: S01E01, 1x1, 2017.01.01 and 01.01.2017 (Date formats also - Create Subfolder: + Keep top-level folder: diff --git a/src/webui/api/appcontroller.cpp b/src/webui/api/appcontroller.cpp index 5ae647a2b..b6a948b9e 100644 --- a/src/webui/api/appcontroller.cpp +++ b/src/webui/api/appcontroller.cpp @@ -99,7 +99,7 @@ void AppController::preferencesAction() // Downloads // When adding a torrent - data["create_subfolder_enabled"] = session->isCreateTorrentSubfolder(); + data["create_subfolder_enabled"] = session->isKeepTorrentTopLevelFolder(); data["start_paused_enabled"] = session->isAddTorrentPaused(); data["auto_delete_mode"] = static_cast(TorrentFileGuard::autoDeleteMode()); data["preallocate_all"] = session->isPreallocationEnabled(); @@ -344,7 +344,7 @@ void AppController::setPreferencesAction() // Downloads // When adding a torrent if (hasKey("create_subfolder_enabled")) - session->setCreateTorrentSubfolder(it.value().toBool()); + session->setKeepTorrentTopLevelFolder(it.value().toBool()); if (hasKey("start_paused_enabled")) session->setAddTorrentPaused(it.value().toBool()); if (hasKey("auto_delete_mode")) diff --git a/src/webui/www/private/download.html b/src/webui/www/private/download.html index 5dfe84cc8..3fd8385b9 100644 --- a/src/webui/www/private/download.html +++ b/src/webui/www/private/download.html @@ -89,7 +89,7 @@ - + diff --git a/src/webui/www/private/upload.html b/src/webui/www/private/upload.html index 6592bdd4a..8616dacc0 100644 --- a/src/webui/www/private/upload.html +++ b/src/webui/www/private/upload.html @@ -77,7 +77,7 @@ - + diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index e403a6457..41c9a80de 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -3,7 +3,7 @@ QBT_TR(When adding a torrent)QBT_TR[CONTEXT=OptionsDialog]
- +