1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-09 18:32:15 +02:00

Compare commits

...

23 Commits

Author SHA1 Message Date
Christophe Dumez
30c4d38fff tagged v2.1.1 release 2010-01-20 19:51:20 +00:00
Christophe Dumez
975ab9ad64 - Updated v2.1.1 release date 2010-01-20 19:10:52 +00:00
Christophe Dumez
b810278452 - Updated Polish translation 2010-01-20 19:10:10 +00:00
Christophe Dumez
86ac0a430e "Add in pause" setting is no longer ignored if torrent is loaded from a watched directory 2010-01-20 18:55:33 +00:00
Christophe Dumez
78a0f34645 BUGFIX: Fix "open torrent destination" feature when path contains spaces 2010-01-20 18:43:45 +00:00
Christophe Dumez
3ae09658c9 - Updated Russian translation 2010-01-20 18:38:22 +00:00
Christophe Dumez
7d9caad31e Paused torrents can now be rechecked 2010-01-20 18:06:56 +00:00
Christophe Dumez
c9c627dec2 Updated Hungarian translation 2010-01-20 16:03:26 +00:00
Christophe Dumez
5b104cdd9b BUGFIX: Can listen on ports < 1024 (must be root) 2010-01-20 10:00:08 +00:00
Christophe Dumez
8f667dce5c - Bump to v2.1.1 2010-01-20 09:45:47 +00:00
Christophe Dumez
89412e5050 - Updated Simplified Chinese translation (Legal notice was missing) 2010-01-20 09:42:19 +00:00
Christophe Dumez
63c121ecc7 - Fix typo in legal notice (startup) 2010-01-20 09:27:18 +00:00
Christophe Dumez
33b60779d6 BUGFIX: Fix renaming of files with unicode characters in their name 2010-01-20 08:48:11 +00:00
Christophe Dumez
26b2367833 Add in pause settings can be ignored from torrent addition dialog 2010-01-20 08:37:53 +00:00
Christophe Dumez
9b40a036a7 BUGFIX: Torrent added from magnet links were not remembered on restart 2010-01-19 23:48:04 +00:00
Christophe Dumez
d4cc0e9e4a Improved configure file output 2010-01-19 23:14:59 +00:00
Christophe Dumez
ca802a6233 BUGFIX: Configure file now checks for pkg-config executable which is required 2010-01-19 23:00:29 +00:00
Christophe Dumez
35394c4966 BUGFIX: Nox version no longer requires libQtXml 2010-01-19 22:55:15 +00:00
Christophe Dumez
077dd11af6 - Fix renaming of folders in a torrent (could rename children sometimes) 2010-01-19 22:43:59 +00:00
Christophe Dumez
a5c9c8d670 BUGFIX: Save torrent metadata so that it does not have to be re-downloaded on restart (Magnet links) 2010-01-19 21:54:17 +00:00
Christophe Dumez
1ef0bcbc06 - Removed useless include in project file 2010-01-19 00:19:40 +00:00
Christophe Dumez
e15eab9b6a - Fix compilation with Qt4.4 2010-01-18 22:10:38 +00:00
Christophe Dumez
8f1c56babd branched v2.1.x series 2010-01-18 19:03:29 +00:00
72 changed files with 2484 additions and 2179 deletions

View File

@@ -1,3 +1,18 @@
* Wed Jan 20 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.1
- BUGFIX: Fix compilation with Qt4.4
- BUGFIX: Save torrent metadata so that it does not have to be re-downloaded on restart (Magnet links)
- BUGFIX: Fix folder renaming in a torrent (would rename children under certain conditions)
- BUGFIX: Nox version no longer requires libQtXml
- BUGFIX: Configure file now checks for pkg-config executable which is required
- BUGFIX: Torrents added from magnet links were not remembered on restart
- BUGFIX: "Add in pause" setting can be ignored from torrent addition dialog
- BUGFIX: Fix renaming of files with unicode characters in their name
- BUGFIX: Fix typo in legal notice (startup)
- BUGFIX: Can listen on ports < 1024 (must be root)
- BUGFIX: Paused torrents can now be rechecked
- BUGFIX: Fix "open torrent destination" feature when path contains spaces
- I18N: Updated translations (Hungarian, Chinese, Russian)
* Mon Jan 18 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.0
- FEATURE: Graphical User Interface can be disabled at compilation time (headless running)
- FEATURE: Torrents can be labeled/categorized

View File

@@ -12,6 +12,8 @@ qBittorrent - A BitTorrent client in C++ / Qt4
Dependencies:
- Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
@@ -38,9 +40,11 @@ qBittorrent - A BitTorrent client in C++ / Qt4
will install and execute qBittorrent hopefully without any problems.
Dependencies:
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork, libqtxml)
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork)
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.0 REQUIRED, >= v0.15.0 ADVISED)
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.

42
configure vendored
View File

@@ -319,6 +319,23 @@ public:
}
};
#line 1 "pkg-config.qcm"
/*
-----BEGIN QCMOD-----
name: pkg-config
-----END QCMOD-----
*/
#include <QProcess>
class qc_pkg_config : public ConfObj
{
public:
qc_pkg_config(Conf *c) : ConfObj(c) {}
QString name() const { return "pkg-config executable"; }
QString shortname() const { return "pkg-config"; }
bool exec(){
return !conf->findProgram("pkg-config").isEmpty();
}
};
#line 1 "libtorrent-rasterbar.qcm"
/*
-----BEGIN QCMOD-----
@@ -345,7 +362,7 @@ public:
if(!libs.isEmpty())
conf->addLib(libs);
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
printf("\nWarning: libtorrent-rasterbar v%s was detected.\nSome feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
else
conf->addDefine("LIBTORRENT_0_15");
return true;
@@ -421,10 +438,14 @@ public:
qc_libnotify(Conf *c) : ConfObj(c) {}
QString name() const { return "libnotify >= 0.4.2 (optional)"; }
QString shortname() const { return "libnotify"; }
QString checkString() const {
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return "";
return ConfObj::checkString();
}
bool exec(){
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
return false;
}
QStringList incs;
QString req_ver = "0.4.2";
@@ -468,10 +489,14 @@ public:
qc_geoip_database(Conf *c) : ConfObj(c) {}
QString name() const { return "GeoIP Database (optional)"; }
QString shortname() const { return "GeoIP Database"; }
QString checkString() const {
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return "";
return ConfObj::checkString();
}
bool exec() {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
return false;
}
#ifdef Q_WS_X11
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
@@ -494,6 +519,9 @@ cat >$1/modules_new.cpp <<EOT
o = new qc_qt4(conf);
o->required = true;
o->disabled = false;
o = new qc_pkg_config(conf);
o->required = true;
o->disabled = false;
o = new qc_libtorrent_rasterbar(conf);
o->required = true;
o->disabled = false;

View File

@@ -1,6 +1,4 @@
TEMPLATE = subdirs
include(conf.pri)
SUBDIRS += src

View File

@@ -6,6 +6,9 @@
<dep type='qt4'>
<required/>
</dep>
<dep type='pkg-config'>
<required/>
</dep>
<dep type='libtorrent-rasterbar'>
<required/>
</dep>

View File

@@ -11,10 +11,14 @@ public:
qc_geoip_database(Conf *c) : ConfObj(c) {}
QString name() const { return "GeoIP Database (optional)"; }
QString shortname() const { return "GeoIP Database"; }
QString checkString() const {
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return "";
return ConfObj::checkString();
}
bool exec() {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
return false;
}
#ifdef Q_WS_X11
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {

View File

@@ -10,10 +10,14 @@ public:
qc_libnotify(Conf *c) : ConfObj(c) {}
QString name() const { return "libnotify >= 0.4.2 (optional)"; }
QString shortname() const { return "libnotify"; }
QString checkString() const {
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return "";
return ConfObj::checkString();
}
bool exec(){
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
return false;
}
QStringList incs;
QString req_ver = "0.4.2";

View File

@@ -23,7 +23,7 @@ public:
if(!libs.isEmpty())
conf->addLib(libs);
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
printf("\nWarning: libtorrent-rasterbar v%s was detected.\nSome feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
else
conf->addDefine("LIBTORRENT_0_15");
return true;

16
qcm/pkg-config.qcm Normal file
View File

@@ -0,0 +1,16 @@
/*
-----BEGIN QCMOD-----
name: pkg-config
-----END QCMOD-----
*/
#include <QProcess>
class qc_pkg_config : public ConfObj
{
public:
qc_pkg_config(Conf *c) : ConfObj(c) {}
QString name() const { return "pkg-config executable"; }
QString shortname() const { return "pkg-config"; }
bool exec(){
return !conf->findProgram("pkg-config").isEmpty();
}
};

View File

@@ -1,6 +1,6 @@
[Desktop Entry]
Categories=Qt;Network;P2P;
Comment=V2.1.0
Comment=V2.1.1
Exec=qbittorrent %f
GenericName=Bittorrent client
GenericName[bg]=Торент клиент

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -746,15 +746,18 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
addConsoleMessage(tr("'%1' is not a valid magnet URI.").arg(magnet_uri));
return h;
}
QDir torrentBackup(misc::BTBackupLocation());
if(resumed) {
qDebug("Resuming magnet URI: %s", hash.toLocal8Bit().data());
// Load metadata
if(QFile::exists(torrentBackup.path()+QDir::separator()+hash+QString(".torrent")))
return addTorrent(torrentBackup.path()+QDir::separator()+hash+QString(".torrent"), false, false, true);
} else {
qDebug("Adding new magnet URI");
}
bool fastResume=false;
Q_ASSERT(magnet_uri.startsWith("magnet:"));
QDir torrentBackup(misc::BTBackupLocation());
// Check if torrent is already in download list
if(s->find_torrent(sha1_hash(hash.toLocal8Bit().data())).is_valid()) {
@@ -799,7 +802,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
else
p.storage_mode = storage_mode_sparse;
// Start in pause
p.paused = false;
p.paused = true;
p.duplicate_is_error = false; // Already checked
p.auto_managed = false; // Because it is added in paused state
// Adding torrent to Bittorrent session
@@ -839,7 +842,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
}
QString label = TorrentTempData::getLabel(hash);
// Save persistent data for new torrent
TorrentPersistentData::saveTorrentPersistentData(h);
TorrentPersistentData::saveTorrentPersistentData(h, true);
// Save Label
if(!label.isEmpty()) {
TorrentPersistentData::saveLabel(hash, label);
@@ -850,7 +853,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
TorrentPersistentData::saveSavePath(hash, savePath);
}
}
if(!addInPause && !fastResume) {
if(!fastResume && (!addInPause || (Preferences::useAdditionDialog()))) {
// Start torrent because it was added in paused state
h.resume();
}
@@ -1053,7 +1056,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
// Copy it to torrentBackup directory
QFile::copy(file, newFile);
}
if(!addInPause && !fastResume) {
if(!fastResume && (!addInPause || (Preferences::useAdditionDialog() && !fromScanDir))) {
// Start torrent because it was added in paused state
h.resume();
}
@@ -1599,9 +1602,9 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
}
}
// Set DHT port (>= 1000 or 0 if same as BT)
// Set DHT port (>= 1 or 0 if same as BT)
void Bittorrent::setDHTPort(int dht_port) {
if(dht_port == 0 || dht_port >= 1000) {
if(dht_port >= 0) {
if(dht_port == current_dht_port) return;
struct dht_settings DHTSettings;
DHTSettings.service_port = dht_port;
@@ -1667,7 +1670,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
qDebug("Disabling HTTP communications proxy");
#ifdef Q_WS_WIN
putenv("http_proxy=");
putenv("sock_proxy=")
putenv("sock_proxy=");
#else
unsetenv("http_proxy");
unsetenv("sock_proxy");
@@ -1767,6 +1770,10 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
appendqBextensionToTorrent(h, true);
#endif
emit metadataReceived(h);
// Save metadata
QDir torrentBackup(misc::BTBackupLocation());
if(!QFile::exists(torrentBackup.path()+QDir::separator()+h.hash()+QString(".torrent")))
h.save_torrent_file(torrentBackup.path()+QDir::separator()+h.hash()+QString(".torrent"));
if(h.is_paused()) {
// XXX: Unfortunately libtorrent-rasterbar does not send a torrent_paused_alert
// and the torrent can be paused when metadata is received
@@ -1908,12 +1915,30 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
}
emit torrentFinishedChecking(h);
emit metadataReceived(h);
if(torrentsToPausedAfterChecking.contains(hash)) {
torrentsToPausedAfterChecking.removeOne(hash);
h.pause();
emit pausedTorrent(h);
}
}
}
a = s->pop_alert();
}
}
void Bittorrent::recheckTorrent(QString hash) {
QTorrentHandle h = getTorrentHandle(hash);
if(h.is_valid() && h.has_metadata()) {
if(h.is_paused()) {
if(!torrentsToPausedAfterChecking.contains(h.hash())) {
torrentsToPausedAfterChecking << h.hash();
h.resume();
}
}
h.force_recheck();
}
}
QHash<QString, TrackerInfos> Bittorrent::getTrackersInfo(QString hash) const{
return trackersInfos.value(hash, QHash<QString, TrackerInfos>());
}

View File

@@ -94,6 +94,7 @@ private:
QPointer<QTimer> timerAlerts;
QMap<QUrl, QString> savepath_fromurl;
QHash<QString, QHash<QString, TrackerInfos> > trackersInfos;
QStringList torrentsToPausedAfterChecking;
// Ratio
QPointer<QTimer> BigRatioTimer;
// HTTP
@@ -180,6 +181,7 @@ public slots:
void deleteTorrent(QString hash, bool delete_local_files = false);
void startUpTorrents();
session_proxy asyncDeletion();
void recheckTorrent(QString hash);
/* Needed by Web UI */
void pauseAllTorrents();
void pauseTorrent(QString hash);

View File

@@ -456,8 +456,8 @@ void HttpConnection::respondCommand(QString command)
void HttpConnection::recheckTorrent(QString hash) {
QTorrentHandle h = BTSession->getTorrentHandle(hash);
if(h.is_valid() && !h.is_paused()){
h.force_recheck();
if(h.is_valid()){
BTSession->recheckTorrent(h.hash());
}
}
@@ -466,7 +466,7 @@ void HttpConnection::recheckAllTorrents() {
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(h.is_valid() && !h.is_paused())
h.force_recheck();
if(h.is_valid())
BTSession->recheckTorrent(h.hash());
}
}

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

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

Some files were not shown because too many files have changed in this diff Show More