- Branched trunk in order to work on a major GUI remodeling. I will attempt to:

* Merge download and upload lists
  * Display torrent properties in the same tab (horizontal split)
This commit is contained in:
Christophe Dumez 2009-11-06 14:30:14 +00:00
parent edfd93496e
commit 7792b4f849
78 changed files with 7847 additions and 5368 deletions

View file

@ -2,10 +2,10 @@ Author:
* Christophe Dumez <chris@qbittorrent.org> * Christophe Dumez <chris@qbittorrent.org>
Contributors: Contributors:
* Arnaud Demaizière <arnaud@qbittorrent.org>
* Ishan Arora <ishan@qbittorrent.org>
* Grigis Gaëtan <cipher16@gmail.com>
* Stefanos Antaris <santaris@csd.auth.gr> * Stefanos Antaris <santaris@csd.auth.gr>
* Ishan Arora <ishan@qbittorrent.org>
* Arnaud Demaizière <arnaud@qbittorrent.org>
* Grigis Gaëtan <cipher16@gmail.com>
Code from other projects: Code from other projects:
* files src/ico.cpp src/ico.h * files src/ico.cpp src/ico.h

View file

@ -11,6 +11,9 @@
- FEATURE: Tracker connections are now also subject to IP filtering - FEATURE: Tracker connections are now also subject to IP filtering
- FEATURE: Include DHT traffic in the rate limiter - FEATURE: Include DHT traffic in the rate limiter
- FEATURE: Support for bitcomet padding files - FEATURE: Support for bitcomet padding files
- FEATURE: Option to skip file checking and start seeding immediately in torrent addition dialog (Stephanos Antaris)
- FEATURE: Dropped dependency on libcurl
- FEATURE: Dropped Qt 4.3 support (Qt >= 4.4 is required)
* Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0 * Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
- FEATURE: Added Magnet URI support - FEATURE: Added Magnet URI support

14
INSTALL
View file

@ -1,12 +1,6 @@
qBittorrent - A BitTorrent client in C++ / Qt4 qBittorrent - A BitTorrent client in C++ / Qt4
------------------------------------------ ------------------------------------------
*** Necessary if qt3 is default on your system ***
export QTDIR=/usr/include/qt4
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
*** End ***
./configure ./configure
make && make install make && make install
qbittorrent qbittorrent
@ -14,8 +8,7 @@ qbittorrent
will install and execute qBittorrent hopefully without any problems. will install and execute qBittorrent hopefully without any problems.
Dependencies: Dependencies:
- Qt >= 4.3.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml) - Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
Qt >= 4.4.0 is advised
- libtorrent-rasterbar by Arvid Norberg (>= v0.15.0 REQUIRED) - libtorrent-rasterbar by Arvid Norberg (>= v0.15.0 REQUIRED)
-> http://www.qbittorrent.org/download.php (advised) -> http://www.qbittorrent.org/download.php (advised)
@ -24,13 +17,8 @@ Dependencies:
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization - libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
- libcurl
- python >= 2.3 (needed by search engine) - python >= 2.3 (needed by search engine)
- libmagick++ (advised, not required)
* Needed for favicons support (RSS / Search plugins)
- libzzip (advised, not required) - libzzip (advised, not required)
* Needed for zip support (Search plugins) * Needed for zip support (Search plugins)

90
configure vendored
View file

@ -19,8 +19,6 @@ Main options:
Dependency options: Dependency options:
--with-libboost-inc=[path] Path to libboost include files --with-libboost-inc=[path] Path to libboost include files
--with-libcurl-inc=[path] Path to libcurl include files
--with-libcurl-lib=[path] Path to libcurl library files
--disable-libzzip Disable use of libzzip --disable-libzzip Disable use of libzzip
--with-libzzip-inc=[path] Path to libzzip++ include files --with-libzzip-inc=[path] Path to libzzip++ include files
--with-libzzip-lib=[path] Path to libzzip++ library files --with-libzzip-lib=[path] Path to libzzip++ library files
@ -145,16 +143,6 @@ while [ $# -gt 0 ]; do
shift shift
;; ;;
--with-libcurl-inc=*)
QC_WITH_LIBCURL_INC=$optarg
shift
;;
--with-libcurl-lib=*)
QC_WITH_LIBCURL_LIB=$optarg
shift
;;
--disable-libzzip) --disable-libzzip)
QC_DISABLE_libzzip="Y" QC_DISABLE_libzzip="Y"
shift shift
@ -192,8 +180,6 @@ echo BINDIR=$BINDIR
echo DATADIR=$DATADIR echo DATADIR=$DATADIR
echo EX_QTDIR=$EX_QTDIR echo EX_QTDIR=$EX_QTDIR
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
echo QC_DISABLE_libzzip=$QC_DISABLE_libzzip echo QC_DISABLE_libzzip=$QC_DISABLE_libzzip
echo QC_WITH_LIBZZIP_INC=$QC_WITH_LIBZZIP_INC echo QC_WITH_LIBZZIP_INC=$QC_WITH_LIBZZIP_INC
echo QC_WITH_LIBZZIP_LIB=$QC_WITH_LIBZZIP_LIB echo QC_WITH_LIBZZIP_LIB=$QC_WITH_LIBZZIP_LIB
@ -308,14 +294,11 @@ class qc_qt4 : public ConfObj
{ {
public: public:
qc_qt4(Conf *c) : ConfObj(c) {} qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.3"; } QString name() const { return "Qt >= 4.4"; }
QString shortname() const { return "Qt 4.3"; } QString shortname() const { return "Qt 4.4"; }
bool exec() bool exec()
{ {
if(QT_VERSION >= 0x040400) { return(QT_VERSION >= 0x040400);
conf->addDefine("QT_4_4");
}
return(QT_VERSION >= 0x040300);
} }
}; };
@ -403,68 +386,6 @@ public:
return true; return true;
} }
}; };
#line 1 "libcurl.qcm"
/*
-----BEGIN QCMOD-----
name: libcommoncpp2
arg: with-libcurl-inc=[path], Path to libcurl include files
arg: with-libcurl-lib=[path], Path to libcurl library files
-----END QCMOD-----
*/
class qc_libcurl : public ConfObj
{
public:
qc_libcurl(Conf *c) : ConfObj(c) {}
QString name() const { return "libcurl"; }
QString shortname() const { return "libcurl"; }
bool exec(){
QString s;
s = conf->getenv("QC_WITH_LIBCURL_INC");
if(!s.isEmpty()) {
if(!conf->checkHeader(s, "curl/curl.h")) {
return false;
}
}else{
QStringList sl;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach(s, sl){
if(conf->checkHeader(s, "curl/curl.h")){
found = true;
break;
}
}
if(!found) {
return false;
}
}
conf->addIncludePath(s);
s = conf->getenv("QC_WITH_LIBCURL_LIB");
if(!s.isEmpty()) {
if(!QFile::exists(s+QString("/libcurl.so")))
return false;
conf->addLib(QString("-L") + s);
}else{
QStringList sl;
sl << "/usr/lib/";
sl << "/usr/lib64/";
sl << "/usr/local/lib/";
sl << "/usr/local/lib64/";
bool found = false;
foreach(s, sl){
if(QFile::exists(s+QString("libcurl.so"))){
found = true;
break;
}
}
if(!found) return false;
conf->addLib(QString("-L") + s);
}
return true;
}
};
#line 1 "libzzip.qcm" #line 1 "libzzip.qcm"
/* /*
-----BEGIN QCMOD----- -----BEGIN QCMOD-----
@ -549,9 +470,6 @@ cat >$1/modules_new.cpp <<EOT
o = new qc_libboost(conf); o = new qc_libboost(conf);
o->required = true; o->required = true;
o->disabled = false; o->disabled = false;
o = new qc_libcurl(conf);
o->required = true;
o->disabled = false;
o = new qc_libzzip(conf); o = new qc_libzzip(conf);
o->required = false; o->required = false;
o->disabled = false; o->disabled = false;
@ -1501,8 +1419,6 @@ export BINDIR
export DATADIR export DATADIR
export EX_QTDIR export EX_QTDIR
export QC_WITH_LIBBOOST_INC export QC_WITH_LIBBOOST_INC
export QC_WITH_LIBCURL_INC
export QC_WITH_LIBCURL_LIB
export QC_DISABLE_libzzip export QC_DISABLE_libzzip
export QC_WITH_LIBZZIP_INC export QC_WITH_LIBZZIP_INC
export QC_WITH_LIBZZIP_LIB export QC_WITH_LIBZZIP_LIB

View file

@ -8,7 +8,7 @@ qBittorrent \- a Bittorrent client written in C++ / Qt4
.SH "SYNOPSIS" .SH "SYNOPSIS"
\fBqbittorrent\fR [--no-splash] [TORRENT_FILE | URL]... \fBqbittorrent\fR [\-\-no-splash] [TORRENT_FILE | URL]...
\fBqbittorrent\fR \-\-help \fBqbittorrent\fR \-\-help

View file

@ -12,8 +12,5 @@
<dep type='libboost'> <dep type='libboost'>
<required/> <required/>
</dep> </dep>
<dep type='libcurl'>
<required/>
</dep>
<dep type='libzzip'/> <dep type='libzzip'/>
</qconf> </qconf>

View file

@ -1,61 +0,0 @@
/*
-----BEGIN QCMOD-----
name: libcommoncpp2
arg: with-libcurl-inc=[path], Path to libcurl include files
arg: with-libcurl-lib=[path], Path to libcurl library files
-----END QCMOD-----
*/
class qc_libcurl : public ConfObj
{
public:
qc_libcurl(Conf *c) : ConfObj(c) {}
QString name() const { return "libcurl"; }
QString shortname() const { return "libcurl"; }
bool exec(){
QString s;
s = conf->getenv("QC_WITH_LIBCURL_INC");
if(!s.isEmpty()) {
if(!conf->checkHeader(s, "curl/curl.h")) {
return false;
}
}else{
QStringList sl;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach(s, sl){
if(conf->checkHeader(s, "curl/curl.h")){
found = true;
break;
}
}
if(!found) {
return false;
}
}
conf->addIncludePath(s);
s = conf->getenv("QC_WITH_LIBCURL_LIB");
if(!s.isEmpty()) {
if(!QFile::exists(s+QString("/libcurl.so")))
return false;
conf->addLib(QString("-L") + s);
}else{
QStringList sl;
sl << "/usr/lib/";
sl << "/usr/lib64/";
sl << "/usr/local/lib/";
sl << "/usr/local/lib64/";
bool found = false;
foreach(s, sl){
if(QFile::exists(s+QString("libcurl.so"))){
found = true;
break;
}
}
if(!found) return false;
conf->addLib(QString("-L") + s);
}
return true;
}
};

View file

@ -7,14 +7,11 @@ class qc_qt4 : public ConfObj
{ {
public: public:
qc_qt4(Conf *c) : ConfObj(c) {} qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.3"; } QString name() const { return "Qt >= 4.4"; }
QString shortname() const { return "Qt 4.3"; } QString shortname() const { return "Qt 4.4"; }
bool exec() bool exec()
{ {
if(QT_VERSION >= 0x040400) { return(QT_VERSION >= 0x040400);
conf->addDefine("QT_4_4");
}
return(QT_VERSION >= 0x040300);
} }
}; };

View file

@ -35,15 +35,10 @@
#include <QStatusBar> #include <QStatusBar>
#include <QFrame> #include <QFrame>
#include <QClipboard> #include <QClipboard>
#ifdef QT_4_4
#include <QLocalServer> #include <QLocalServer>
#include <QLocalSocket> #include <QLocalSocket>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#else
#include <QTcpServer>
#include <QTcpSocket>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <QCloseEvent> #include <QCloseEvent>
#include <QShortcut> #include <QShortcut>
@ -189,7 +184,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
initWebUi(username, password, port); initWebUi(username, password, port);
} }
// Use a tcp server to allow only one instance of qBittorrent // Use a tcp server to allow only one instance of qBittorrent
#ifdef QT_4_4
localServer = new QLocalServer(); localServer = new QLocalServer();
QString uid = QString::number(getuid()); QString uid = QString::number(getuid());
#ifdef Q_WS_X11 #ifdef Q_WS_X11
@ -200,18 +194,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
#endif #endif
if (!localServer->listen("qBittorrent-"+uid)) { if (!localServer->listen("qBittorrent-"+uid)) {
#else
localServer = new QTcpServer();
if (!localServer->listen(QHostAddress::LocalHost)) {
#endif
std::cerr << "Couldn't create socket, single instance mode won't work...\n"; std::cerr << "Couldn't create socket, single instance mode won't work...\n";
} }
#ifndef QT_4_4
else {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.setValue(QString::fromUtf8("uniqueInstancePort"), localServer->serverPort());
}
#endif
connect(localServer, SIGNAL(newConnection()), this, SLOT(acceptConnection())); connect(localServer, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
// Start connection checking timer // Start connection checking timer
checkConnect = new QTimer(this); checkConnect = new QTimer(this);
@ -257,10 +241,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers())); connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers()));
scrapeTimer->start(20000); scrapeTimer->start(20000);
qDebug("GUI Built"); qDebug("GUI Built");
} }
// Destructor // Destructor
GUI::~GUI() { GUI::~GUI() {
qDebug("GUI destruction"); qDebug("GUI destruction");
hide(); hide();
// Do this as soon as possible // Do this as soon as possible
@ -310,9 +294,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
qDebug("4"); qDebug("4");
delete BTSession; delete BTSession;
qDebug("5"); qDebug("5");
} }
void GUI::displayRSSTab(bool enable) { void GUI::displayRSSTab(bool enable) {
if(enable) { if(enable) {
// RSS tab // RSS tab
if(rssWidget == 0) { if(rssWidget == 0) {
@ -326,9 +310,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
rssWidget = 0; rssWidget = 0;
} }
} }
} }
void GUI::scrapeTrackers() { void GUI::scrapeTrackers() {
std::vector<torrent_handle> torrents = BTSession->getTorrents(); std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT; std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) { for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
@ -336,9 +320,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
if(!h.is_valid()) continue; if(!h.is_valid()) continue;
h.scrape_tracker(); h.scrape_tracker();
} }
} }
void GUI::updateRatio() { void GUI::updateRatio() {
// Update ratio info // Update ratio info
float ratio = 1.; float ratio = 1.;
session_status sessionStatus = BTSession->getSessionStatus(); session_status sessionStatus = BTSession->getSessionStatus();
@ -355,30 +339,30 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
ratioLbl->setText(tr("Ratio: %1").arg(QString(QByteArray::number(ratio, 'f', 1)))); ratioLbl->setText(tr("Ratio: %1").arg(QString(QByteArray::number(ratio, 'f', 1))));
// Update DHT nodes // Update DHT nodes
DHTLbl->setText(tr("DHT: %1 nodes").arg(QString::number(sessionStatus.dht_nodes))); DHTLbl->setText(tr("DHT: %1 nodes").arg(QString::number(sessionStatus.dht_nodes)));
} }
void GUI::on_actionWebsite_triggered() const { void GUI::on_actionWebsite_triggered() const {
QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://www.qbittorrent.org"))); QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://www.qbittorrent.org")));
} }
void GUI::on_actionDocumentation_triggered() const { void GUI::on_actionDocumentation_triggered() const {
QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://wiki.qbittorrent.org"))); QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://wiki.qbittorrent.org")));
} }
void GUI::on_actionBugReport_triggered() const { void GUI::on_actionBugReport_triggered() const {
QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://bugs.qbittorrent.org"))); QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://bugs.qbittorrent.org")));
} }
void GUI::writeSettings() { void GUI::writeSettings() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.beginGroup(QString::fromUtf8("MainWindow")); settings.beginGroup(QString::fromUtf8("MainWindow"));
settings.setValue(QString::fromUtf8("size"), size()); settings.setValue(QString::fromUtf8("size"), size());
settings.setValue(QString::fromUtf8("pos"), pos()); settings.setValue(QString::fromUtf8("pos"), pos());
settings.endGroup(); settings.endGroup();
} }
// called when a torrent has finished // called when a torrent has finished
void GUI::finishedTorrent(QTorrentHandle& h) const { void GUI::finishedTorrent(QTorrentHandle& h) const {
qDebug("In GUI, a torrent has finished"); qDebug("In GUI, a torrent has finished");
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool show_msg = true; bool show_msg = true;
@ -395,33 +379,33 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
if(show_msg && systrayIntegration && useNotificationBalloons) { if(show_msg && systrayIntegration && useNotificationBalloons) {
myTrayIcon->showMessage(tr("Download finished"), tr("%1 has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(fileName), QSystemTrayIcon::Information, TIME_TRAY_BALLOON); myTrayIcon->showMessage(tr("Download finished"), tr("%1 has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(fileName), QSystemTrayIcon::Information, TIME_TRAY_BALLOON);
} }
} }
void GUI::addedTorrent(QTorrentHandle& h) const { void GUI::addedTorrent(QTorrentHandle& h) const {
if(h.is_seed()) { if(h.is_seed()) {
finishedTorrentTab->addTorrent(h.hash()); finishedTorrentTab->addTorrent(h.hash());
} else { } else {
downloadingTorrentTab->addTorrent(h.hash()); downloadingTorrentTab->addTorrent(h.hash());
} }
} }
void GUI::pausedTorrent(QTorrentHandle& h) const { void GUI::pausedTorrent(QTorrentHandle& h) const {
if(h.is_seed()) { if(h.is_seed()) {
finishedTorrentTab->pauseTorrent(h.hash()); finishedTorrentTab->pauseTorrent(h.hash());
} else { } else {
downloadingTorrentTab->pauseTorrent(h.hash()); downloadingTorrentTab->pauseTorrent(h.hash());
} }
} }
void GUI::resumedTorrent(QTorrentHandle& h) const { void GUI::resumedTorrent(QTorrentHandle& h) const {
if(h.is_seed()) { if(h.is_seed()) {
finishedTorrentTab->updateTorrent(h); finishedTorrentTab->updateTorrent(h);
} else { } else {
downloadingTorrentTab->updateTorrent(h); downloadingTorrentTab->updateTorrent(h);
} }
} }
void GUI::checkedTorrent(QTorrentHandle& h) const { void GUI::checkedTorrent(QTorrentHandle& h) const {
if(h.is_seed()) { if(h.is_seed()) {
// Move torrent to finished tab // Move torrent to finished tab
downloadingTorrentTab->deleteTorrent(h.hash()); downloadingTorrentTab->deleteTorrent(h.hash());
@ -434,10 +418,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
downloadingTorrentTab->addTorrent(h.hash()); downloadingTorrentTab->addTorrent(h.hash());
} }
} }
} }
// Notification when disk is full // Notification when disk is full
void GUI::fullDiskError(QTorrentHandle& h, QString msg) const { void GUI::fullDiskError(QTorrentHandle& h, QString msg) const {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool(); bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool();
if(systrayIntegration && useNotificationBalloons) { if(systrayIntegration && useNotificationBalloons) {
@ -448,9 +432,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data()); qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data());
setPaused(h); setPaused(h);
BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name())); BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name()));
} }
void GUI::setPaused(QTorrentHandle &h) const { void GUI::setPaused(QTorrentHandle &h) const {
if(!h.is_paused()) { if(!h.is_paused()) {
// FIXME in v1.6.0: Add Error state and stop using pause for this // FIXME in v1.6.0: Add Error state and stop using pause for this
h.pause(); h.pause();
@ -463,9 +447,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
}else{ }else{
downloadingTorrentTab->pauseTorrent(h.hash()); downloadingTorrentTab->pauseTorrent(h.hash());
} }
} }
void GUI::createKeyboardShortcuts() { void GUI::createKeyboardShortcuts() {
actionCreate_torrent->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+N"))); actionCreate_torrent->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+N")));
actionOpen->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+O"))); actionOpen->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+O")));
actionExit->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Q"))); actionExit->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Q")));
@ -489,36 +473,36 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
actionPause_All->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Shift+P"))); actionPause_All->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Shift+P")));
actionDecreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+-"))); actionDecreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+-")));
actionIncreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl++"))); actionIncreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl++")));
} }
// Keyboard shortcuts slots // Keyboard shortcuts slots
void GUI::displayDownTab() const { void GUI::displayDownTab() const {
tabs->setCurrentIndex(0); tabs->setCurrentIndex(0);
} }
void GUI::displayUpTab() const { void GUI::displayUpTab() const {
tabs->setCurrentIndex(1); tabs->setCurrentIndex(1);
} }
void GUI::displaySearchTab() const { void GUI::displaySearchTab() const {
tabs->setCurrentIndex(2); tabs->setCurrentIndex(2);
} }
void GUI::displayRSSTab() const { void GUI::displayRSSTab() const {
tabs->setCurrentIndex(3); tabs->setCurrentIndex(3);
} }
// End of keyboard shortcuts slots // End of keyboard shortcuts slots
void GUI::readSettings() { void GUI::readSettings() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.beginGroup(QString::fromUtf8("MainWindow")); settings.beginGroup(QString::fromUtf8("MainWindow"));
resize(settings.value(QString::fromUtf8("size"), size()).toSize()); resize(settings.value(QString::fromUtf8("size"), size()).toSize());
move(settings.value(QString::fromUtf8("pos"), screenCenter()).toPoint()); move(settings.value(QString::fromUtf8("pos"), screenCenter()).toPoint());
settings.endGroup(); settings.endGroup();
} }
void GUI::balloonClicked() { void GUI::balloonClicked() {
if(isHidden()) { if(isHidden()) {
show(); show();
if(isMinimized()) { if(isMinimized()) {
@ -527,15 +511,15 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
raise(); raise();
activateWindow(); activateWindow();
} }
} }
void GUI::acceptConnection() { void GUI::acceptConnection() {
clientConnection = localServer->nextPendingConnection(); clientConnection = localServer->nextPendingConnection();
connect(clientConnection, SIGNAL(disconnected()), this, SLOT(readParamsOnSocket())); connect(clientConnection, SIGNAL(disconnected()), this, SLOT(readParamsOnSocket()));
qDebug("accepted connection from another instance"); qDebug("accepted connection from another instance");
} }
void GUI::readParamsOnSocket() { void GUI::readParamsOnSocket() {
if(clientConnection) { if(clientConnection) {
QByteArray params = clientConnection->readAll(); QByteArray params = clientConnection->readAll();
if(!params.isEmpty()) { if(!params.isEmpty()) {
@ -543,28 +527,28 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
qDebug("Received parameters from another instance"); qDebug("Received parameters from another instance");
} }
} }
} }
void GUI::handleDownloadFromUrlFailure(QString url, QString reason) const{ void GUI::handleDownloadFromUrlFailure(QString url, QString reason) const{
// Display a message box // Display a message box
QMessageBox::critical(0, tr("Url download error"), tr("Couldn't download file at url: %1, reason: %2.").arg(url).arg(reason)); QMessageBox::critical(0, tr("Url download error"), tr("Couldn't download file at url: %1, reason: %2.").arg(url).arg(reason));
} }
void GUI::on_actionSet_global_upload_limit_triggered() { void GUI::on_actionSet_global_upload_limit_triggered() {
qDebug("actionSet_global_upload_limit_triggered"); qDebug("actionSet_global_upload_limit_triggered");
new BandwidthAllocationDialog(this, true, BTSession, QStringList()); new BandwidthAllocationDialog(this, true, BTSession, QStringList());
} }
void GUI::on_actionShow_console_triggered() { void GUI::on_actionShow_console_triggered() {
new consoleDlg(this, BTSession); new consoleDlg(this, BTSession);
} }
void GUI::on_actionSet_global_download_limit_triggered() { void GUI::on_actionSet_global_download_limit_triggered() {
qDebug("actionSet_global_download_limit_triggered"); qDebug("actionSet_global_download_limit_triggered");
new BandwidthAllocationDialog(this, false, BTSession, QStringList()); new BandwidthAllocationDialog(this, false, BTSession, QStringList());
} }
void GUI::on_actionPreview_file_triggered() { void GUI::on_actionPreview_file_triggered() {
QString hash; QString hash;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
case 0: case 0:
@ -578,9 +562,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);
new previewSelect(this, h); new previewSelect(this, h);
} }
void GUI::openDestinationFolder() const { void GUI::openDestinationFolder() const {
QStringList hashes; QStringList hashes;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
case 0: case 0:
@ -601,9 +585,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
QDesktopServices::openUrl(QString("file://")+savePath); QDesktopServices::openUrl(QString("file://")+savePath);
} }
} }
} }
void GUI::copyMagnetURI() const { void GUI::copyMagnetURI() const {
QStringList hashes; QStringList hashes;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
case 0: case 0:
@ -623,9 +607,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
} }
qApp->clipboard()->setText(magnet_uris.join("\n")); qApp->clipboard()->setText(magnet_uris.join("\n"));
} }
void GUI::goBuyPage() const { void GUI::goBuyPage() const {
QStringList hashes; QStringList hashes;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
case 0: case 0:
@ -642,31 +626,31 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);
QDesktopServices::openUrl("http://match.sharemonkey.com/?info_hash="+hash+"&n="+h.name()+"&cid=33"); QDesktopServices::openUrl("http://match.sharemonkey.com/?info_hash="+hash+"&n="+h.name()+"&cid=33");
} }
} }
// Necessary if we want to close the window // Necessary if we want to close the window
// in one time if "close to systray" is enabled // in one time if "close to systray" is enabled
void GUI::on_actionExit_triggered() { void GUI::on_actionExit_triggered() {
force_exit = true; force_exit = true;
close(); close();
} }
void GUI::previewFile(QString filePath) { void GUI::previewFile(QString filePath) {
QDesktopServices::openUrl(QString("file://")+filePath); QDesktopServices::openUrl(QString("file://")+filePath);
} }
int GUI::getCurrentTabIndex() const{ int GUI::getCurrentTabIndex() const{
if(isMinimized() || isHidden()) if(isMinimized() || isHidden())
return -1; return -1;
return tabs->currentIndex(); return tabs->currentIndex();
} }
void GUI::setTabText(int index, QString text) const { void GUI::setTabText(int index, QString text) const {
tabs->setTabText(index, text); tabs->setTabText(index, text);
} }
// Toggle Main window visibility // Toggle Main window visibility
void GUI::toggleVisibility(QSystemTrayIcon::ActivationReason e) { void GUI::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) { if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
if(isHidden()) { if(isHidden()) {
show(); show();
@ -683,10 +667,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
hide(); hide();
} }
} }
} }
// Center window // Center window
QPoint GUI::screenCenter() const{ QPoint GUI::screenCenter() const{
int scrn = 0; int scrn = 0;
QWidget *w = this->topLevelWidget(); QWidget *w = this->topLevelWidget();
@ -699,22 +683,22 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
QRect desk(QApplication::desktop()->availableGeometry(scrn)); QRect desk(QApplication::desktop()->availableGeometry(scrn));
return QPoint((desk.width() - this->frameGeometry().width()) / 2, (desk.height() - this->frameGeometry().height()) / 2); return QPoint((desk.width() - this->frameGeometry().width()) / 2, (desk.height() - this->frameGeometry().height()) / 2);
} }
// Display About Dialog // Display About Dialog
void GUI::on_actionAbout_triggered() { void GUI::on_actionAbout_triggered() {
//About dialog //About dialog
new about(this); new about(this);
} }
void GUI::showEvent(QShowEvent *e) { void GUI::showEvent(QShowEvent *e) {
qDebug("** Show Event **"); qDebug("** Show Event **");
updateLists(true); updateLists(true);
e->accept(); e->accept();
} }
// Called when we close the program // Called when we close the program
void GUI::closeEvent(QCloseEvent *e) { void GUI::closeEvent(QCloseEvent *e) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool(); bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool();
@ -750,16 +734,16 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// Accept exit // Accept exit
e->accept(); e->accept();
qApp->exit(); qApp->exit();
} }
// Display window to create a torrent // Display window to create a torrent
void GUI::on_actionCreate_torrent_triggered() { void GUI::on_actionCreate_torrent_triggered() {
createtorrent *ct = new createtorrent(this); createtorrent *ct = new createtorrent(this);
connect(ct, SIGNAL(torrent_to_seed(QString)), this, SLOT(addTorrent(QString))); connect(ct, SIGNAL(torrent_to_seed(QString)), this, SLOT(addTorrent(QString)));
} }
bool GUI::event(QEvent * e) { bool GUI::event(QEvent * e) {
if(e->type() == QEvent::WindowStateChange) { if(e->type() == QEvent::WindowStateChange) {
//Now check to see if the window is minimised //Now check to see if the window is minimised
if(isMinimized()) { if(isMinimized()) {
@ -771,10 +755,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
} }
return QMainWindow::event(e); return QMainWindow::event(e);
} }
// Action executed when a file is dropped // Action executed when a file is dropped
void GUI::dropEvent(QDropEvent *event) { void GUI::dropEvent(QDropEvent *event) {
event->acceptProposedAction(); event->acceptProposedAction();
QStringList files; QStringList files;
if(event->mimeData()->hasUrls()) { if(event->mimeData()->hasUrls()) {
@ -809,27 +793,27 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
BTSession->addTorrent(file); BTSession->addTorrent(file);
} }
} }
} }
// Decode if we accept drag 'n drop or not // Decode if we accept drag 'n drop or not
void GUI::dragEnterEvent(QDragEnterEvent *event) { void GUI::dragEnterEvent(QDragEnterEvent *event) {
foreach(const QString &mime, event->mimeData()->formats()){ foreach(const QString &mime, event->mimeData()->formats()){
qDebug("mimeData: %s", mime.toLocal8Bit().data()); qDebug("mimeData: %s", mime.toLocal8Bit().data());
} }
if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) { if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) {
event->acceptProposedAction(); event->acceptProposedAction();
} }
} }
/***************************************************** /*****************************************************
* * * *
* Torrent * * Torrent *
* * * *
*****************************************************/ *****************************************************/
// Display a dialog to allow user to add // Display a dialog to allow user to add
// torrents to download list // torrents to download list
void GUI::on_actionOpen_triggered() { void GUI::on_actionOpen_triggered() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
// Open File Open Dialog // Open File Open Dialog
// Note: it is possible to select more than one file // Note: it is possible to select more than one file
@ -852,10 +836,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
top_dir.removeLast(); top_dir.removeLast();
settings.setValue(QString::fromUtf8("MainWindowLastDir"), top_dir.join(QDir::separator())); settings.setValue(QString::fromUtf8("MainWindowLastDir"), top_dir.join(QDir::separator()));
} }
} }
// delete from download list AND from hard drive // delete from download list AND from hard drive
void GUI::on_actionDelete_Permanently_triggered() { void GUI::on_actionDelete_Permanently_triggered() {
QStringList hashes; QStringList hashes;
bool inDownloadList = true; bool inDownloadList = true;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
@ -895,16 +879,16 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// Remove the torrent // Remove the torrent
BTSession->deleteTorrent(hash, true); BTSession->deleteTorrent(hash, true);
} }
} }
void GUI::deleteTorrent(QString hash) { void GUI::deleteTorrent(QString hash) {
// Delete item from list // Delete item from list
downloadingTorrentTab->deleteTorrent(hash); downloadingTorrentTab->deleteTorrent(hash);
finishedTorrentTab->deleteTorrent(hash); finishedTorrentTab->deleteTorrent(hash);
} }
// delete selected items in the list // delete selected items in the list
void GUI::on_actionDelete_triggered() { void GUI::on_actionDelete_triggered() {
QStringList hashes; QStringList hashes;
bool inDownloadList = true; bool inDownloadList = true;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
@ -947,13 +931,13 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// Remove the torrent // Remove the torrent
BTSession->deleteTorrent(hash, false); BTSession->deleteTorrent(hash, false);
} }
} }
// As program parameters, we can get paths or urls. // As program parameters, we can get paths or urls.
// This function parse the parameters and call // This function parse the parameters and call
// the right addTorrent function, considering // the right addTorrent function, considering
// the parameter type. // the parameter type.
void GUI::processParams(const QStringList& params) { void GUI::processParams(const QStringList& params) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool(); bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
foreach(QString param, params) { foreach(QString param, params) {
@ -975,13 +959,13 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
} }
} }
} }
void GUI::addTorrent(QString path) { void GUI::addTorrent(QString path) {
BTSession->addTorrent(path); BTSession->addTorrent(path);
} }
void GUI::processDownloadedFiles(QString path, QString url) { void GUI::processDownloadedFiles(QString path, QString url) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool(); bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
if(useTorrentAdditionDialog) { if(useTorrentAdditionDialog) {
@ -990,10 +974,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
}else{ }else{
BTSession->addTorrent(path, false, url); BTSession->addTorrent(path, false, url);
} }
} }
// Set BT session configuration // Set BT session configuration
void GUI::configureSession(bool deleteOptions) { void GUI::configureSession(bool deleteOptions) {
qDebug("Configuring session"); qDebug("Configuring session");
// General // General
bool new_displaySpeedInTitle = options->speedInTitleBar(); bool new_displaySpeedInTitle = options->speedInTitleBar();
@ -1261,20 +1245,20 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
options->deleteLater(); options->deleteLater();
} }
qDebug("Session configured"); qDebug("Session configured");
} }
void GUI::updateUnfinishedTorrentNumber(unsigned int nb) { void GUI::updateUnfinishedTorrentNumber(unsigned int nb) {
unsigned int paused = BTSession->getUnfinishedPausedTorrentsNb(); unsigned int paused = BTSession->getUnfinishedPausedTorrentsNb();
tabs->setTabText(0, tr("Downloads") +QString::fromUtf8(" (")+misc::toQString(nb-paused)+"/"+misc::toQString(nb)+QString::fromUtf8(")")); tabs->setTabText(0, tr("Downloads") +QString::fromUtf8(" (")+misc::toQString(nb-paused)+"/"+misc::toQString(nb)+QString::fromUtf8(")"));
} }
void GUI::updateFinishedTorrentNumber(unsigned int nb) { void GUI::updateFinishedTorrentNumber(unsigned int nb) {
unsigned int paused = BTSession->getFinishedPausedTorrentsNb(); unsigned int paused = BTSession->getFinishedPausedTorrentsNb();
tabs->setTabText(1, tr("Finished") +QString::fromUtf8(" (")+misc::toQString(nb-paused)+"/"+misc::toQString(nb)+QString::fromUtf8(")")); tabs->setTabText(1, tr("Finished") +QString::fromUtf8(" (")+misc::toQString(nb-paused)+"/"+misc::toQString(nb)+QString::fromUtf8(")"));
} }
// Allow to change action on double-click // Allow to change action on double-click
void GUI::torrentDoubleClicked(QString hash, bool finished) { void GUI::torrentDoubleClicked(QString hash, bool finished) {
int action; int action;
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);
@ -1303,10 +1287,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
break; break;
} }
} }
// Toggle paused state of selected torrent // Toggle paused state of selected torrent
void GUI::togglePausedState(QString hash) { void GUI::togglePausedState(QString hash) {
if(tabs->currentIndex() > 1) return; if(tabs->currentIndex() > 1) return;
bool inDownloadList = true; bool inDownloadList = true;
if(tabs->currentIndex() == 1) if(tabs->currentIndex() == 1)
@ -1329,10 +1313,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
updateFinishedTorrentNumber(finishedTorrentTab->getNbTorrentsInList()); updateFinishedTorrentNumber(finishedTorrentTab->getNbTorrentsInList());
} }
} }
} }
// Pause All Downloads in DL list // Pause All Downloads in DL list
void GUI::on_actionPause_All_triggered() { void GUI::on_actionPause_All_triggered() {
bool change = false; bool change = false;
std::vector<torrent_handle> torrents = BTSession->getTorrents(); std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT; std::vector<torrent_handle>::iterator torrentIT;
@ -1347,9 +1331,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
updateUnfinishedTorrentNumber(downloadingTorrentTab->getNbTorrentsInList()); updateUnfinishedTorrentNumber(downloadingTorrentTab->getNbTorrentsInList());
updateFinishedTorrentNumber(finishedTorrentTab->getNbTorrentsInList()); updateFinishedTorrentNumber(finishedTorrentTab->getNbTorrentsInList());
} }
} }
void GUI::on_actionIncreasePriority_triggered() { void GUI::on_actionIncreasePriority_triggered() {
if(tabs->currentIndex() != 0) if(tabs->currentIndex() != 0)
return; return;
QStringList hashes = downloadingTorrentTab->getSelectedTorrents(); QStringList hashes = downloadingTorrentTab->getSelectedTorrents();
@ -1357,19 +1341,19 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
BTSession->increaseDlTorrentPriority(hash); BTSession->increaseDlTorrentPriority(hash);
} }
updateLists(); updateLists();
} }
void GUI::on_actionDecreasePriority_triggered() { void GUI::on_actionDecreasePriority_triggered() {
Q_ASSERT(tabs->currentIndex() == 0); Q_ASSERT(tabs->currentIndex() == 0);
QStringList hashes = downloadingTorrentTab->getSelectedTorrents(); QStringList hashes = downloadingTorrentTab->getSelectedTorrents();
foreach(const QString &hash, hashes) { foreach(const QString &hash, hashes) {
BTSession->decreaseDlTorrentPriority(hash); BTSession->decreaseDlTorrentPriority(hash);
} }
updateLists(); updateLists();
} }
// pause selected items in the list // pause selected items in the list
void GUI::on_actionPause_triggered() { void GUI::on_actionPause_triggered() {
bool inDownloadList = true; bool inDownloadList = true;
if(tabs->currentIndex() > 1) return; if(tabs->currentIndex() > 1) return;
if(tabs->currentIndex() == 1) if(tabs->currentIndex() == 1)
@ -1393,10 +1377,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
} }
} }
} }
// Resume All Downloads in DL list // Resume All Downloads in DL list
void GUI::on_actionStart_All_triggered() { void GUI::on_actionStart_All_triggered() {
bool change = false; bool change = false;
std::vector<torrent_handle> torrents = BTSession->getTorrents(); std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT; std::vector<torrent_handle>::iterator torrentIT;
@ -1411,10 +1395,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
updateUnfinishedTorrentNumber(downloadingTorrentTab->getNbTorrentsInList()); updateUnfinishedTorrentNumber(downloadingTorrentTab->getNbTorrentsInList());
updateFinishedTorrentNumber(finishedTorrentTab->getNbTorrentsInList()); updateFinishedTorrentNumber(finishedTorrentTab->getNbTorrentsInList());
} }
} }
// start selected items in the list // start selected items in the list
void GUI::on_actionStart_triggered() { void GUI::on_actionStart_triggered() {
bool inDownloadList = true; bool inDownloadList = true;
if(tabs->currentIndex() > 1) return; if(tabs->currentIndex() > 1) return;
if(tabs->currentIndex() == 1) if(tabs->currentIndex() == 1)
@ -1437,17 +1421,17 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
} }
} }
} }
void GUI::addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker) { void GUI::addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker) {
// Trackers whose authentication was cancelled // Trackers whose authentication was cancelled
if(unauthenticated_trackers.indexOf(tracker) < 0) { if(unauthenticated_trackers.indexOf(tracker) < 0) {
unauthenticated_trackers << tracker; unauthenticated_trackers << tracker;
} }
} }
// display properties of selected items // display properties of selected items
void GUI::on_actionTorrent_Properties_triggered() { void GUI::on_actionTorrent_Properties_triggered() {
if(tabs->currentIndex() > 1) return; if(tabs->currentIndex() > 1) return;
switch(tabs->currentIndex()){ switch(tabs->currentIndex()){
case 1: // DL List case 1: // DL List
@ -1456,9 +1440,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
default: default:
downloadingTorrentTab->propertiesSelection(); downloadingTorrentTab->propertiesSelection();
} }
} }
void GUI::updateLists(bool force) { void GUI::updateLists(bool force) {
if(isVisible() || force) { if(isVisible() || force) {
// update global informations // update global informations
dlSpeedLbl->setText(tr("DL: %1 KiB/s").arg(QString(QByteArray::number(BTSession->getPayloadDownloadRate()/1024., 'f', 1)))); dlSpeedLbl->setText(tr("DL: %1 KiB/s").arg(QString(QByteArray::number(BTSession->getPayloadDownloadRate()/1024., 'f', 1))));
@ -1490,18 +1474,18 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
QString up_rate = QByteArray::number(BTSession->getSessionStatus().payload_upload_rate/1024, 'f', 1); QString up_rate = QByteArray::number(BTSession->getSessionStatus().payload_upload_rate/1024, 'f', 1);
setWindowTitle(tr("qBittorrent %1 (DL: %2KiB/s, UP: %3KiB/s)", "%1 is qBittorrent version").arg(QString::fromUtf8(VERSION)).arg(dl_rate).arg(up_rate)); setWindowTitle(tr("qBittorrent %1 (DL: %2KiB/s, UP: %3KiB/s)", "%1 is qBittorrent version").arg(QString::fromUtf8(VERSION)).arg(dl_rate).arg(up_rate));
} }
} }
// Called when a tracker requires authentication // Called when a tracker requires authentication
void GUI::trackerAuthenticationRequired(QTorrentHandle& h) { void GUI::trackerAuthenticationRequired(QTorrentHandle& h) {
if(unauthenticated_trackers.indexOf(QPair<QTorrentHandle,QString>(h, h.current_tracker())) < 0) { if(unauthenticated_trackers.indexOf(QPair<QTorrentHandle,QString>(h, h.current_tracker())) < 0) {
// Tracker login // Tracker login
new trackerLogin(this, h); new trackerLogin(this, h);
} }
} }
// Check connection status and display right icon // Check connection status and display right icon
void GUI::checkConnectionStatus() { void GUI::checkConnectionStatus() {
// qDebug("Checking connection status"); // qDebug("Checking connection status");
// Update Ratio // Update Ratio
updateRatio(); updateRatio();
@ -1534,15 +1518,15 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png"))); connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png")));
connecStatusLblIcon->setToolTip(QString::fromUtf8("<b>")+tr("Connection status:")+QString::fromUtf8("</b><br>")+QString::fromUtf8("<i>")+tr("No direct connections. This may indicate network configuration problems.")+QString::fromUtf8("</i>")); connecStatusLblIcon->setToolTip(QString::fromUtf8("<b>")+tr("Connection status:")+QString::fromUtf8("</b><br>")+QString::fromUtf8("<i>")+tr("No direct connections. This may indicate network configuration problems.")+QString::fromUtf8("</i>"));
} }
} }
/***************************************************** /*****************************************************
* * * *
* Utils * * Utils *
* * * *
*****************************************************/ *****************************************************/
void GUI::downloadFromURLList(const QStringList& url_list) { void GUI::downloadFromURLList(const QStringList& url_list) {
foreach(const QString url, url_list) { foreach(const QString url, url_list) {
if(url.startsWith("magnet:", Qt::CaseInsensitive)) { if(url.startsWith("magnet:", Qt::CaseInsensitive)) {
BTSession->addMagnetUri(url); BTSession->addMagnetUri(url);
@ -1550,15 +1534,15 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
BTSession->downloadFromUrl(url); BTSession->downloadFromUrl(url);
} }
} }
} }
/***************************************************** /*****************************************************
* * * *
* Options * * Options *
* * * *
*****************************************************/ *****************************************************/
void GUI::createSystrayDelayed() { void GUI::createSystrayDelayed() {
static int timeout = 10; static int timeout = 10;
if(QSystemTrayIcon::isSystemTrayAvailable()) { if(QSystemTrayIcon::isSystemTrayAvailable()) {
// Ok, systray integration is now supported // Ok, systray integration is now supported
@ -1577,9 +1561,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
delete systrayCreator; delete systrayCreator;
} }
} }
} }
void GUI::createTrayIcon() { void GUI::createTrayIcon() {
// Tray icon // Tray icon
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
myTrayIcon = new QSystemTrayIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent16.png")), this); myTrayIcon = new QSystemTrayIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent16.png")), this);
@ -1604,17 +1588,17 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// End of Icon Menu // End of Icon Menu
connect(myTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleVisibility(QSystemTrayIcon::ActivationReason))); connect(myTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleVisibility(QSystemTrayIcon::ActivationReason)));
myTrayIcon->show(); myTrayIcon->show();
} }
// Display Program Options // Display Program Options
void GUI::on_actionOptions_triggered() { void GUI::on_actionOptions_triggered() {
options = new options_imp(this); options = new options_imp(this);
connect(options, SIGNAL(status_changed(bool)), this, SLOT(OptionsSaved(bool))); connect(options, SIGNAL(status_changed(bool)), this, SLOT(OptionsSaved(bool)));
options->show(); options->show();
} }
// Is executed each time options are saved // Is executed each time options are saved
void GUI::OptionsSaved(bool deleteOptions) { void GUI::OptionsSaved(bool deleteOptions) {
BTSession->addConsoleMessage(tr("Options were saved successfully.")); BTSession->addConsoleMessage(tr("Options were saved successfully."));
bool newSystrayIntegration = options->systrayIntegration(); bool newSystrayIntegration = options->systrayIntegration();
if(newSystrayIntegration != systrayIntegration) { if(newSystrayIntegration != systrayIntegration) {
@ -1639,9 +1623,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
} }
// Update session // Update session
configureSession(deleteOptions); configureSession(deleteOptions);
} }
bool GUI::initWebUi(QString username, QString password, int port) { bool GUI::initWebUi(QString username, QString password, int port) {
if(httpServer) if(httpServer)
httpServer->close(); httpServer->close();
else else
@ -1653,18 +1637,18 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
else else
QMessageBox::critical(this, "Web User Interface Error", "Unable to initialize HTTP Server on port " + misc::toQString(port)); QMessageBox::critical(this, "Web User Interface Error", "Unable to initialize HTTP Server on port " + misc::toQString(port));
return success; return success;
} }
/***************************************************** /*****************************************************
* * * *
* HTTP Downloader * * HTTP Downloader *
* * * *
*****************************************************/ *****************************************************/
// Display an input dialog to prompt user for // Display an input dialog to prompt user for
// an url // an url
void GUI::on_actionDownload_from_URL_triggered() { void GUI::on_actionDownload_from_URL_triggered() {
downloadFromURL *downloadFromURLDialog = new downloadFromURL(this); downloadFromURL *downloadFromURLDialog = new downloadFromURL(this);
connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&))); connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&)));
} }

View file

@ -44,13 +44,8 @@ class DownloadingTorrents;
class FinishedTorrents; class FinishedTorrents;
class downloadFromURL; class downloadFromURL;
class SearchEngine; class SearchEngine;
#ifdef QT_4_4 class QLocalServer;
class QLocalServer; class QLocalSocket;
class QLocalSocket;
#else
class QTcpServer;
class QTcpSocket;
#endif
class QCloseEvent; class QCloseEvent;
class RSSImp; class RSSImp;
class QShortcut; class QShortcut;
@ -109,13 +104,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{
// Web UI // Web UI
QPointer<HttpServer> httpServer; QPointer<HttpServer> httpServer;
// Misc // Misc
#ifdef QT_4_4
QLocalServer *localServer; QLocalServer *localServer;
QLocalSocket *clientConnection; QLocalSocket *clientConnection;
#else
QTcpServer *localServer;
QTcpSocket *clientConnection;
#endif
protected slots: protected slots:
// GUI related slots // GUI related slots

View file

@ -52,10 +52,10 @@ class about : public QDialog, private Ui::AboutDlg{
lb_name->setText(QString::fromUtf8("<b><h1>")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>")); lb_name->setText(QString::fromUtf8("<b><h1>")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>"));
// Thanks // Thanks
te_thanks->append(QString::fromUtf8("<a name='top'></a>")); te_thanks->append(QString::fromUtf8("<a name='top'></a>"));
te_thanks->append(QString::fromUtf8("<ul><li>I would like to thank sourceforge.net for hosting qBittorrent project.</li>")); te_thanks->append(QString::fromUtf8("<ul><li>I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.</li>"));
te_thanks->append(QString::fromUtf8("<li>I am happy that Ishan Arora and Arnaud Demaizière are contributing to the project as developers. Their help is greatly appreciated</li>")); te_thanks->append(QString::fromUtf8("<li>I am pleased that people from all over the world are contributing to qBittorrent: Ishan Arora (India), Arnaud Demaizière (France) and Stephanos Antaris (Greece). Their help is greatly appreciated</li>"));
te_thanks->append(QString::fromUtf8("<li>I also want to thank Jeffery Fernandez (jeffery@qbittorrent.org), project consultant, RPM packager, for his help and support.</li>")); te_thanks->append(QString::fromUtf8("<li>I also want to thank Jeffery Fernandez (jeffery@qbittorrent.org), project consultant, for his help and support since the beginning of this project.</li>"));
te_thanks->append(QString::fromUtf8("<li>I am grateful to Peter Koeleman (peter@qbittorrent.org) who is helping port qBittorrent to Windows.</li>")); te_thanks->append(QString::fromUtf8("<li>I am grateful to Peter Koeleman (peter@qbittorrent.org) for working on qBittorrent port to Windows.</li>"));
te_thanks->append(QString::fromUtf8("<li>Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.</li></ul><br><br>")); te_thanks->append(QString::fromUtf8("<li>Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.</li></ul><br><br>"));
te_thanks->scrollToAnchor(QString::fromUtf8("top")); te_thanks->scrollToAnchor(QString::fromUtf8("top"));
// Translation // Translation

View file

@ -207,6 +207,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="addInSeed">
<property name="text">
<string>Skip file checking and start seeding immediately</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="addInPause"> <widget class="QCheckBox" name="addInPause">
<property name="text"> <property name="text">

View file

@ -64,8 +64,8 @@ bittorrent::bittorrent() : DHTEnabled(false), preAllocateAll(false), addInPause(
// Check if we should spoof utorrent // Check if we should spoof utorrent
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
if(settings.value(QString::fromUtf8("Preferences/Bittorrent/AzureusSpoof"), false).toBool()) { if(settings.value(QString::fromUtf8("Preferences/Bittorrent/AzureusSpoof"), false).toBool()) {
s = new session(fingerprint("UT", 1, 8, 4, 0), 0); s = new session(fingerprint("UT", 1, 8, 5, 0), 0);
qDebug("Peer ID: %s", fingerprint("UT", 1, 8, 4, 0).to_string().c_str()); qDebug("Peer ID: %s", fingerprint("UT", 1, 8, 5, 0).to_string().c_str());
} else { } else {
s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0), 0); s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0), 0);
qDebug("Peer ID: %s", fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0).to_string().c_str()); qDebug("Peer ID: %s", fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0).to_string().c_str());
@ -581,6 +581,14 @@ QTorrentHandle bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
} else { } else {
p.save_path = defaultTempPath.toLocal8Bit().data(); p.save_path = defaultTempPath.toLocal8Bit().data();
} }
// Skip checking and directly start seeding (new in libtorrent v0.15)
if(TorrentTempData::isSeedingMode(hash)){
p.seed_mode=true;
} else {
p.seed_mode=false;
}
// TODO: Remove in v1.6.0: For backward compatibility only // TODO: Remove in v1.6.0: For backward compatibility only
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished")) { if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished")) {
p.save_path = savePath.toLocal8Bit().data(); p.save_path = savePath.toLocal8Bit().data();
@ -858,6 +866,7 @@ void bittorrent::loadFilesPriorities(QTorrentHandle &h) {
qDebug("Setting file piority to %d", priority); qDebug("Setting file piority to %d", priority);
v.push_back(priority); v.push_back(priority);
} }
if(v.size() == (unsigned int)h.num_files())
h.prioritize_files(v); h.prioritize_files(v);
} }
@ -983,6 +992,12 @@ void bittorrent::scanDirectory(QString scan_dir) {
FSMutex->lock(); FSMutex->lock();
qDebug("Scanning directory: %s", scan_dir.toLocal8Bit().data()); qDebug("Scanning directory: %s", scan_dir.toLocal8Bit().data());
QDir dir(scan_dir); QDir dir(scan_dir);
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
// Check that scan dir is not BT_backup (silly but who knows...)
if(dir == torrentBackup) {
std::cerr << "Scan directory cannot be qBittorrent backup folder!" << std::endl;
return;
}
QStringList filters; QStringList filters;
filters << "*.torrent"; filters << "*.torrent";
QStringList files = dir.entryList(filters, QDir::Files, QDir::Unsorted); QStringList files = dir.entryList(filters, QDir::Files, QDir::Unsorted);
@ -1522,14 +1537,31 @@ void bittorrent::applyEncryptionSettings(pe_settings se) {
// backup directory // backup directory
void bittorrent::startUpTorrents() { void bittorrent::startUpTorrents() {
qDebug("Resuming unfinished torrents"); qDebug("Resuming unfinished torrents");
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup"); QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
QStringList fileNames; QStringList fileNames;
QStringList known_torrents = TorrentPersistentData::knownTorrents(); QStringList known_torrents = TorrentPersistentData::knownTorrents();
if(known_torrents.empty()) {
if(known_torrents.empty() && !settings.value("v1_4_x_torrent_imported", false).toBool()) {
qDebug("No known torrent, importing old torrents"); qDebug("No known torrent, importing old torrents");
importOldTorrents(); importOldTorrents();
return; return;
} }
// Safety measure because some people reported torrent loss since
// we switch the v1.5 way of resuming torrents on startup
QStringList filters;
filters << "*.torrent";
QStringList torrents_on_hd = torrentBackup.entryList(filters, QDir::Files, QDir::Unsorted);
foreach(QString hash, torrents_on_hd) {
hash.chop(8); // remove trailing .torrent
if(!known_torrents.contains(hash)) {
std::cerr << "ERROR Detected!!! Adding back torrent " << hash.toLocal8Bit().data() << " which got lost for some reason." << std::endl;
addTorrent(torrentBackup.path()+QDir::separator()+hash+".torrent", false, QString(), true);
}
}
// End of safety measure
qDebug("Starting up torrents"); qDebug("Starting up torrents");
if(isQueueingEnabled()) { if(isQueueingEnabled()) {
QList<QPair<int, QString> > hashes; QList<QPair<int, QString> > hashes;
@ -1690,7 +1722,7 @@ void bittorrent::applyFormerAttributeFiles(QTorrentHandle h) {
// TODO: Remove in qBittorrent v1.6.0 // TODO: Remove in qBittorrent v1.6.0
void bittorrent::importOldTorrents() { void bittorrent::importOldTorrents() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
if(!settings.value("v1_4_x_torrent_imported", false).toBool()) { Q_ASSERT(!settings.value("v1_4_x_torrent_imported", false).toBool());
// Import old torrent // Import old torrent
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup"); QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
QStringList fileNames; QStringList fileNames;
@ -1764,5 +1796,4 @@ void bittorrent::importOldTorrents() {
} }
settings.setValue("v1_4_x_torrent_imported", true); settings.setValue("v1_4_x_torrent_imported", true);
std::cout << "Successfully imported torrents from v1.4.x (or previous) instance" << std::endl; std::cout << "Successfully imported torrents from v1.4.x (or previous) instance" << std::endl;
}
} }

View file

@ -29,215 +29,140 @@
*/ */
#include "downloadThread.h" #include "downloadThread.h"
#include <iostream> #include <QTemporaryFile>
#include <QSettings> #include <QSettings>
#include <stdio.h> #include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkProxy>
#define MAX_THREADS 3 /** Download Thread **/
// http://curl.rtin.bz/libcurl/c/libcurl-errors.html downloadThread::downloadThread(QObject* parent) : QObject(parent) {
QString subDownloadThread::errorCodeToString(CURLcode status) { networkManager = new QNetworkAccessManager(this);
switch(status){ connect(networkManager, SIGNAL(finished (QNetworkReply*)), this, SLOT(processDlFinished(QNetworkReply*)));
case CURLE_FTP_CANT_GET_HOST:
case CURLE_COULDNT_RESOLVE_HOST:
return tr("Host is unreachable");
case CURLE_READ_ERROR:
case CURLE_FILE_COULDNT_READ_FILE:
return tr("File was not found (404)");
case CURLE_FTP_ACCESS_DENIED:
case CURLE_LOGIN_DENIED:
case CURLE_FTP_USER_PASSWORD_INCORRECT:
return tr("Connection was denied");
case CURLE_URL_MALFORMAT:
return tr("Url is invalid");
case CURLE_COULDNT_RESOLVE_PROXY:
return tr("Could not resolve proxy");
//case 5:
// return tr("Connection forbidden (403)");
//case 6:
// return tr("Connection was not authorized (401)");
//case 7:
// return tr("Content has moved (301)");
case CURLE_COULDNT_CONNECT:
return tr("Connection failure");
case CURLE_OPERATION_TIMEOUTED:
return tr("Connection was timed out");
case CURLE_INTERFACE_FAILED:
return tr("Incorrect network interface");
default:
return tr("Unknown error");
}
} }
subDownloadThread::subDownloadThread(QObject *parent, QString url) : QThread(parent), url(url), abort(false){} downloadThread::~downloadThread(){
delete networkManager;
subDownloadThread::~subDownloadThread(){
abort = true;
wait();
} }
void subDownloadThread::run(){ void downloadThread::processDlFinished(QNetworkReply* reply) {
// Get a unique filename QString url = reply->url().toString();
if(reply->error() != QNetworkReply::NoError) {
// Failure
emit downloadFailure(url, errorCodeToString(reply->error()));
} else {
// Success
QString filePath; QString filePath;
QTemporaryFile tmpfile; QTemporaryFile tmpfile;
tmpfile.setAutoRemove(false); tmpfile.setAutoRemove(false);
if (tmpfile.open()) { if (tmpfile.open()) {
filePath = tmpfile.fileName(); filePath = tmpfile.fileName();
qDebug("Temporary filename is: %s", filePath.toLocal8Bit().data()); qDebug("Temporary filename is: %s", filePath.toLocal8Bit().data());
} else { if(reply->open(QIODevice::ReadOnly)) {
emit downloadFailureST(this, url, tr("I/O Error")); tmpfile.write(reply->readAll());
return; reply->close();
}
tmpfile.close(); tmpfile.close();
// Now temporary file is created but closed so that // Send finished signal
// curl can use it emit downloadFinished(url, filePath);
FILE *f = fopen(filePath.toLocal8Bit().data(), "wb"); } else {
if(!f) { // Error when reading the request
std::cerr << "couldn't open destination file" << "\n"; tmpfile.close();
return; emit downloadFailure(url, tr("I/O Error"));
} }
CURL *curl; } else {
CURLcode res = (CURLcode)-1; emit downloadFailure(url, tr("I/O Error"));
curl = curl_easy_init(); }
if(curl) { }
std::string c_url = url.toLocal8Bit().data(); // Clean up
curl_easy_setopt(curl, CURLOPT_URL, c_url.c_str()); reply->deleteLater();
// SSL support }
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); void downloadThread::downloadUrl(QString url){
// PROXY SUPPORT // Update proxy settings
applyProxySettings();
// Process download request
networkManager->get(QNetworkRequest(QUrl(url)));
}
void downloadThread::applyProxySettings() {
QNetworkProxy proxy;
QSettings settings("qBittorrent", "qBittorrent"); QSettings settings("qBittorrent", "qBittorrent");
int intValue = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxyType"), 0).toInt(); int intValue = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxyType"), 0).toInt();
if(intValue > 0) { if(intValue > 0) {
// Proxy enabled // Proxy enabled
QString IP = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/IP"), "0.0.0.0").toString(); QString IP = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/IP"), "0.0.0.0").toString();
proxy.setHostName(IP);
QString port = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Port"), 8080).toString(); QString port = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Port"), 8080).toString();
qDebug("Using proxy: %s", (IP+QString(":")+port).toLocal8Bit().data()); qDebug("Using proxy: %s", (IP+QString(":")+port).toLocal8Bit().data());
curl_easy_setopt(curl, CURLOPT_PROXYPORT, (IP+QString(":")+port).toLocal8Bit().data()); proxy.setPort(port.toUShort());
// Default proxy type is HTTP, we must change if it is SOCKS5 // Default proxy type is HTTP, we must change if it is SOCKS5
if(intValue%2==0) { if(intValue%2==0) {
qDebug("Proxy is SOCKS5, not HTTP"); qDebug("Proxy is SOCKS5, not HTTP");
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); proxy.setType(QNetworkProxy::Socks5Proxy);
} else {
proxy.setType(QNetworkProxy::HttpProxy);
} }
// Authentication? // Authentication?
if(intValue > 2) { if(intValue > 2) {
qDebug("Proxy requires authentication, authenticating"); qDebug("Proxy requires authentication, authenticating");
QString username = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Username"), QString()).toString(); QString username = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Username"), QString()).toString();
proxy.setUser(username);
QString password = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Password"), QString()).toString(); QString password = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Password"), QString()).toString();
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, (username+QString(":")+password).toLocal8Bit().data()); proxy.setPassword(password);
} }
}
// We have to define CURLOPT_WRITEFUNCTION or it will crash on windows
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, f);
// Verbose
//curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
// No progress info (we don't use it)
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
// Redirections
curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, -1);
qDebug("Downloading %s", url.toLocal8Bit().data());
if(!abort)
res = curl_easy_perform(curl);
qDebug("done downloading %s", url.toLocal8Bit().data());
/* always cleanup */
curl_easy_cleanup(curl);
fclose(f);
if(abort)
return;
if(res) {
emit downloadFailureST(this, url, errorCodeToString(res));
} else { } else {
emit downloadFinishedST(this, url, filePath); proxy.setType(QNetworkProxy::NoProxy);
}
qDebug("%s Raised the signal", url.toLocal8Bit().data());
} else {
std::cerr << "Could not initialize CURL" << "\n";
} }
networkManager->setProxy(proxy);
} }
/** Download Thread **/ QString downloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
switch(status){
downloadThread::downloadThread(QObject* parent) : QThread(parent), abort(false){} case QNetworkReply::HostNotFoundError:
return tr("The remote host name was not found (invalid hostname)");
downloadThread::~downloadThread(){ case QNetworkReply::OperationCanceledError:
mutex.lock(); return tr("The operation was canceled");
abort = true; case QNetworkReply::RemoteHostClosedError:
condition.wakeOne(); return tr("The remote server closed the connection prematurely, before the entire reply was received and processed");
mutex.unlock(); case QNetworkReply::TimeoutError:
//qDebug("downloadThread deleting subthreads..."); return tr("The connection to the remote server timed out");
qDeleteAll(subThreads); case QNetworkReply::SslHandshakeFailedError:
//qDebug("downloadThread deleted subthreads"); return tr("SSL/TLS handshake failed");
wait(); case QNetworkReply::ConnectionRefusedError:
} return tr("The remote server refused the connection");
case QNetworkReply::ProxyConnectionRefusedError:
void downloadThread::downloadUrl(QString url){ return tr("The connection to the proxy server was refused");
QMutexLocker locker(&mutex); case QNetworkReply::ProxyConnectionClosedError:
urls_queue.enqueue(url); return tr("The proxy server closed the connection prematurely");
if(!isRunning()){ case QNetworkReply::ProxyNotFoundError:
start(); return tr("The proxy host name was not found");
}else{ case QNetworkReply::ProxyTimeoutError:
condition.wakeOne(); return tr("The connection to the proxy timed out or the proxy did not reply in time to the request sent");
case QNetworkReply::ProxyAuthenticationRequiredError:
return tr("The proxy requires authentication in order to honour the request but did not accept any credentials offered");
case QNetworkReply::ContentAccessDenied:
return tr("The access to the remote content was denied (401)");
case QNetworkReply::ContentOperationNotPermittedError:
return tr("The operation requested on the remote content is not permitted");
case QNetworkReply::ContentNotFoundError:
return tr("The remote content was not found at the server (404)");
case QNetworkReply::AuthenticationRequiredError:
return tr("The remote server requires authentication to serve the content but the credentials provided were not accepted");
case QNetworkReply::ProtocolUnknownError:
return tr("The Network Access API cannot honor the request because the protocol is not known");
case QNetworkReply::ProtocolInvalidOperationError:
return tr("The requested operation is invalid for this protocol");
case QNetworkReply::UnknownNetworkError:
return tr("An unknown network-related error was detected");
case QNetworkReply::UnknownProxyError:
return tr("An unknown proxy-related error was detected");
case QNetworkReply::UnknownContentError:
return tr("An unknown error related to the remote content was detected");
case QNetworkReply::ProtocolFailure:
return tr("A breakdown in protocol was detected");
default:
return tr("Unknown error");
} }
} }
void downloadThread::run(){
forever{
if(abort) {
qDebug("DownloadThread aborting...");
return;
}
mutex.lock();
if(!urls_queue.empty() && subThreads.size() < MAX_THREADS){
QString url = urls_queue.dequeue();
mutex.unlock();
//qDebug("DownloadThread downloading %s...", url.toLocal8Bit().data());
subDownloadThread *st = new subDownloadThread(0, url);
subThreads << st;
connect(st, SIGNAL(downloadFinishedST(subDownloadThread*, QString, QString)), this, SLOT(propagateDownloadedFile(subDownloadThread*, QString, QString)));
connect(st, SIGNAL(downloadFailureST(subDownloadThread*, QString, QString)), this, SLOT(propagateDownloadFailure(subDownloadThread*, QString, QString)));
st->start();
}else{
//qDebug("DownloadThread sleeping...");
condition.wait(&mutex);
//qDebug("DownloadThread woke up");
mutex.unlock();
}
}
}
void downloadThread::propagateDownloadedFile(subDownloadThread* st, QString url, QString path){
qDebug("Downloading %s was successful", url.toLocal8Bit().data());
mutex.lock();
int index = subThreads.indexOf(st);
Q_ASSERT(index != -1);
subThreads.removeAt(index);
mutex.unlock();
qDebug("Deleting subthread");
delete st;
emit downloadFinished(url, path);
mutex.lock();
if(!urls_queue.empty()) {
condition.wakeOne();
}
mutex.unlock();
qDebug("Out of propagateDownloadedFile");
}
void downloadThread::propagateDownloadFailure(subDownloadThread* st, QString url, QString reason){
qDebug("Downloading %s failed", url.toLocal8Bit().data());
mutex.lock();
int index = subThreads.indexOf(st);
Q_ASSERT(index != -1);
subThreads.removeAt(index);
mutex.unlock();
delete st;
emit downloadFailure(url, reason);
mutex.lock();
if(!urls_queue.empty()) {
condition.wakeOne();
}
mutex.unlock();
}

View file

@ -31,64 +31,34 @@
#ifndef DOWNLOADTHREAD_H #ifndef DOWNLOADTHREAD_H
#define DOWNLOADTHREAD_H #define DOWNLOADTHREAD_H
#include <QThread> #include <QNetworkReply>
#include <QFile> #include <QObject>
#include <QTemporaryFile>
#include <QMutex>
#include <QMutexLocker>
#include <QWaitCondition>
#include <QStringList>
#include <curl/curl.h>
#include <QQueue>
class subDownloadThread : public QThread { class QNetworkAccessManager;
Q_OBJECT
private:
QString url;
bool abort;
public: class downloadThread : public QObject {
subDownloadThread(QObject *parent, QString url);
~subDownloadThread();
QString errorCodeToString(CURLcode status);
signals:
// For subthreads
void downloadFinishedST(subDownloadThread* st, QString url, QString file_path);
void downloadFailureST(subDownloadThread* st, QString url, QString reason);
protected:
void run();
};
class downloadThread : public QThread {
Q_OBJECT Q_OBJECT
private: private:
QQueue<QString> urls_queue; QNetworkAccessManager *networkManager;
QMutex mutex;
QWaitCondition condition;
bool abort;
QList<subDownloadThread*> subThreads;
signals: signals:
void downloadFinished(QString url, QString file_path); void downloadFinished(QString url, QString file_path);
void downloadFailure(QString url, QString reason); void downloadFailure(QString url, QString reason);
public: public:
downloadThread(QObject* parent); downloadThread(QObject* parent);
~downloadThread(); ~downloadThread();
void downloadUrl(QString url); void downloadUrl(QString url);
void setProxy(QString IP, int port, QString username, QString password); //void setProxy(QString IP, int port, QString username, QString password);
protected: protected:
void run(); QString errorCodeToString(QNetworkReply::NetworkError status);
void applyProxySettings();
protected slots:
void processDlFinished(QNetworkReply* reply);
protected slots:
void propagateDownloadedFile(subDownloadThread* st, QString url, QString path);
void propagateDownloadFailure(subDownloadThread* st, QString url, QString reason);
}; };
#endif #endif

View file

@ -41,6 +41,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QDropEvent> #include <QDropEvent>
#include <QInputDialog> #include <QInputDialog>
#include <QTemporaryFile>
#ifdef HAVE_ZZIP #ifdef HAVE_ZZIP
#include <zzip/zzip.h> #include <zzip/zzip.h>

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -3191,6 +3191,10 @@ Changelog:
<source>Expand all</source> <source>Expand all</source>
<translation>Alles uitklappen</translation> <translation>Alles uitklappen</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3603,6 +3607,101 @@ Changelog:
<translation>Typ op zijn minst één URL.</translation> <translation>Typ op zijn minst één URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">I/O Fout</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Onbekende fout</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4703,23 +4802,23 @@ selecteer alstublieft een er van:</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Host is onbereikbaar</translation> <translation type="obsolete">Host is onbereikbaar</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Bestand niet gevonden (404)</translation> <translation type="obsolete">Bestand niet gevonden (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Verbinding niet toegestaan</translation> <translation type="obsolete">Verbinding niet toegestaan</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Url is ongeldig</translation> <translation type="obsolete">Url is ongeldig</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>I/O Fout</translation> <translation type="obsolete">I/O Fout</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4735,23 +4834,23 @@ selecteer alstublieft een er van:</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Verbindingsfout</translation> <translation type="obsolete">Verbindingsfout</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Verbinding verlopen</translation> <translation type="obsolete">Verbinding verlopen</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Verkeerde netwerkinterface</translation> <translation type="obsolete">Verkeerde netwerkinterface</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Onbekende fout</translation> <translation type="obsolete">Onbekende fout</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Kon proxy niet herleiden</translation> <translation type="obsolete">Kon proxy niet herleiden</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3286,6 +3286,10 @@ Zmiany:
<source>Expand all</source> <source>Expand all</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3710,6 +3714,101 @@ Zmiany:
<translation>Proszę podać przynajmniej jeden adres URL.</translation> <translation>Proszę podać przynajmniej jeden adres URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">Błąd We/Wy</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Nieznany błąd</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4816,23 +4915,23 @@ Jednak tamte wtyczki były wyłączone.</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Host jest niedostępny</translation> <translation type="obsolete">Host jest niedostępny</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Nie znaleziono pliku (404)</translation> <translation type="obsolete">Nie znaleziono pliku (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Połączenie odrzucone</translation> <translation type="obsolete">Połączenie odrzucone</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Błędny URL</translation> <translation type="obsolete">Błędny URL</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation type="unfinished">Błąd We/Wy</translation> <translation type="obsolete">Błąd We/Wy</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4848,23 +4947,23 @@ Jednak tamte wtyczki były wyłączone.</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Brak połączenia</translation> <translation type="obsolete">Brak połączenia</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Upłynął czas połączenia</translation> <translation type="obsolete">Upłynął czas połączenia</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Niepoprawny interfejs sieci</translation> <translation type="obsolete">Niepoprawny interfejs sieci</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Nieznany błąd</translation> <translation type="obsolete">Nieznany błąd</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Nie można określić proxy</translation> <translation type="obsolete">Nie można określić proxy</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3198,6 +3198,10 @@ Log de mudanças:</translation>
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Baixar em ordem de sequência (mais lento porém melhor para visualizar)</translation> <translation>Baixar em ordem de sequência (mais lento porém melhor para visualizar)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3622,6 +3626,101 @@ Log de mudanças:</translation>
<translation>Por favor digite uma URL.</translation> <translation>Por favor digite uma URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Erro desconhecido</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4683,19 +4782,19 @@ Portanto os plugins foram desabilitados.</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>O host é inalcançável</translation> <translation type="obsolete">O host é inalcançável</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Arquivo não encontrado (404)</translation> <translation type="obsolete">Arquivo não encontrado (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Conexão foi negada</translation> <translation type="obsolete">Conexão foi negada</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Url é inválida</translation> <translation type="obsolete">Url é inválida</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4711,27 +4810,27 @@ Portanto os plugins foram desabilitados.</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Conexão falhou</translation> <translation type="obsolete">Conexão falhou</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Conexão esgotou o tempo</translation> <translation type="obsolete">Conexão esgotou o tempo</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Relação da rede incorreta</translation> <translation type="obsolete">Relação da rede incorreta</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Erro desconhecido</translation> <translation type="obsolete">Erro desconhecido</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Não pude resolver proxy</translation> <translation type="obsolete">Não pude resolver proxy</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>Erro de entrada e saída</translation> <translation type="obsolete">Erro de entrada e saída</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3198,6 +3198,10 @@ Log de mudanças:</translation>
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Baixar em ordem de sequência (mais lento porém melhor para visualizar)</translation> <translation>Baixar em ordem de sequência (mais lento porém melhor para visualizar)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3622,6 +3626,101 @@ Log de mudanças:</translation>
<translation>Por favor digite uma URL.</translation> <translation>Por favor digite uma URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Erro desconhecido</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4683,19 +4782,19 @@ Portanto os plugins foram desabilitados.</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>O host é inalcançável</translation> <translation type="obsolete">O host é inalcançável</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Arquivo não encontrado (404)</translation> <translation type="obsolete">Arquivo não encontrado (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Conexão foi negada</translation> <translation type="obsolete">Conexão foi negada</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Url é inválida</translation> <translation type="obsolete">Url é inválida</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4711,27 +4810,27 @@ Portanto os plugins foram desabilitados.</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Conexão falhou</translation> <translation type="obsolete">Conexão falhou</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Conexão esgotou o tempo</translation> <translation type="obsolete">Conexão esgotou o tempo</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Relação da rede incorreta</translation> <translation type="obsolete">Relação da rede incorreta</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Erro desconhecido</translation> <translation type="obsolete">Erro desconhecido</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Não pude resolver proxy</translation> <translation type="obsolete">Não pude resolver proxy</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>Erro de entrada e saída</translation> <translation type="obsolete">Erro de entrada e saída</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3027,6 +3027,10 @@ Changelog:
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Descarcă în ordine secvențială (încet dar bine pentru preview)</translation> <translation>Descarcă în ordine secvențială (încet dar bine pentru preview)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3451,6 +3455,101 @@ Changelog:
<translation> rugăm introduceţi cel puţin un URL.</translation> <translation> rugăm introduceţi cel puţin un URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">Eroare de intrare/eşire</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Eroare necunoscută</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4520,19 +4619,19 @@ Numai acele adăugate de dvs. pot fi dezinstalate.
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Calculatorul nu poate fi accesat</translation> <translation type="obsolete">Calculatorul nu poate fi accesat</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Fişierul nu a fost găsit(404)</translation> <translation type="obsolete">Fişierul nu a fost găsit(404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Conectarea a fost interzisă</translation> <translation type="obsolete">Conectarea a fost interzisă</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Adresa URL nu este validă</translation> <translation type="obsolete">Adresa URL nu este validă</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4548,27 +4647,27 @@ Numai acele adăugate de dvs. pot fi dezinstalate.
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Conectarea eşuată</translation> <translation type="obsolete">Conectarea eşuată</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Timpul de conectare expirat</translation> <translation type="obsolete">Timpul de conectare expirat</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Interfaţa de reţea incorectă</translation> <translation type="obsolete">Interfaţa de reţea incorectă</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Eroare necunoscută</translation> <translation type="obsolete">Eroare necunoscută</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Proxy nu a putut fi rezolvata</translation> <translation type="obsolete">Proxy nu a putut fi rezolvata</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>Eroare de intrare/eşire</translation> <translation type="obsolete">Eroare de intrare/eşire</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3216,6 +3216,10 @@ Changelog:
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Загружать последовательно (медленнее но удобнее для предпросмотра)</translation> <translation>Загружать последовательно (медленнее но удобнее для предпросмотра)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3632,6 +3636,101 @@ Changelog:
<translation>Пожалуста введите минимум один URL.</translation> <translation>Пожалуста введите минимум один URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">Ошибка ввода/вывода</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Неизвестная ошибка</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4730,19 +4829,19 @@ However, those plugins were disabled.</source>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Хост недоступен</translation> <translation type="obsolete">Хост недоступен</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Файл не был найден (404)</translation> <translation type="obsolete">Файл не был найден (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Подключение было отклонено</translation> <translation type="obsolete">Подключение было отклонено</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>URL некорректен</translation> <translation type="obsolete">URL некорректен</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4758,27 +4857,27 @@ However, those plugins were disabled.</source>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Соединение не установлено</translation> <translation type="obsolete">Соединение не установлено</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Тайм-аут соединения</translation> <translation type="obsolete">Тайм-аут соединения</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Неправильный интерфейс сети</translation> <translation type="obsolete">Неправильный интерфейс сети</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Неизвестная ошибка</translation> <translation type="obsolete">Неизвестная ошибка</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Не удалось соединиться с Прокси</translation> <translation type="obsolete">Не удалось соединиться с Прокси</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>Ошибка ввода/вывода</translation> <translation type="obsolete">Ошибка ввода/вывода</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3134,6 +3134,10 @@ Záznam zmien:</translation>
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Sťahovať v postupnom poradí (pomalšie, ale lepšie pre náhľady)</translation> <translation>Sťahovať v postupnom poradí (pomalšie, ale lepšie pre náhľady)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3562,6 +3566,101 @@ Záznam zmien:</translation>
<translation>Prosím, napíšte aspoň jedno URL.</translation> <translation>Prosím, napíšte aspoň jedno URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">V/V Chyba</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Neznáma chyba</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4699,19 +4798,19 @@ Tieto moduly však boli vypnuté.</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Hostiteľ je nedostupný</translation> <translation type="obsolete">Hostiteľ je nedostupný</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Súbor nebol nájdený (404)</translation> <translation type="obsolete">Súbor nebol nájdený (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Spojenie bolo odmietnuté</translation> <translation type="obsolete">Spojenie bolo odmietnuté</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>URL je neplatné</translation> <translation type="obsolete">URL je neplatné</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4727,27 +4826,27 @@ Tieto moduly však boli vypnuté.</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Chyba spojenia</translation> <translation type="obsolete">Chyba spojenia</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Časový limit spojenia vypršal</translation> <translation type="obsolete">Časový limit spojenia vypršal</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Nesprávne sieťové rozhranie</translation> <translation type="obsolete">Nesprávne sieťové rozhranie</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Neznáma chyba</translation> <translation type="obsolete">Neznáma chyba</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Nebolo možné preložiť adresu proxy</translation> <translation type="obsolete">Nebolo možné preložiť adresu proxy</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>V/V Chyba</translation> <translation type="obsolete">V/V Chyba</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -1870,6 +1870,10 @@ p, li { white-space: pre-wrap; }
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Hämta i sekventiell ordning (långsammare men bra för förhandsvisning)</translation> <translation>Hämta i sekventiell ordning (långsammare men bra för förhandsvisning)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -2210,6 +2214,101 @@ p, li { white-space: pre-wrap; }
<translation>Ange åtminstone en url.</translation> <translation>Ange åtminstone en url.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">In/Ut-fel</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Okänt fel</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -2952,43 +3051,43 @@ Dock har dessa insticksmoduler blivit inaktiverade.</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Värden är inte nåbar</translation> <translation type="obsolete">Värden är inte nåbar</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Filen kunde inte hittas (404)</translation> <translation type="obsolete">Filen kunde inte hittas (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Anslutningen nekades</translation> <translation type="obsolete">Anslutningen nekades</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Url:en är ogiltig</translation> <translation type="obsolete">Url:en är ogiltig</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Anslutningsfel</translation> <translation type="obsolete">Anslutningsfel</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Tidsgränsen för anslutningen överstegs</translation> <translation type="obsolete">Tidsgränsen för anslutningen överstegs</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Felaktigt nätverksgränssnitt</translation> <translation type="obsolete">Felaktigt nätverksgränssnitt</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Okänt fel</translation> <translation type="obsolete">Okänt fel</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Kunde inte slå upp proxy</translation> <translation type="obsolete">Kunde inte slå upp proxy</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>In/Ut-fel</translation> <translation type="obsolete">In/Ut-fel</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3197,6 +3197,10 @@ Changelog:
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>Doğru düzende indir (yavaş ama önizleme için iyi)</translation> <translation>Doğru düzende indir (yavaş ama önizleme için iyi)</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3609,6 +3613,101 @@ Changelog:
<translation>Lütfen en az bir adres girin.</translation> <translation>Lütfen en az bir adres girin.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Bilinmeyen hata</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4683,19 +4782,19 @@ Bununla birlikte, o eklentiler devre dışı.</translation>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Sunucuya erişilemiyor</translation> <translation type="obsolete">Sunucuya erişilemiyor</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Dosya bulunamadı (404)</translation> <translation type="obsolete">Dosya bulunamadı (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Bağlantı reddedildi</translation> <translation type="obsolete">Bağlantı reddedildi</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Adres geçersiz</translation> <translation type="obsolete">Adres geçersiz</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4711,27 +4810,27 @@ Bununla birlikte, o eklentiler devre dışı.</translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Bağlantı hatası</translation> <translation type="obsolete">Bağlantı hatası</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Bağlantı zaman ımına uğradı</translation> <translation type="obsolete">Bağlantı zaman ımına uğradı</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Geçersiz arayüzü</translation> <translation type="obsolete">Geçersiz arayüzü</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Bilinmeyen hata</translation> <translation type="obsolete">Bilinmeyen hata</translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation>Vekil çözümlenemedi</translation> <translation type="obsolete">Vekil çözümlenemedi</translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>Girdi/Çıktı Hatası</translation> <translation type="obsolete">Girdi/Çıktı Hatası</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3147,6 +3147,10 @@ Changelog:
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3571,6 +3575,101 @@ Changelog:
<translation>Буд-ласка, введіть хоча б один URL.</translation> <translation>Буд-ласка, введіть хоча б один URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished">Невідома помилка</translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4647,19 +4746,19 @@ However, those plugins were disabled.</source>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation>Хост недоступний</translation> <translation type="obsolete">Хост недоступний</translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>Файл не знайдено (404)</translation> <translation type="obsolete">Файл не знайдено (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation>Відмовлено у з&apos;єднанні</translation> <translation type="obsolete">Відмовлено у з&apos;єднанні</translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>Неправильний URL</translation> <translation type="obsolete">Неправильний URL</translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -4675,27 +4774,19 @@ However, those plugins were disabled.</source>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation>Відмовлено у з&apos;єднанні</translation> <translation type="obsolete">Відмовлено у з&apos;єднанні</translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation>Вичерпано час на з&apos;єднання</translation> <translation type="obsolete">Вичерпано час на з&apos;єднання</translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation>Неправильний мережевий інтерфейс</translation> <translation type="obsolete">Неправильний мережевий інтерфейс</translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation>Невідома помилка</translation> <translation type="obsolete">Невідома помилка</translation>
</message>
<message>
<source>Could not resolve proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>I/O Error</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -3379,6 +3379,10 @@ previewing)</source>
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation>()</translation> <translation>()</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -3804,6 +3808,101 @@ enabled)</source>
<translation>URL.</translation> <translation>URL.</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">/</translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -4973,19 +5072,19 @@ network.</source>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation>404</translation> <translation type="obsolete">404</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Connection forbidden (403)</source> <source>Connection forbidden (403)</source>
@ -5001,27 +5100,27 @@ network.</source>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>/</translation> <translation type="obsolete">/</translation>
</message> </message>
</context> </context>
<context> <context>

Binary file not shown.

View file

@ -1965,6 +1965,10 @@ p, li { white-space: pre-wrap; }
<source>Download in sequential order (slower but good for previewing)</source> <source>Download in sequential order (slower but good for previewing)</source>
<translation> ()</translation> <translation> ()</translation>
</message> </message>
<message>
<source>Skip file checking and start seeding immediately</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>authentication</name> <name>authentication</name>
@ -2305,6 +2309,101 @@ p, li { white-space: pre-wrap; }
<translation> URL</translation> <translation> URL</translation>
</message> </message>
</context> </context>
<context>
<name>downloadThread</name>
<message>
<source>I/O Error</source>
<translation type="unfinished">I/O </translation>
</message>
<message>
<source>The remote host name was not found (invalid hostname)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the remote server timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SSL/TLS handshake failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server refused the connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy server was refused</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy server closed the connection prematurely</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy host name was not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The access to the remote content was denied (401)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation requested on the remote content is not permitted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote content was not found at the server (404)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Network Access API cannot honor the request because the protocol is not known</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested operation is invalid for this protocol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown network-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown proxy-related error was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error related to the remote content was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A breakdown in protocol was detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>downloading</name> <name>downloading</name>
<message> <message>
@ -3067,43 +3166,43 @@ However, those plugins were disabled.</source>
<name>subDownloadThread</name> <name>subDownloadThread</name>
<message> <message>
<source>Host is unreachable</source> <source>Host is unreachable</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>File was not found (404)</source> <source>File was not found (404)</source>
<translation> (404)</translation> <translation type="obsolete"> (404)</translation>
</message> </message>
<message> <message>
<source>Connection was denied</source> <source>Connection was denied</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Url is invalid</source> <source>Url is invalid</source>
<translation>URL </translation> <translation type="obsolete">URL </translation>
</message> </message>
<message> <message>
<source>Connection failure</source> <source>Connection failure</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Connection was timed out</source> <source>Connection was timed out</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Incorrect network interface</source> <source>Incorrect network interface</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Unknown error</source> <source>Unknown error</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>Could not resolve proxy</source> <source>Could not resolve proxy</source>
<translation></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<source>I/O Error</source> <source>I/O Error</source>
<translation>I/O </translation> <translation type="obsolete">I/O </translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -34,14 +34,9 @@
#include <QFile> #include <QFile>
#include <QSplashScreen> #include <QSplashScreen>
#include <QSettings> #include <QSettings>
#ifdef QT_4_4
#include <QLocalSocket> #include <QLocalSocket>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#else
#include <QTcpSocket>
#include <QHostAddress>
#endif
#include <QPlastiqueStyle> #include <QPlastiqueStyle>
#include "qgnomelook.h" #include "qgnomelook.h"
#include <QMotifStyle> #include <QMotifStyle>
@ -143,19 +138,9 @@ int main(int argc, char *argv[]){
std::cerr << "Couldn't set environment variable...\n"; std::cerr << "Couldn't set environment variable...\n";
} }
//Check if there is another instance running //Check if there is another instance running
#ifdef QT_4_4
QLocalSocket localSocket; QLocalSocket localSocket;
QString uid = QString::number(getuid()); QString uid = QString::number(getuid());
#else
QTcpSocket localSocket;
#endif
#ifdef QT_4_4
localSocket.connectToServer("qBittorrent-"+uid, QIODevice::WriteOnly); localSocket.connectToServer("qBittorrent-"+uid, QIODevice::WriteOnly);
#else
int serverPort = settings.value(QString::fromUtf8("uniqueInstancePort"), -1).toInt();
if(serverPort != -1) {
localSocket.connectToHost(QHostAddress::LocalHost, serverPort, QIODevice::WriteOnly);
#endif
if (localSocket.waitForConnected(1000)){ if (localSocket.waitForConnected(1000)){
std::cout << "Another qBittorrent instance is already running...\n"; std::cout << "Another qBittorrent instance is already running...\n";
// Send parameters // Send parameters
@ -174,19 +159,12 @@ int main(int argc, char *argv[]){
}else{ }else{
std::cerr << "Writing to the socket timed out\n"; std::cerr << "Writing to the socket timed out\n";
} }
#ifdef QT_4_4
localSocket.disconnectFromServer(); localSocket.disconnectFromServer();
#else
localSocket.disconnectFromHost();
#endif
std::cout << "disconnected\n"; std::cout << "disconnected\n";
} }
localSocket.close(); localSocket.close();
return 0; return 0;
} }
#ifndef QT_4_4
}
#endif
app = new QApplication(argc, argv); app = new QApplication(argc, argv);
useStyle(app, settings.value("Preferences/General/Style", 0).toInt()); useStyle(app, settings.value("Preferences/General/Style", 0).toInt());
app->setStyleSheet("QStatusBar::item { border-width: 0; }"); app->setStyleSheet("QStatusBar::item { border-width: 0; }");

View file

@ -163,11 +163,6 @@ QString QTorrentHandle::save_path() const {
return misc::toQString(h.save_path().string()); return misc::toQString(h.save_path().string());
} }
fs::path QTorrentHandle::save_path_boost() const {
Q_ASSERT(h.is_valid());
return h.save_path();
}
bool QTorrentHandle::super_seeding() const { bool QTorrentHandle::super_seeding() const {
Q_ASSERT(h.is_valid()); Q_ASSERT(h.is_valid());
return h.super_seeding(); return h.super_seeding();
@ -239,9 +234,9 @@ size_type QTorrentHandle::filesize_at(unsigned int index) const {
return h.get_torrent_info().file_at(index).size; return h.get_torrent_info().file_at(index).size;
} }
std::vector<announce_entry> const& QTorrentHandle::trackers() const { std::vector<announce_entry> QTorrentHandle::trackers() const {
Q_ASSERT(h.is_valid()); Q_ASSERT(h.is_valid());
return h.get_torrent_info().trackers(); return h.trackers();
} }
torrent_status::state_t QTorrentHandle::state() const { torrent_status::state_t QTorrentHandle::state() const {

View file

@ -81,7 +81,6 @@ class QTorrentHandle {
int num_incomplete() const; int num_incomplete() const;
void scrape_tracker() const; void scrape_tracker() const;
QString save_path() const; QString save_path() const;
fs::path save_path_boost() const;
QStringList url_seeds() const; QStringList url_seeds() const;
size_type actual_size() const; size_type actual_size() const;
int download_limit() const; int download_limit() const;
@ -93,7 +92,7 @@ class QTorrentHandle {
bool is_queued() const; bool is_queued() const;
QString file_at(unsigned int index) const; QString file_at(unsigned int index) const;
size_type filesize_at(unsigned int index) const; size_type filesize_at(unsigned int index) const;
std::vector<announce_entry> const& trackers() const; std::vector<announce_entry> trackers() const;
torrent_status::state_t state() const; torrent_status::state_t state() const;
QString creator() const; QString creator() const;
QString comment() const; QString comment() const;

View file

@ -561,11 +561,15 @@ short RssStream::readDoc(const QDomDocument& doc) {
image = property.text(); image = property.text();
else if(property.tagName() == "item") { else if(property.tagName() == "item") {
RssItem * item = new RssItem(this, property); RssItem * item = new RssItem(this, property);
if(item->isValid() && !itemAlreadyExists(item->getTitle())) { if(item->isValid()) {
bool already_exists = itemAlreadyExists(item->getTitle());
if(!already_exists) {
(*this)[item->getTitle()] = item; (*this)[item->getTitle()] = item;
}
if(item->has_attachment()) { if(item->has_attachment()) {
has_attachments = true; has_attachments = true;
// Check if the item should be automatically downloaded // Check if the item should be automatically downloaded
if(!already_exists || !(*this)[item->getTitle()]->isRead()) {
FeedFilter * matching_filter = FeedFilters::getFeedFilters(url).matches(item->getTitle()); FeedFilter * matching_filter = FeedFilters::getFeedFilters(url).matches(item->getTitle());
if(matching_filter != 0) { if(matching_filter != 0) {
// Download the torrent // Download the torrent
@ -581,11 +585,13 @@ short RssStream::readDoc(const QDomDocument& doc) {
BTSession->downloadUrlAndSkipDialog(item->getTorrentUrl()); BTSession->downloadUrlAndSkipDialog(item->getTorrentUrl());
} }
// Item was downloaded, consider it as Read // Item was downloaded, consider it as Read
item->setRead(); (*this)[item->getTitle()]->setRead();
// Clean up // Clean up
delete matching_filter; delete matching_filter;
} }
} }
}
} else { } else {
delete item; delete item;
} }
@ -604,7 +610,7 @@ void RssStream::resizeList() {
unsigned int max_articles = settings.value(QString::fromUtf8("Preferences/RSS/RSSMaxArticlesPerFeed"), 100).toInt(); unsigned int max_articles = settings.value(QString::fromUtf8("Preferences/RSS/RSSMaxArticlesPerFeed"), 100).toInt();
unsigned int nb_articles = this->size(); unsigned int nb_articles = this->size();
if(nb_articles > max_articles) { if(nb_articles > max_articles) {
QList<RssItem*> listItem = sortNewsList(this->values()); QList<RssItem*> listItem = RssManager::sortNewsList(this->values());
int excess = nb_articles - max_articles; int excess = nb_articles - max_articles;
for(int i=0; i<excess; ++i){ for(int i=0; i<excess; ++i){
RssItem *lastItem = listItem.takeLast(); RssItem *lastItem = listItem.takeLast();

View file

@ -492,23 +492,25 @@ public slots:
public: public:
RssManager(bittorrent *BTSession); RssManager(bittorrent *BTSession);
~RssManager(); ~RssManager();
static void insertSortElem(QList<RssItem*> &list, RssItem *item) {
};
static void insertSortElem(QList<RssItem*> &list, RssItem *item) {
int i = 0; int i = 0;
while(i < list.size() && item->getDate() < list.at(i)->getDate()) { while(i < list.size() && item->getDate() < list.at(i)->getDate()) {
++i; ++i;
} }
list.insert(i, item); list.insert(i, item);
} }
static QList<RssItem*> sortNewsList(QList<RssItem*> news_list) { static QList<RssItem*> sortNewsList(QList<RssItem*> news_list) {
QList<RssItem*> new_list; QList<RssItem*> new_list;
foreach(RssItem *item, news_list) { foreach(RssItem *item, news_list) {
insertSortElem(new_list, item); insertSortElem(new_list, item);
} }
return new_list; return new_list;
} }
};
#endif #endif

View file

@ -431,9 +431,9 @@ void RSSImp::refreshNewsList(QTreeWidgetItem* item) {
qDebug("Getting the list of news"); qDebug("Getting the list of news");
QList<RssItem*> news; QList<RssItem*> news;
if(rss_item == rssmanager) if(rss_item == rssmanager)
news = sortNewsList(rss_item->getUnreadNewsList()); news = RssManager::sortNewsList(rss_item->getUnreadNewsList());
else else
news = sortNewsList(rss_item->getNewsList()); news = RssManager::sortNewsList(rss_item->getNewsList());
// Clear the list first // Clear the list first
textBrowser->clear(); textBrowser->clear();
previous_news = 0; previous_news = 0;

View file

@ -14,7 +14,7 @@ CONFIG += qt \
network network
# Update this VERSION for each release # Update this VERSION for each release
DEFINES += VERSION=\\\"v1.6.0alpha2\\\" DEFINES += VERSION=\\\"v1.6.0beta1\\\"
DEFINES += VERSION_MAJOR=1 DEFINES += VERSION_MAJOR=1
DEFINES += VERSION_MINOR=6 DEFINES += VERSION_MINOR=6
DEFINES += VERSION_BUGFIX=0 DEFINES += VERSION_BUGFIX=0
@ -90,15 +90,14 @@ contains(DEBUG_MODE, 0) {
# QMAKE_CXXFLAGS_DEBUG += -fwrapv # QMAKE_CXXFLAGS_DEBUG += -fwrapv
unix:QMAKE_LFLAGS_SHAPP += -rdynamic unix:QMAKE_LFLAGS_SHAPP += -rdynamic
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
PKGCONFIG += "libtorrent-rasterbar libcurl" PKGCONFIG += "libtorrent-rasterbar"
QT += network \ QT += network \
xml xml
DEFINES += QT_NO_CAST_TO_ASCII DEFINES += QT_NO_CAST_TO_ASCII
# QT_NO_CAST_FROM_ASCII
# Windows # Windows
# usually built as static # usually built as static
# win32:LIBS += -ltorrent -lcurl -lboost_system # win32:LIBS += -ltorrent -lboost_system
# win32:LIBS += -lz ? # win32:LIBS += -lz ?
win32:LIBS += -lssl32 \ win32:LIBS += -lssl32 \
-lws2_32 \ -lws2_32 \

View file

@ -444,6 +444,8 @@ public slots:
settings.setValue(QString::fromUtf8("LastDirTorrentAdd"), savePathTxt->text()); settings.setValue(QString::fromUtf8("LastDirTorrentAdd"), savePathTxt->text());
// Create .incremental file if necessary // Create .incremental file if necessary
TorrentTempData::setSequential(hash, checkIncrementalDL->isChecked()); TorrentTempData::setSequential(hash, checkIncrementalDL->isChecked());
// Skip file checking and directly start seeding
TorrentTempData::setSeedingMode(hash, addInSeed->isChecked());
// Check if there is at least one selected file // Check if there is at least one selected file
if(allFiltered()){ if(allFiltered()){
QMessageBox::warning(0, tr("Invalid file selection"), tr("You must select at least one file in the torrent")); QMessageBox::warning(0, tr("Invalid file selection"), tr("You must select at least one file in the torrent"));

View file

@ -99,6 +99,25 @@ public:
} }
static void setSeedingMode(QString hash,bool seed){
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume"));
QHash<QString, QVariant> all_data = settings.value("torrents-tmp", QHash<QString, QVariant>()).toHash();
QHash<QString, QVariant> data = all_data[hash].toHash();
data["seeding"] = seed;
all_data[hash] = data;
settings.setValue("torrents-tmp", all_data);
}
static bool isSeedingMode(QString hash){
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume"));
QHash<QString, QVariant> all_data = settings.value("torrents-tmp", QHash<QString, QVariant>()).toHash();
QHash<QString, QVariant> data = all_data[hash].toHash();
if(data.contains("seeding"))
return data["seeding"].toBool();
return false;
}
static QString getSavePath(QString hash) { static QString getSavePath(QString hash) {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent-resume"));
QHash<QString, QVariant> all_data = settings.value("torrents-tmp", QHash<QString, QVariant>()).toHash(); QHash<QString, QVariant> all_data = settings.value("torrents-tmp", QHash<QString, QVariant>()).toHash();