Compare commits
1 Commits
release-2.
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
82f5fbb52c |
11
Changelog
@@ -1,11 +1,4 @@
|
||||
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.4.0
|
||||
- FEATURE: Added actions to "Move to top/bottom" of priority queue
|
||||
- FEATURE: Auto-Shutdown on downloads completion
|
||||
- FEATURE: Email notification on download completion
|
||||
- FEATURE: Added button to password-lock the UI
|
||||
- FEATURE: Added label-level Pause/Resume/Delete actions
|
||||
|
||||
* Tue Jul 27 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.3.0
|
||||
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.3.0
|
||||
- FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible)
|
||||
- FEATURE: Remember previous save paths in torrent addition dialog
|
||||
- FEATURE: Max number of half-open connections can now be edited
|
||||
@@ -22,12 +15,10 @@
|
||||
- FEATURE: Torrents can be automatically paused once they reach a given ratio
|
||||
- FEATURE: Several files can now be disabled at once
|
||||
- FEATURE: Added "Select All/None" buttons to files list
|
||||
- FEATURE: Added support for BitComet links (bc://bt/...)
|
||||
- BUGFIX: Hide seeding torrents files priorities in Web UI
|
||||
- BUGFIX: The user can disable permanently recursive torrent download
|
||||
- BUGFIX: Peer Exchange status is now correctly reported
|
||||
- BUGFIX: Use an INI file instead of the registry on Windows (More reliable)
|
||||
- BUGFIX: Removed client spoofing feature to avoid tracker blacklisting
|
||||
- COSMETIC: Display peers country name in tooltip
|
||||
- COSMETIC: Display number of torrents in transfers tab label
|
||||
- COSMETIC: Simplified program preferences
|
||||
|
163
src/GUI.cpp
@@ -69,7 +69,6 @@ public:
|
||||
QWidget* getCurrentTabWidget() const;
|
||||
TransferListWidget* getTransferList() const { return transferList; }
|
||||
QMenu* getTrayIconMenu();
|
||||
PropertiesWidget *getProperties() const { return properties; }
|
||||
|
||||
public slots:
|
||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
@@ -98,9 +97,6 @@ protected slots:
|
||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||
void createSystrayDelayed();
|
||||
void tab_changed(int);
|
||||
void on_actionLock_qBittorrent_triggered();
|
||||
void defineUILockPassword();
|
||||
bool unlockUI();
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayTransferTab() const;
|
||||
@@ -154,7 +150,6 @@ private:
|
||||
PropertiesWidget *properties;
|
||||
bool displaySpeedInTitle;
|
||||
bool force_exit;
|
||||
bool ui_locked;
|
||||
// Keyboard shortcuts
|
||||
QShortcut *switchSearchShortcut;
|
||||
QShortcut *switchSearchShortcut2;
|
||||
@@ -175,7 +170,6 @@ private slots:
|
||||
void on_actionRSS_Reader_triggered();
|
||||
void on_actionSpeed_in_title_bar_triggered();
|
||||
void on_actionTop_tool_bar_triggered();
|
||||
void on_actionShutdown_when_downloads_complete_triggered();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 996 B |
Before Width: | Height: | Size: 929 B |
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P;
|
||||
Comment=V2.4.0
|
||||
Comment=V2.3.0
|
||||
Exec=qbittorrent %f
|
||||
GenericName=Bittorrent client
|
||||
GenericName[ar]=العميل Bittorrent
|
||||
|
Before Width: | Height: | Size: 54 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
@@ -10,13 +10,13 @@
|
||||
<string>torrent</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>qBitTorrentDocument</string>
|
||||
<string>qbittorrentDocument</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>BitTorrent Document</string>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-bittorrent</string>
|
||||
</array>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-bittorrent</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
@@ -47,7 +47,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>2.4.0</string>
|
||||
<string>2.3.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
@@ -47,6 +47,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
// Set icons
|
||||
logo->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/qbittorrent22.png")));
|
||||
mascot_lbl->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/mascot.png")));
|
||||
//Title
|
||||
lb_name->setText(QString::fromUtf8("<b><h1>")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>"));
|
||||
// Thanks
|
||||
|
@@ -11,15 +11,15 @@
|
||||
#include "preferences.h"
|
||||
|
||||
enum AdvSettingsCols {PROPERTY, VALUE};
|
||||
enum AdvSettingsRows {DISK_CACHE, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_LIMIT_LAN, COUNT_OVERHEAD, RECHECK_COMPLETED, LIST_REFRESH, RESOLVE_COUNTRIES, RESOLVE_HOSTS, MAX_HALF_OPEN, SUPER_SEEDING, NETWORK_IFACE, PROGRAM_NOTIFICATIONS };
|
||||
#define ROW_COUNT 13
|
||||
enum AdvSettingsRows {DISK_CACHE, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_LIMIT_LAN, COUNT_OVERHEAD, RECHECK_COMPLETED, LIST_REFRESH, RESOLVE_COUNTRIES, RESOLVE_HOSTS, MAX_HALF_OPEN, SUPER_SEEDING, NETWORK_IFACE };
|
||||
#define ROW_COUNT 12
|
||||
|
||||
class AdvancedSettings: public QTableWidget {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QSpinBox *spin_cache, *outgoing_ports_min, *outgoing_ports_max, *spin_list_refresh, *spin_maxhalfopen;
|
||||
QCheckBox *cb_ignore_limits_lan, *cb_count_overhead, *cb_recheck_completed, *cb_resolve_countries, *cb_resolve_hosts, *cb_super_seeding, *cb_program_notifications;
|
||||
QCheckBox *cb_ignore_limits_lan, *cb_count_overhead, *cb_recheck_completed, *cb_resolve_countries, *cb_resolve_hosts, *cb_super_seeding;
|
||||
QComboBox *combo_iface;
|
||||
|
||||
public:
|
||||
@@ -52,7 +52,6 @@ public:
|
||||
delete spin_maxhalfopen;
|
||||
delete cb_super_seeding;
|
||||
delete combo_iface;
|
||||
delete cb_program_notifications;
|
||||
}
|
||||
|
||||
public slots:
|
||||
@@ -86,8 +85,6 @@ public slots:
|
||||
} else {
|
||||
Preferences::setNetworkInterface(combo_iface->currentText());
|
||||
}
|
||||
// Program notification
|
||||
Preferences::useProgramNotification(cb_program_notifications->isChecked());
|
||||
}
|
||||
|
||||
protected slots:
|
||||
@@ -178,7 +175,7 @@ protected slots:
|
||||
setItem(NETWORK_IFACE, PROPERTY, new QTableWidgetItem(tr("Network Interface (requires restart)")));
|
||||
combo_iface = new QComboBox;
|
||||
combo_iface->addItem(tr("Any interface", "i.e. Any network interface"));
|
||||
const QString current_iface = Preferences::getNetworkInterface();
|
||||
const QString ¤t_iface = Preferences::getNetworkInterface();
|
||||
int i = 1;
|
||||
foreach(const QNetworkInterface& iface, QNetworkInterface::allInterfaces()) {
|
||||
if(iface.name() == "lo") continue;
|
||||
@@ -189,12 +186,6 @@ protected slots:
|
||||
}
|
||||
connect(combo_iface, SIGNAL(currentIndexChanged(int)), this, SLOT(emitSettingsChanged()));
|
||||
setCellWidget(NETWORK_IFACE, VALUE, combo_iface);
|
||||
// Program notifications
|
||||
setItem(PROGRAM_NOTIFICATIONS, PROPERTY, new QTableWidgetItem(tr("Display program notification baloons")));
|
||||
cb_program_notifications = new QCheckBox();
|
||||
connect(cb_program_notifications, SIGNAL(toggled(bool)), this, SLOT(emitSettingsChanged()));
|
||||
cb_program_notifications->setChecked(Preferences::useProgramNotification());
|
||||
setCellWidget(PROGRAM_NOTIFICATIONS, VALUE, cb_program_notifications);
|
||||
}
|
||||
|
||||
void emitSettingsChanged() {
|
||||
|
@@ -108,7 +108,6 @@ public:
|
||||
session* getSession() const;
|
||||
QHash<QString, TrackerInfos> getTrackersInfo(QString hash) const;
|
||||
bool hasActiveTorrents() const;
|
||||
bool hasDownloadingTorrents() const;
|
||||
bool isQueueingEnabled() const;
|
||||
int getMaximumActiveDownloads() const;
|
||||
int getMaximumActiveTorrents() const;
|
||||
@@ -200,7 +199,6 @@ protected slots:
|
||||
void takeETASamples();
|
||||
void exportTorrentFiles(QString path);
|
||||
void saveTempFastResumeData();
|
||||
void sendNotificationEmail(QTorrentHandle h);
|
||||
|
||||
signals:
|
||||
void addedTorrent(QTorrentHandle& h);
|
||||
|
@@ -50,7 +50,6 @@
|
||||
#include "torrentpersistentdata.h"
|
||||
#include "createtorrent_imp.h"
|
||||
#include "misc.h"
|
||||
#include "qinisettings.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
using namespace boost::filesystem;
|
||||
@@ -81,11 +80,8 @@ createtorrent::~createtorrent() {
|
||||
}
|
||||
|
||||
void createtorrent::on_addFolder_button_clicked(){
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
QString last_path = settings.value("CreateTorrent/last_add_path", QDir::homePath()).toString();
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Select a folder to add to the torrent"), last_path, QFileDialog::ShowDirsOnly);
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Select a folder to add to the torrent"), QDir::homePath(), QFileDialog::ShowDirsOnly);
|
||||
if(!dir.isEmpty()) {
|
||||
settings.setValue("CreateTorrent/last_add_path", dir);
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
dir = dir.replace("/", "\\");
|
||||
#endif
|
||||
@@ -94,11 +90,8 @@ void createtorrent::on_addFolder_button_clicked(){
|
||||
}
|
||||
|
||||
void createtorrent::on_addFile_button_clicked(){
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
QString last_path = settings.value("CreateTorrent/last_add_path", QDir::homePath()).toString();
|
||||
QString file = QFileDialog::getOpenFileName(this, tr("Select a file to add to the torrent"), last_path);
|
||||
QString file = QFileDialog::getOpenFileName(this, tr("Select a file to add to the torrent"), QDir::homePath());
|
||||
if(!file.isEmpty()) {
|
||||
settings.setValue("CreateTorrent/last_add_path", misc::removeLastPathPart(file));
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
file = file.replace("/", "\\");
|
||||
#endif
|
||||
@@ -184,14 +177,14 @@ void createtorrent::on_createButton_clicked(){
|
||||
return;
|
||||
}
|
||||
QStringList trackers = allItems(trackers_list);
|
||||
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
QString last_path = settings.value("CreateTorrent/last_save_path", QDir::homePath()).toString();
|
||||
|
||||
QString destination = QFileDialog::getSaveFileName(this, tr("Select destination torrent file"), last_path, tr("Torrent Files")+QString::fromUtf8(" (*.torrent)"));
|
||||
/*if(!trackers.size()){
|
||||
QMessageBox::critical(0, tr("No tracker path set"), tr("Please set at least one tracker"));
|
||||
return;
|
||||
}*/
|
||||
QString destination = QFileDialog::getSaveFileName(this, tr("Select destination torrent file"), QDir::homePath(), tr("Torrent Files")+QString::fromUtf8(" (*.torrent)"));
|
||||
if(!destination.isEmpty()) {
|
||||
settings.setValue("CreateTorrent/last_save_path", misc::removeLastPathPart(destination));
|
||||
destination += QString::fromUtf8(".torrent");
|
||||
if(!destination.endsWith(QString::fromUtf8(".torrent")))
|
||||
destination += QString::fromUtf8(".torrent");
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
||||
show();
|
||||
// Paste clipboard if there is an URL in it
|
||||
QString clip_txt = qApp->clipboard()->text();
|
||||
if(clip_txt.startsWith("http://", Qt::CaseInsensitive) || clip_txt.startsWith("https://", Qt::CaseInsensitive) || clip_txt.startsWith("ftp://", Qt::CaseInsensitive) || clip_txt.startsWith("magnet:", Qt::CaseInsensitive) || clip_txt.startsWith("bc://bt/", Qt::CaseInsensitive)) {
|
||||
if(clip_txt.startsWith("http://", Qt::CaseInsensitive) || clip_txt.startsWith("https://", Qt::CaseInsensitive) || clip_txt.startsWith("ftp://", Qt::CaseInsensitive) || clip_txt.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
textUrls->setText(clip_txt);
|
||||
}
|
||||
}
|
||||
|
@@ -101,7 +101,7 @@ void downloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
}
|
||||
|
||||
void downloadThread::loadCookies(const QString &host_name, QString url) {
|
||||
const QList<QByteArray> raw_cookies = Preferences::getHostNameCookies(host_name);
|
||||
const QList<QByteArray> &raw_cookies = Preferences::getHostNameCookies(host_name);
|
||||
QNetworkCookieJar *cookie_jar = networkManager.cookieJar();
|
||||
QList<QNetworkCookie> cookies;
|
||||
qDebug("Loading cookies for host name: %s", qPrintable(host_name));
|
||||
@@ -135,7 +135,7 @@ QNetworkReply* downloadThread::downloadUrl(QString url){
|
||||
loadCookies(host_name, url);
|
||||
// Process download request
|
||||
qDebug("url is %s", qPrintable(url));
|
||||
const QUrl qurl = QUrl::fromEncoded(url.toLocal8Bit());
|
||||
const QUrl &qurl = QUrl::fromEncoded(url.toLocal8Bit());
|
||||
QNetworkRequest request(qurl);
|
||||
// Spoof Firefox 3.5 user agent to avoid
|
||||
// Web server banning
|
||||
|
@@ -81,11 +81,7 @@ void engineSelectDlg::dropEvent(QDropEvent *event) {
|
||||
QString file;
|
||||
foreach(file, files) {
|
||||
qDebug("dropped %s", qPrintable(file));
|
||||
#ifdef Q_WS_WIN
|
||||
file = file.replace("file:///", "");
|
||||
#else
|
||||
file = file.replace("file://", "");
|
||||
#endif
|
||||
if(file.startsWith("http://", Qt::CaseInsensitive) || file.startsWith("https://", Qt::CaseInsensitive) || file.startsWith("ftp://", Qt::CaseInsensitive)) {
|
||||
setCursor(QCursor(Qt::WaitCursor));
|
||||
downloader->downloadUrl(file);
|
||||
@@ -269,7 +265,7 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
|
||||
if(QFile::exists(dest_path)) {
|
||||
// Backup in case install fails
|
||||
QFile::copy(dest_path, dest_path+".bak");
|
||||
misc::safeRemove(dest_path);
|
||||
QFile::remove(dest_path);
|
||||
update = true;
|
||||
}
|
||||
// Copy the plugin
|
||||
@@ -280,22 +276,22 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
|
||||
if(!supported_engines->contains(plugin_name)) {
|
||||
if(update) {
|
||||
// Remove broken file
|
||||
misc::safeRemove(dest_path);
|
||||
QFile::remove(dest_path);
|
||||
// restore backup
|
||||
QFile::copy(dest_path+".bak", dest_path);
|
||||
misc::safeRemove(dest_path+".bak");
|
||||
QFile::remove(dest_path+".bak");
|
||||
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be updated, keeping old version.", "%1 is the name of the search engine").arg(plugin_name));
|
||||
return;
|
||||
} else {
|
||||
// Remove broken file
|
||||
misc::safeRemove(dest_path);
|
||||
QFile::remove(dest_path);
|
||||
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name));
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Install was successful, remove backup
|
||||
if(update) {
|
||||
misc::safeRemove(dest_path+".bak");
|
||||
QFile::remove(dest_path+".bak");
|
||||
}
|
||||
if(update) {
|
||||
QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin was successfully updated.", "%1 is the name of the search engine").arg(plugin_name));
|
||||
@@ -413,7 +409,7 @@ bool engineSelectDlg::parseVersionsFile(QString versions_file) {
|
||||
// Close file
|
||||
versions.close();
|
||||
// Clean up tmp file
|
||||
misc::safeRemove(versions_file);
|
||||
QFile::remove(versions_file);
|
||||
if(file_correct && !updated) {
|
||||
QMessageBox::information(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("All your plugins are already up to date."));
|
||||
}
|
||||
@@ -443,21 +439,21 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
|
||||
}
|
||||
}
|
||||
// Delete tmp file
|
||||
misc::safeRemove(filePath);
|
||||
QFile::remove(filePath);
|
||||
return;
|
||||
}
|
||||
if(url.endsWith("versions.txt")) {
|
||||
if(!parseVersionsFile(filePath)) {
|
||||
QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, update server is temporarily unavailable."));
|
||||
}
|
||||
misc::safeRemove(filePath);
|
||||
QFile::remove(filePath);
|
||||
return;
|
||||
}
|
||||
if(url.endsWith(".py", Qt::CaseInsensitive)) {
|
||||
QString plugin_name = url.split('/').last();
|
||||
plugin_name.replace(".py", "");
|
||||
installPlugin(filePath, plugin_name);
|
||||
misc::safeRemove(filePath);
|
||||
QFile::remove(filePath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -163,12 +163,6 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
|
||||
}
|
||||
if(m.contains("export_dir"))
|
||||
Preferences::setExportDir(m["export_dir"].toString());
|
||||
if(m.contains("mail_notification_enabled"))
|
||||
Preferences::setMailNotificationEnabled(m["mail_notification_enabled"].toBool());
|
||||
if(m.contains("mail_notification_email"))
|
||||
Preferences::setMailNotificationEmail(m["mail_notification_email"].toString());
|
||||
if(m.contains("mail_notification_smtp"))
|
||||
Preferences::setMailNotificationSMTP(m["mail_notification_smtp"].toString());
|
||||
if(m.contains("preallocate_all"))
|
||||
Preferences::preAllocateAllFiles(m["preallocate_all"].toBool());
|
||||
if(m.contains("queueing_enabled"))
|
||||
@@ -214,6 +208,12 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
|
||||
Preferences::setLSDEnabled(m["lsd"].toBool());
|
||||
if(m.contains("encryption"))
|
||||
Preferences::setEncryptionSetting(m["encryption"].toInt());
|
||||
if(m.contains("peer_id"))
|
||||
Preferences::setPeerID(m["peer_id"].toString());
|
||||
if(m.contains("peer_version"))
|
||||
Preferences::setClientVersion(m["peer_version"].toString());
|
||||
if(m.contains("peer_build"))
|
||||
Preferences::setClientBuild(m["peer_build"].toString());
|
||||
// Proxy
|
||||
if(m.contains("proxy_type"))
|
||||
Preferences::setPeerProxyType(m["proxy_type"].toInt());
|
||||
@@ -271,9 +271,6 @@ QVariantMap EventManager::getGlobalPreferences() const {
|
||||
data["download_in_scan_dirs"] = var_list;
|
||||
data["export_dir_enabled"] = Preferences::isTorrentExportEnabled();
|
||||
data["export_dir"] = Preferences::getExportDir();
|
||||
data["mail_notification_enabled"] = Preferences::isMailNotificationEnabled();
|
||||
data["mail_notification_email"] = Preferences::getMailNotificationEmail();
|
||||
data["mail_notification_smtp"] = Preferences::getMailNotificationSMTP();
|
||||
data["preallocate_all"] = Preferences::preAllocateAllFiles();
|
||||
data["queueing_enabled"] = Preferences::isQueueingSystemEnabled();
|
||||
data["max_active_downloads"] = Preferences::getMaxActiveDownloads();
|
||||
@@ -298,6 +295,9 @@ QVariantMap EventManager::getGlobalPreferences() const {
|
||||
data["pex"] = Preferences::isPeXEnabled();
|
||||
data["lsd"] = Preferences::isLSDEnabled();
|
||||
data["encryption"] = Preferences::getEncryptionSetting();
|
||||
data["peer_id"] = Preferences::getPeerID();
|
||||
data["peer_version"] = Preferences::getClientVersion();
|
||||
data["peer_build"] = Preferences::getClientBuild();
|
||||
// Proxy
|
||||
data["proxy_type"] = Preferences::getPeerProxyType();
|
||||
data["proxy_ip"] = Preferences::getPeerProxyIp();
|
||||
|
@@ -201,14 +201,9 @@ signals:
|
||||
|
||||
private:
|
||||
void addTorrentsFromDir(const QDir &dir, QStringList &torrents) {
|
||||
const QStringList files = dir.entryList(filters, QDir::Files, QDir::Unsorted);
|
||||
foreach(const QString &file, files) {
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
torrents << dir.absoluteFilePath(file).replace("/", "\\");
|
||||
#else
|
||||
torrents << dir.absoluteFilePath(file);
|
||||
#endif
|
||||
}
|
||||
const QStringList &files = dir.entryList(filters, QDir::Files, QDir::Unsorted);
|
||||
foreach(const QString &file, files)
|
||||
torrents << dir.canonicalPath() + '/' + file;
|
||||
}
|
||||
|
||||
};
|
||||
|
@@ -41,7 +41,6 @@
|
||||
using namespace libtorrent;
|
||||
|
||||
class GeoIP : public QObject {
|
||||
Q_OBJECT
|
||||
protected:
|
||||
#ifdef WITH_GEOIP_EMBEDDED
|
||||
static QString geoipFolder(bool embedded=false) {
|
||||
@@ -76,7 +75,7 @@ protected:
|
||||
}
|
||||
// Remove destination files
|
||||
if(QFile::exists(geoipDBpath(false)))
|
||||
misc::safeRemove(geoipDBpath(false));
|
||||
QFile::remove(geoipDBpath(false));
|
||||
// Copy from executable to hard disk
|
||||
qDebug("%s -> %s", qPrintable(geoipDBpath(true)), qPrintable(geoipDBpath(false)));
|
||||
if(!QFile::copy(geoipDBpath(true), geoipDBpath(false))) {
|
||||
|
@@ -89,10 +89,6 @@ public slots:
|
||||
if(param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
|
||||
BTSession->downloadFromUrl(param);
|
||||
}else{
|
||||
if(param.startsWith("bc://bt/", Qt::CaseInsensitive)) {
|
||||
qDebug("Converting bc link to magnet link");
|
||||
param = misc::bcLinkToMagnet(param);
|
||||
}
|
||||
if(param.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
BTSession->addMagnetUri(param);
|
||||
} else {
|
||||
|
@@ -133,7 +133,7 @@ QString HttpConnection::translateDocument(QString data) {
|
||||
|
||||
void HttpConnection::respond() {
|
||||
//qDebug("Respond called");
|
||||
const QString peer_ip = socket->peerAddress().toString();
|
||||
const QString &peer_ip = socket->peerAddress().toString();
|
||||
const int nb_fail = parent->NbFailedAttemptsForIp(peer_ip);
|
||||
if(nb_fail >= MAX_AUTH_FAILED_ATTEMPTS) {
|
||||
generator.setStatusLine(403, "Forbidden");
|
||||
@@ -161,7 +161,7 @@ void HttpConnection::respond() {
|
||||
write();
|
||||
return;
|
||||
}
|
||||
// Client successfully authenticated, reset number of failed attempts
|
||||
// Client sucessfuly authenticated, reset number of failed attempts
|
||||
parent->resetNbFailedAttemptsForIp(peer_ip);
|
||||
QString url = parser.url();
|
||||
// Favicon
|
||||
@@ -333,10 +333,6 @@ void HttpConnection::respondCommand(QString command)
|
||||
foreach(QString url, list){
|
||||
url = url.trimmed();
|
||||
if(!url.isEmpty()){
|
||||
if(url.startsWith("bc://bt/", Qt::CaseInsensitive)) {
|
||||
qDebug("Converting bc link to magnet link");
|
||||
url = misc::bcLinkToMagnet(url);
|
||||
}
|
||||
if(url.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
emit MagnetReadyToBeDownloaded(url);
|
||||
} else {
|
||||
@@ -500,16 +496,6 @@ void HttpConnection::respondCommand(QString command)
|
||||
if(h.is_valid()) h.queue_position_down();
|
||||
return;
|
||||
}
|
||||
if(command == "topPrio") {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(parser.post("hash"));
|
||||
if(h.is_valid()) h.queue_position_top();
|
||||
return;
|
||||
}
|
||||
if(command == "bottomPrio") {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(parser.post("hash"));
|
||||
if(h.is_valid()) h.queue_position_bottom();
|
||||
return;
|
||||
}
|
||||
if(command == "recheck"){
|
||||
recheckTorrent(parser.post("hash"));
|
||||
return;
|
||||
|
307
src/icons.qrc
52
src/lang.qrc
@@ -1,34 +1,34 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>lang/qbittorrent_nl.qm</file>
|
||||
<file>lang/qbittorrent_hu.qm</file>
|
||||
<file>lang/qbittorrent_ru.qm</file>
|
||||
<file>lang/qbittorrent_zh_TW.qm</file>
|
||||
<file>lang/qbittorrent_tr.qm</file>
|
||||
<file>lang/qbittorrent_fi.qm</file>
|
||||
<file>lang/qbittorrent_es.qm</file>
|
||||
<file>lang/qbittorrent_sk.qm</file>
|
||||
<file>lang/qbittorrent_ja.qm</file>
|
||||
<file>lang/qbittorrent_zh_TW.qm</file>
|
||||
<file>lang/qbittorrent_pt.qm</file>
|
||||
<file>lang/qbittorrent_sv.qm</file>
|
||||
<file>lang/qbittorrent_pl.qm</file>
|
||||
<file>lang/qbittorrent_it.qm</file>
|
||||
<file>lang/qbittorrent_ar.qm</file>
|
||||
<file>lang/qbittorrent_ko.qm</file>
|
||||
<file>lang/qbittorrent_en.qm</file>
|
||||
<file>lang/qbittorrent_ro.qm</file>
|
||||
<file>lang/qbittorrent_bg.qm</file>
|
||||
<file>lang/qbittorrent_ru.qm</file>
|
||||
<file>lang/qbittorrent_nl.qm</file>
|
||||
<file>lang/qbittorrent_nb.qm</file>
|
||||
<file>lang/qbittorrent_fi.qm</file>
|
||||
<file>lang/qbittorrent_uk.qm</file>
|
||||
<file>lang/qbittorrent_cs.qm</file>
|
||||
<file>lang/qbittorrent_pt_BR.qm</file>
|
||||
<file>lang/qbittorrent_el.qm</file>
|
||||
<file>lang/qbittorrent_ca.qm</file>
|
||||
<file>lang/qbittorrent_pt.qm</file>
|
||||
<file>lang/qbittorrent_it.qm</file>
|
||||
<file>lang/qbittorrent_fr.qm</file>
|
||||
<file>lang/qbittorrent_uk.qm</file>
|
||||
<file>lang/qbittorrent_zh.qm</file>
|
||||
<file>lang/qbittorrent_ko.qm</file>
|
||||
<file>lang/qbittorrent_nb.qm</file>
|
||||
<file>lang/qbittorrent_sv.qm</file>
|
||||
<file>lang/qbittorrent_de.qm</file>
|
||||
<file>lang/qbittorrent_sr.qm</file>
|
||||
<file>lang/qbittorrent_pt_BR.qm</file>
|
||||
<file>lang/qbittorrent_da.qm</file>
|
||||
<file>lang/qbittorrent_cs.qm</file>
|
||||
<file>lang/qbittorrent_pl.qm</file>
|
||||
<file>lang/qbittorrent_bg.qm</file>
|
||||
<file>lang/qbittorrent_ar.qm</file>
|
||||
<file>lang/qbittorrent_es.qm</file>
|
||||
<file>lang/qbittorrent_en.qm</file>
|
||||
<file>lang/qbittorrent_hr.qm</file>
|
||||
<file>lang/qbittorrent_ro.qm</file>
|
||||
<file>lang/qbittorrent_sr.qm</file>
|
||||
<file>lang/qbittorrent_hu.qm</file>
|
||||
<file>lang/qbittorrent_da.qm</file>
|
||||
<file>lang/qbittorrent_de.qm</file>
|
||||
<file>lang/qbittorrent_zh.qm</file>
|
||||
<file>lang/qbittorrent_ja.qm</file>
|
||||
<file>lang/qbittorrent_tr.qm</file>
|
||||
<file>lang/qbittorrent_fr.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|