|
|
@ -108,13 +108,13 @@ QBtSession::QBtSession() |
|
|
|
DHTEnabled(false), queueingEnabled(false), |
|
|
|
DHTEnabled(false), queueingEnabled(false), |
|
|
|
m_torrentExportEnabled(false), |
|
|
|
m_torrentExportEnabled(false), |
|
|
|
m_finishedTorrentExportEnabled(false) |
|
|
|
m_finishedTorrentExportEnabled(false) |
|
|
|
#ifndef DISABLE_GUI |
|
|
|
#ifndef DISABLE_GUI |
|
|
|
, geoipDBLoaded(false), resolve_countries(false) |
|
|
|
, geoipDBLoaded(false), resolve_countries(false) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
, m_tracker(0), m_shutdownAct(NO_SHUTDOWN) |
|
|
|
, m_tracker(0), m_shutdownAct(NO_SHUTDOWN) |
|
|
|
#if LIBTORRENT_VERSION_NUM < 10000 |
|
|
|
#if LIBTORRENT_VERSION_NUM < 10000 |
|
|
|
, m_upnp(0), m_natpmp(0) |
|
|
|
, m_upnp(0), m_natpmp(0) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
, m_alertDispatcher(0) |
|
|
|
, m_alertDispatcher(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
BigRatioTimer = new QTimer(this); |
|
|
|
BigRatioTimer = new QTimer(this); |
|
|
@ -289,9 +289,9 @@ void QBtSession::handleMagnetRedirect(const QString &url_new, const QString &url |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
addMagnetSkipAddDlg(url_new, savePath_label.first, savePath_label.second, |
|
|
|
addMagnetSkipAddDlg(url_new, savePath_label.first, savePath_label.second, |
|
|
|
#ifndef DISABLE_GUI |
|
|
|
#ifndef DISABLE_GUI |
|
|
|
state, |
|
|
|
state, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
url_old); |
|
|
|
url_old); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
@ -1215,7 +1215,7 @@ void QBtSession::initializeAddTorrentParams(const QString &hash, add_torrent_par |
|
|
|
p.storage_mode = storage_mode_sparse; |
|
|
|
p.storage_mode = storage_mode_sparse; |
|
|
|
|
|
|
|
|
|
|
|
// Priorities
|
|
|
|
// Priorities
|
|
|
|
/*if (TorrentTempData::hasTempData(hash)) {
|
|
|
|
/*if (TorrentTempData::hasTempData(hash)) {
|
|
|
|
std::vector<int> fp; |
|
|
|
std::vector<int> fp; |
|
|
|
TorrentTempData::getFilesPriority(hash, fp); |
|
|
|
TorrentTempData::getFilesPriority(hash, fp); |
|
|
|
if (!fp.empty()) { |
|
|
|
if (!fp.empty()) { |
|
|
@ -2832,10 +2832,10 @@ void QBtSession::addMagnetInteractive(const QString& uri) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifndef DISABLE_GUI |
|
|
|
#ifndef DISABLE_GUI |
|
|
|
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label, |
|
|
|
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label, |
|
|
|
const RssDownloadRule::AddPausedState &aps, const QString &uri_old) { |
|
|
|
const RssDownloadRule::AddPausedState &aps, const QString &uri_old) { |
|
|
|
#else |
|
|
|
#else |
|
|
|
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label, const QString &uri_old) { |
|
|
|
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label, const QString &uri_old) { |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if (!save_path.isEmpty() || !label.isEmpty()) |
|
|
|
if (!save_path.isEmpty() || !label.isEmpty()) |
|
|
|
savepathLabel_fromurl[uri] = qMakePair(fsutils::fromNativePath(save_path), label); |
|
|
|
savepathLabel_fromurl[uri] = qMakePair(fsutils::fromNativePath(save_path), label); |
|
|
@ -2860,10 +2860,10 @@ void QBtSession::addMagnetInteractive(const QString& uri) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifndef DISABLE_GUI |
|
|
|
#ifndef DISABLE_GUI |
|
|
|
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, |
|
|
|
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, |
|
|
|
const QList<QNetworkCookie>& cookies, const RssDownloadRule::AddPausedState &aps) { |
|
|
|
const QList<QNetworkCookie>& cookies, const RssDownloadRule::AddPausedState &aps) { |
|
|
|
#else |
|
|
|
#else |
|
|
|
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, const QList<QNetworkCookie>& cookies) { |
|
|
|
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, const QList<QNetworkCookie>& cookies) { |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
//emit aboutToDownloadFromUrl(url);
|
|
|
|
//emit aboutToDownloadFromUrl(url);
|
|
|
|
const QUrl qurl = QUrl::fromEncoded(url.toUtf8()); |
|
|
|
const QUrl qurl = QUrl::fromEncoded(url.toUtf8()); |
|
|
|