mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
- fix for UPnP option
This commit is contained in:
parent
d778766e29
commit
e0a0a0beb1
3
TODO
3
TODO
@ -42,4 +42,5 @@
|
||||
- Display Url seeds in torrent properties and allow to edit them
|
||||
- Improve Ipfilter.dat parser (move to a thread ?)
|
||||
- Use tooltips to explain options
|
||||
- Exit confirmation only if there are active downloads
|
||||
- Exit confirmation only if there are active downloads
|
||||
- Support UPnP port edition
|
@ -986,7 +986,11 @@ void GUI::configureSession(bool deleteOptions){
|
||||
}
|
||||
#ifndef NO_UPNP
|
||||
// Upnp
|
||||
BTSession.enableUPnP();
|
||||
if(options->isDHTEnabled()){
|
||||
BTSession.enableUPnP(options->getUPnPPort());
|
||||
}else{
|
||||
BTSession.disableUPnP();
|
||||
}
|
||||
#endif
|
||||
// PeX
|
||||
if(!options->isPeXDisabled()){
|
||||
|
@ -75,7 +75,7 @@ torrent_handle bittorrent::getTorrentHandle(const QString& hash) const{
|
||||
}
|
||||
|
||||
#ifndef NO_UPNP
|
||||
void bittorrent::enableUPnP(){
|
||||
void bittorrent::enableUPnP(int port){
|
||||
if(!UPnPEnabled){
|
||||
qDebug("Enabling UPnP");
|
||||
UPnPEnabled = true;
|
||||
@ -85,7 +85,7 @@ void bittorrent::enableUPnP(){
|
||||
"TCP",
|
||||
true,
|
||||
"qBittorrent");
|
||||
m_upnp = new CUPnPControlPoint(50000);
|
||||
m_upnp = new CUPnPControlPoint(port);
|
||||
m_upnp->AddPortMappings(m_upnpMappings);
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ class bittorrent : public QObject{
|
||||
void setSessionSettings(session_settings sessionSettings);
|
||||
void setDefaultSavePath(const QString& savepath);
|
||||
#ifndef NO_UPNP
|
||||
void enableUPnP();
|
||||
void enableUPnP(int port=50000);
|
||||
void disableUPnP();
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user