Browse Source

Allow strip root folder using default settings

adaptive-webui-19844
Vladimir Golovnev (Glassez) 8 years ago
parent
commit
c799923d7d
  1. 2
      src/base/bittorrent/session.h
  2. 4
      src/base/bittorrent/torrenthandle.cpp
  3. 2
      src/gui/addnewtorrentdialog.cpp

2
src/base/bittorrent/session.h

@ -147,7 +147,7 @@ namespace BitTorrent @@ -147,7 +147,7 @@ namespace BitTorrent
QVector<int> filePriorities; // used if TorrentInfo is set
bool ignoreShareRatio = false;
bool skipChecking = false;
bool createSubfolder = true;
TriStateBool createSubfolder;
};
struct TorrentStatusReport

4
src/base/bittorrent/torrenthandle.cpp

@ -92,7 +92,9 @@ AddTorrentData::AddTorrentData(const AddTorrentParams &params) @@ -92,7 +92,9 @@ AddTorrentData::AddTorrentData(const AddTorrentParams &params)
, sequential(params.sequential)
, hasSeedStatus(params.skipChecking) // do not react on 'torrent_finished_alert' when skipping
, skipChecking(params.skipChecking)
, hasRootFolder(params.createSubfolder)
, hasRootFolder(params.createSubfolder == TriStateBool::Undefined
? Session::instance()->isCreateTorrentSubfolder()
: params.createSubfolder == TriStateBool::True)
, addForced(params.addForced == TriStateBool::True)
, addPaused(params.addPaused == TriStateBool::Undefined
? Session::instance()->isAddTorrentPaused()

2
src/gui/addnewtorrentdialog.cpp

@ -642,7 +642,7 @@ void AddNewTorrentDialog::accept() @@ -642,7 +642,7 @@ void AddNewTorrentDialog::accept()
params.filePriorities = m_contentModel->model()->getFilePriorities();
params.addPaused = TriStateBool(!ui->startTorrentCheckBox->isChecked());
params.createSubfolder = ui->createSubfolderCheckBox->isChecked();
params.createSubfolder = TriStateBool(ui->createSubfolderCheckBox->isChecked());
QString savePath = ui->savePathComboBox->itemData(ui->savePathComboBox->currentIndex()).toString();
if (ui->comboTTM->currentIndex() != 1) { // 0 is Manual mode and 1 is Automatic mode. Handle all non 1 values as manual mode.

Loading…
Cancel
Save