mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 01:44:26 +00:00
- Added support for 2 new extensions (uTorrent metadata and smart ban plugin)
- Removed option to disable uTorrent Peer eXchange (PeX) -> always ON
This commit is contained in:
parent
8b40e43432
commit
9618056b4e
@ -7,6 +7,7 @@
|
|||||||
- FEATURE: Code cleanup and optimization (save memory and cpu)
|
- FEATURE: Code cleanup and optimization (save memory and cpu)
|
||||||
- FEATURE: ETA calculation now relies on average speed over all sessions
|
- FEATURE: ETA calculation now relies on average speed over all sessions
|
||||||
- FEATURE: Allow to force rechecking torrents
|
- FEATURE: Allow to force rechecking torrents
|
||||||
|
- FEATURE: Added support for 2 new extensions (uTorrent metadata and smart ban plugin)
|
||||||
|
|
||||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.2.1
|
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.2.1
|
||||||
- BUGFIX: Fixed possible crash when deleting a torrent permanently
|
- BUGFIX: Fixed possible crash when deleting a torrent permanently
|
||||||
|
@ -1082,13 +1082,7 @@ void GUI::configureSession(bool deleteOptions) {
|
|||||||
BTSession->addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("blue"));
|
BTSession->addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("blue"));
|
||||||
}
|
}
|
||||||
// * PeX
|
// * PeX
|
||||||
if(options->isPeXEnabled()) {
|
BTSession->addConsoleMessage(tr("PeX support [ON]"), QString::fromUtf8("blue"));
|
||||||
BTSession->addConsoleMessage(tr("PeX support [ON]"), QString::fromUtf8("blue"));
|
|
||||||
BTSession->enablePeerExchange();
|
|
||||||
}else{
|
|
||||||
// TODO: How can we remove the extension?
|
|
||||||
BTSession->addConsoleMessage(tr("PeX support [OFF]"), QString::fromUtf8("blue"));
|
|
||||||
}
|
|
||||||
// * LSD
|
// * LSD
|
||||||
if(options->isLSDEnabled()) {
|
if(options->isLSDEnabled()) {
|
||||||
BTSession->enableLSD(true);
|
BTSession->enableLSD(true);
|
||||||
|
@ -29,9 +29,10 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "downloadThread.h"
|
#include "downloadThread.h"
|
||||||
#include "filterParserThread.h"
|
#include "filterParserThread.h"
|
||||||
|
#include <libtorrent/extensions/ut_metadata.hpp>
|
||||||
#include <libtorrent/extensions/metadata_transfer.hpp>
|
|
||||||
#include <libtorrent/extensions/ut_pex.hpp>
|
#include <libtorrent/extensions/ut_pex.hpp>
|
||||||
|
#include <libtorrent/extensions/smart_ban.hpp>
|
||||||
|
#include <libtorrent/extensions/metadata_transfer.hpp>
|
||||||
#include <libtorrent/entry.hpp>
|
#include <libtorrent/entry.hpp>
|
||||||
#include <libtorrent/bencode.hpp>
|
#include <libtorrent/bencode.hpp>
|
||||||
#include <libtorrent/identify_client.hpp>
|
#include <libtorrent/identify_client.hpp>
|
||||||
@ -58,8 +59,11 @@ bittorrent::bittorrent() : timerScan(0), DHTEnabled(false), preAllocateAll(false
|
|||||||
s->set_alert_mask(alert::error_notification | alert::peer_notification | alert::port_mapping_notification | alert::storage_notification | alert::tracker_notification | alert::status_notification | alert::ip_block_notification);
|
s->set_alert_mask(alert::error_notification | alert::peer_notification | alert::port_mapping_notification | alert::storage_notification | alert::tracker_notification | alert::status_notification | alert::ip_block_notification);
|
||||||
// Load previous state
|
// Load previous state
|
||||||
loadSessionState();
|
loadSessionState();
|
||||||
// Enabling metadata plugin
|
// Enabling plugins
|
||||||
s->add_extension(&create_metadata_plugin);
|
s->add_extension(&create_metadata_plugin);
|
||||||
|
s->add_extension(&create_ut_metadata_plugin);
|
||||||
|
s->add_extension(&create_ut_pex_plugin);
|
||||||
|
s->add_extension(&create_smart_ban_plugin);
|
||||||
timerAlerts = new QTimer();
|
timerAlerts = new QTimer();
|
||||||
connect(timerAlerts, SIGNAL(timeout()), this, SLOT(readAlerts()));
|
connect(timerAlerts, SIGNAL(timeout()), this, SLOT(readAlerts()));
|
||||||
timerAlerts->start(3000);
|
timerAlerts->start(3000);
|
||||||
@ -1134,12 +1138,6 @@ void bittorrent::saveTrackerFile(QString hash) {
|
|||||||
tracker_file.close();
|
tracker_file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add uT PeX extension to bittorrent session
|
|
||||||
void bittorrent::enablePeerExchange() {
|
|
||||||
qDebug("Enabling Peer eXchange");
|
|
||||||
s->add_extension(&create_ut_pex_plugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set DHT port (>= 1000)
|
// Set DHT port (>= 1000)
|
||||||
void bittorrent::setDHTPort(int dht_port) {
|
void bittorrent::setDHTPort(int dht_port) {
|
||||||
if(dht_port >= 1000) {
|
if(dht_port >= 1000) {
|
||||||
|
@ -128,7 +128,6 @@ class bittorrent : public QObject {
|
|||||||
void saveFastResumeData(QString hash);
|
void saveFastResumeData(QString hash);
|
||||||
void enableDirectoryScanning(QString scan_dir);
|
void enableDirectoryScanning(QString scan_dir);
|
||||||
void disableDirectoryScanning();
|
void disableDirectoryScanning();
|
||||||
void enablePeerExchange();
|
|
||||||
void enableIPFilter(QString filter);
|
void enableIPFilter(QString filter);
|
||||||
void disableIPFilter();
|
void disableIPFilter();
|
||||||
void setQueueingEnabled(bool enable);
|
void setQueueingEnabled(bool enable);
|
||||||
|
@ -1068,16 +1068,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkPeX" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Enable Peer eXchange (PeX)</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkLSD" >
|
<widget class="QCheckBox" name="checkLSD" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
@ -2339,7 +2329,6 @@
|
|||||||
<tabstop>checkMaxUploadsPerTorrent</tabstop>
|
<tabstop>checkMaxUploadsPerTorrent</tabstop>
|
||||||
<tabstop>spinMaxUploadsPerTorrent</tabstop>
|
<tabstop>spinMaxUploadsPerTorrent</tabstop>
|
||||||
<tabstop>checkDHT</tabstop>
|
<tabstop>checkDHT</tabstop>
|
||||||
<tabstop>checkPeX</tabstop>
|
|
||||||
<tabstop>checkLSD</tabstop>
|
<tabstop>checkLSD</tabstop>
|
||||||
<tabstop>comboEncryption</tabstop>
|
<tabstop>comboEncryption</tabstop>
|
||||||
<tabstop>checkRatioLimit</tabstop>
|
<tabstop>checkRatioLimit</tabstop>
|
||||||
|
@ -192,7 +192,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
|
|||||||
connect(spinMaxConnecPerTorrent, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
connect(spinMaxConnecPerTorrent, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||||
connect(spinMaxUploadsPerTorrent, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
connect(spinMaxUploadsPerTorrent, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||||
connect(checkDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
connect(checkDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
||||||
connect(checkPeX, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
|
||||||
connect(checkLSD, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
connect(checkLSD, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
||||||
connect(checkAzureusSpoof, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
connect(checkAzureusSpoof, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
|
||||||
connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
|
connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
|
||||||
@ -357,7 +356,6 @@ void options_imp::saveOptions(){
|
|||||||
settings.setValue(QString::fromUtf8("MaxConnecsPerTorrent"), getMaxConnecsPerTorrent());
|
settings.setValue(QString::fromUtf8("MaxConnecsPerTorrent"), getMaxConnecsPerTorrent());
|
||||||
settings.setValue(QString::fromUtf8("MaxUploadsPerTorrent"), getMaxUploadsPerTorrent());
|
settings.setValue(QString::fromUtf8("MaxUploadsPerTorrent"), getMaxUploadsPerTorrent());
|
||||||
settings.setValue(QString::fromUtf8("DHT"), isDHTEnabled());
|
settings.setValue(QString::fromUtf8("DHT"), isDHTEnabled());
|
||||||
settings.setValue(QString::fromUtf8("PeX"), isPeXEnabled());
|
|
||||||
settings.setValue(QString::fromUtf8("LSD"), isLSDEnabled());
|
settings.setValue(QString::fromUtf8("LSD"), isLSDEnabled());
|
||||||
settings.setValue(QString::fromUtf8("AzureusSpoof"), shouldSpoofAzureus());
|
settings.setValue(QString::fromUtf8("AzureusSpoof"), shouldSpoofAzureus());
|
||||||
settings.setValue(QString::fromUtf8("Encryption"), getEncryptionSetting());
|
settings.setValue(QString::fromUtf8("Encryption"), getEncryptionSetting());
|
||||||
@ -646,7 +644,6 @@ void options_imp::loadOptions(){
|
|||||||
spinMaxUploadsPerTorrent->setEnabled(false);
|
spinMaxUploadsPerTorrent->setEnabled(false);
|
||||||
}
|
}
|
||||||
checkDHT->setChecked(settings.value(QString::fromUtf8("DHT"), true).toBool());
|
checkDHT->setChecked(settings.value(QString::fromUtf8("DHT"), true).toBool());
|
||||||
checkPeX->setChecked(settings.value(QString::fromUtf8("PeX"), true).toBool());
|
|
||||||
checkLSD->setChecked(settings.value(QString::fromUtf8("LSD"), true).toBool());
|
checkLSD->setChecked(settings.value(QString::fromUtf8("LSD"), true).toBool());
|
||||||
checkAzureusSpoof->setChecked(settings.value(QString::fromUtf8("AzureusSpoof"), false).toBool());
|
checkAzureusSpoof->setChecked(settings.value(QString::fromUtf8("AzureusSpoof"), false).toBool());
|
||||||
comboEncryption->setCurrentIndex(settings.value(QString::fromUtf8("Encryption"), 0).toInt());
|
comboEncryption->setCurrentIndex(settings.value(QString::fromUtf8("Encryption"), 0).toInt());
|
||||||
@ -778,10 +775,6 @@ bool options_imp::isRSSEnabled() const{
|
|||||||
return checkEnableRSS->isChecked();
|
return checkEnableRSS->isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool options_imp::isPeXEnabled() const{
|
|
||||||
return checkPeX->isChecked();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool options_imp::isLSDEnabled() const{
|
bool options_imp::isLSDEnabled() const{
|
||||||
return checkLSD->isChecked();
|
return checkLSD->isChecked();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user