You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-21 13:52:16 +02:00
Compare commits
26 Commits
release-2.
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
33147d842c | ||
![]() |
11e0b7c9b5 | ||
![]() |
e8cd92e245 | ||
![]() |
a757953b76 | ||
![]() |
a26da65419 | ||
![]() |
1d9ef166bd | ||
![]() |
81a5201e41 | ||
![]() |
9f9354af12 | ||
![]() |
ac1ebf4e13 | ||
![]() |
b9ccd3e74f | ||
![]() |
4177a37d63 | ||
![]() |
24a73c05b9 | ||
![]() |
960d8d1bc9 | ||
![]() |
da69983e64 | ||
![]() |
6db7d36e4d | ||
![]() |
571963b1bd | ||
![]() |
9e50e1ba7e | ||
![]() |
82af132d8a | ||
![]() |
80dd666107 | ||
![]() |
ac50f0cdc2 | ||
![]() |
bf685773e6 | ||
![]() |
a0ada5c3ba | ||
![]() |
220fd4a7b8 | ||
![]() |
d5622da576 | ||
![]() |
55be2aa9a0 | ||
![]() |
96f619b486 |
12
Changelog
12
Changelog
@@ -1,4 +1,14 @@
|
|||||||
* Sun May 20 - Christophe Dumez <chris@qbittorrent.org> - v2.9.9
|
* Sun Jun 24 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.10
|
||||||
|
- BUGFIX: Fix possible crash when showing torrent content (closes #1002586)
|
||||||
|
- BUGFIX: Add support for RSS feeds using magnet links (closes #1016379)
|
||||||
|
- BUGFIX: Remove 100kb limit for torrent file size in Web UI
|
||||||
|
- BUGFIX: Fix ratio limiting bug (closes #835217)
|
||||||
|
- BUGFIX: Do not display .!qB file extensions in Web UI
|
||||||
|
- BUGFIX: Stop using absolute URLs in Web UI ajax requests (closes #1011226)
|
||||||
|
- BUGFIX: Fix torrent association and loading on Mac OS X (closes #1011229)
|
||||||
|
- BUGFIX: Fix unreversible "Minimize to tray" on some window managers (closes #917825)
|
||||||
|
|
||||||
|
* Sun May 20 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.9
|
||||||
- BUGFIX: More reliable RSS feed parsing (closes #1001777)
|
- BUGFIX: More reliable RSS feed parsing (closes #1001777)
|
||||||
- BUGFIX: Better support for cookies in RSS
|
- BUGFIX: Better support for cookies in RSS
|
||||||
- BUGFIX: Make sure show/hide text in tray icon menu is correct
|
- BUGFIX: Make sure show/hide text in tray icon menu is correct
|
||||||
|
@@ -13,10 +13,6 @@
|
|||||||
<string>qBitTorrentDocument</string>
|
<string>qBitTorrentDocument</string>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>BitTorrent Document</string>
|
<string>BitTorrent Document</string>
|
||||||
<key>CFBundleTypeMIMETypes</key>
|
|
||||||
<array>
|
|
||||||
<string>application/x-bittorrent</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Viewer</string>
|
<string>Viewer</string>
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
@@ -40,21 +36,55 @@
|
|||||||
<string>BitTorrent Magnet URL</string>
|
<string>BitTorrent Magnet URL</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>qBittorrent</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>qbittorrent_mac.icns</string>
|
<string>qbittorrent_mac.icns</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.9.9</string>
|
<string>2.9.10</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>qBit</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>qbittorrent</string>
|
<string>qbittorrent</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.qbittorrent</string>
|
<string>org.qbittorrent</string>
|
||||||
<key>NOTE</key>
|
<key>NSAppleScriptEnabled</key>
|
||||||
<string>This file was generated by Qt/QMake.</string>
|
<string>YES</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2006-2012 Christophe Dumez</string>
|
||||||
|
<key>UTExportedTypeDeclarations</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.data</string>
|
||||||
|
<string>public.item</string>
|
||||||
|
<string>com.bittorrent.torrent</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>BitTorrent Document</string>
|
||||||
|
<key>UTTypeIconFile</key>
|
||||||
|
<string>qBitTorrentDocument</string>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>org.bittorrent.torrent</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>http://www.bittorrent.org/beps/bep_0000.html</string>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.ostype</key>
|
||||||
|
<string>TORR</string>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>torrent</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/x-bittorrent</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@@ -37,8 +37,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
namespace Ui {
|
namespace Ui {
|
||||||
class ExecutionLog;
|
class ExecutionLog;
|
||||||
}
|
}
|
||||||
class LogListWidget;
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
class LogListWidget;
|
||||||
|
|
||||||
class ExecutionLog : public QWidget
|
class ExecutionLog : public QWidget
|
||||||
{
|
{
|
||||||
|
@@ -307,6 +307,9 @@ int main(int argc, char *argv[]){
|
|||||||
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
|
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
|
||||||
&window, SLOT(processParams(const QString&)));
|
&window, SLOT(processParams(const QString&)));
|
||||||
app.setActivationWindow(&window);
|
app.setActivationWindow(&window);
|
||||||
|
#ifdef Q_WS_MAC
|
||||||
|
static_cast<QMacApplication*>(&app)->setReadyToProcessEvents();
|
||||||
|
#endif // Q_WS_MAC
|
||||||
#else
|
#else
|
||||||
// Load Headless class
|
// Load Headless class
|
||||||
HeadlessLoader loader(torrentCmdLine);
|
HeadlessLoader loader(torrentCmdLine);
|
||||||
|
@@ -145,6 +145,7 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||||||
connect(QBtSession::instance(), SIGNAL(finishedTorrent(QTorrentHandle)), this, SLOT(finishedTorrent(QTorrentHandle)));
|
connect(QBtSession::instance(), SIGNAL(finishedTorrent(QTorrentHandle)), this, SLOT(finishedTorrent(QTorrentHandle)));
|
||||||
connect(QBtSession::instance(), SIGNAL(trackerAuthenticationRequired(QTorrentHandle)), this, SLOT(trackerAuthenticationRequired(QTorrentHandle)));
|
connect(QBtSession::instance(), SIGNAL(trackerAuthenticationRequired(QTorrentHandle)), this, SLOT(trackerAuthenticationRequired(QTorrentHandle)));
|
||||||
connect(QBtSession::instance(), SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString)));
|
connect(QBtSession::instance(), SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString)));
|
||||||
|
connect(QBtSession::instance(), SIGNAL(newMagnetLink(QString)), this, SLOT(processNewMagnetLink(QString)));
|
||||||
connect(QBtSession::instance(), SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString)));
|
connect(QBtSession::instance(), SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString)));
|
||||||
connect(QBtSession::instance(), SIGNAL(alternativeSpeedsModeChanged(bool)), this, SLOT(updateAltSpeedsBtn(bool)));
|
connect(QBtSession::instance(), SIGNAL(alternativeSpeedsModeChanged(bool)), this, SLOT(updateAltSpeedsBtn(bool)));
|
||||||
connect(QBtSession::instance(), SIGNAL(recursiveTorrentDownloadPossible(QTorrentHandle)), this, SLOT(askRecursiveTorrentDownloadConfirmation(QTorrentHandle)));
|
connect(QBtSession::instance(), SIGNAL(recursiveTorrentDownloadPossible(QTorrentHandle)), this, SLOT(askRecursiveTorrentDownloadConfirmation(QTorrentHandle)));
|
||||||
@@ -701,13 +702,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
show();
|
show();
|
||||||
if(isMinimized()) {
|
|
||||||
if(isMaximized()) {
|
|
||||||
showMaximized();
|
|
||||||
}else{
|
|
||||||
showNormal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
raise();
|
raise();
|
||||||
activateWindow();
|
activateWindow();
|
||||||
}else{
|
}else{
|
||||||
@@ -817,7 +811,7 @@ bool MainWindow::event(QEvent * e) {
|
|||||||
// Iconify if there is no modal window
|
// Iconify if there is no modal window
|
||||||
if(!has_modal_window) {
|
if(!has_modal_window) {
|
||||||
qDebug("Minimize to Tray enabled, hiding!");
|
qDebug("Minimize to Tray enabled, hiding!");
|
||||||
e->accept();
|
e->ignore();
|
||||||
QTimer::singleShot(0, this, SLOT(hide()));
|
QTimer::singleShot(0, this, SLOT(hide()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -992,6 +986,17 @@ void MainWindow::processDownloadedFiles(QString path, QString url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::processNewMagnetLink(const QString& link)
|
||||||
|
{
|
||||||
|
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||||
|
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
||||||
|
if (useTorrentAdditionDialog) {
|
||||||
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
||||||
|
dialog->showLoadMagnetURI(link);
|
||||||
|
} else
|
||||||
|
QBtSession::instance()->addMagnetUri(link);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::optionsSaved() {
|
void MainWindow::optionsSaved() {
|
||||||
loadPreferences();
|
loadPreferences();
|
||||||
}
|
}
|
||||||
|
@@ -129,6 +129,7 @@ protected slots:
|
|||||||
void addTorrent(QString path);
|
void addTorrent(QString path);
|
||||||
void addUnauthenticatedTracker(const QPair<QTorrentHandle,QString> &tracker);
|
void addUnauthenticatedTracker(const QPair<QTorrentHandle,QString> &tracker);
|
||||||
void processDownloadedFiles(QString path, QString url);
|
void processDownloadedFiles(QString path, QString url);
|
||||||
|
void processNewMagnetLink(const QString& link);
|
||||||
void finishedTorrent(const QTorrentHandle& h) const;
|
void finishedTorrent(const QTorrentHandle& h) const;
|
||||||
void askRecursiveTorrentDownloadConfirmation(const QTorrentHandle &h);
|
void askRecursiveTorrentDownloadConfirmation(const QTorrentHandle &h);
|
||||||
// Options slots
|
// Options slots
|
||||||
|
@@ -652,7 +652,7 @@ void PropertiesWidget::deleteSelectedUrlSeeds(){
|
|||||||
|
|
||||||
bool PropertiesWidget::applyPriorities() {
|
bool PropertiesWidget::applyPriorities() {
|
||||||
qDebug("Saving files priorities");
|
qDebug("Saving files priorities");
|
||||||
const std::vector<int> priorities = PropListModel->model()->getFilesPriorities(h.get_torrent_info().num_files());
|
const std::vector<int> priorities = PropListModel->model()->getFilesPriorities();
|
||||||
// Save first/last piece first option state
|
// Save first/last piece first option state
|
||||||
bool first_last_piece_first = h.first_last_piece_first();
|
bool first_last_piece_first = h.first_last_piece_first();
|
||||||
// Prioritize the files
|
// Prioritize the files
|
||||||
|
@@ -34,11 +34,21 @@
|
|||||||
#include "qmacapplication.h"
|
#include "qmacapplication.h"
|
||||||
|
|
||||||
QMacApplication::QMacApplication(QString appid, int &argc, char** argv) :
|
QMacApplication::QMacApplication(QString appid, int &argc, char** argv) :
|
||||||
QtSingleApplication(appid, argc, argv)
|
QtSingleApplication(appid, argc, argv),
|
||||||
|
m_readyToProcessEvents(false)
|
||||||
{
|
{
|
||||||
qDebug("Constructing a QMacApplication to receive file open events");
|
qDebug("Constructing a QMacApplication to receive file open events");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMacApplication::setReadyToProcessEvents()
|
||||||
|
{
|
||||||
|
m_readyToProcessEvents = true;
|
||||||
|
if (!m_torrentsQueue.isEmpty()) {
|
||||||
|
emit newFileOpenMacEvent(m_torrentsQueue.join("|"));
|
||||||
|
m_torrentsQueue.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool QMacApplication::event(QEvent * ev) {
|
bool QMacApplication::event(QEvent * ev) {
|
||||||
switch (ev->type()) {
|
switch (ev->type()) {
|
||||||
case QEvent::FileOpen:
|
case QEvent::FileOpen:
|
||||||
@@ -49,7 +59,10 @@ bool QMacApplication::event(QEvent * ev) {
|
|||||||
path = static_cast<QFileOpenEvent *>(ev)->url().toString();
|
path = static_cast<QFileOpenEvent *>(ev)->url().toString();
|
||||||
}
|
}
|
||||||
qDebug("Received a mac file open event: %s", qPrintable(path));
|
qDebug("Received a mac file open event: %s", qPrintable(path));
|
||||||
emit newFileOpenMacEvent(path);
|
if (m_readyToProcessEvents)
|
||||||
|
emit newFileOpenMacEvent(path);
|
||||||
|
else
|
||||||
|
m_torrentsQueue.append(path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@@ -31,12 +31,14 @@
|
|||||||
#define QMACAPPLICATION_H
|
#define QMACAPPLICATION_H
|
||||||
|
|
||||||
#include "qtsingleapplication.h"
|
#include "qtsingleapplication.h"
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
class QMacApplication : public QtSingleApplication
|
class QMacApplication : public QtSingleApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QMacApplication(QString appid, int &argc, char** argv);
|
explicit QMacApplication(QString appid, int &argc, char** argv);
|
||||||
|
void setReadyToProcessEvents();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void newFileOpenMacEvent(const QString &path);
|
void newFileOpenMacEvent(const QString &path);
|
||||||
@@ -44,6 +46,9 @@ signals:
|
|||||||
protected:
|
protected:
|
||||||
bool event(QEvent *);
|
bool event(QEvent *);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool m_readyToProcessEvents;
|
||||||
|
QStringList m_torrentsQueue;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QMACAPPLICATION_H
|
#endif // QMACAPPLICATION_H
|
||||||
|
@@ -181,7 +181,7 @@ QBtSession::QBtSession()
|
|||||||
const QString peer_id = "qB";
|
const QString peer_id = "qB";
|
||||||
// Construct session
|
// Construct session
|
||||||
s = new session(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)), 0);
|
s = new session(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)), 0);
|
||||||
std::cout << "Peer ID: " << fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string() << std::endl;
|
//std::cout << "Peer ID: " << fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string() << std::endl;
|
||||||
addConsoleMessage("Peer ID: "+misc::toQString(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string()));
|
addConsoleMessage("Peer ID: "+misc::toQString(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string()));
|
||||||
|
|
||||||
// Set severity level of libtorrent session
|
// Set severity level of libtorrent session
|
||||||
@@ -280,10 +280,10 @@ void QBtSession::processBigRatios() {
|
|||||||
const QString hash = h.hash();
|
const QString hash = h.hash();
|
||||||
const qreal ratio = getRealRatio(hash);
|
const qreal ratio = getRealRatio(hash);
|
||||||
qreal ratio_limit = TorrentPersistentData::getRatioLimit(hash);
|
qreal ratio_limit = TorrentPersistentData::getRatioLimit(hash);
|
||||||
if(ratio_limit == TorrentPersistentData::NO_RATIO_LIMIT)
|
|
||||||
continue;
|
|
||||||
if(ratio_limit == TorrentPersistentData::USE_GLOBAL_RATIO)
|
if(ratio_limit == TorrentPersistentData::USE_GLOBAL_RATIO)
|
||||||
ratio_limit = global_ratio_limit;
|
ratio_limit = global_ratio_limit;
|
||||||
|
if(ratio_limit == TorrentPersistentData::NO_RATIO_LIMIT)
|
||||||
|
continue;
|
||||||
qDebug("Ratio: %f (limit: %f)", ratio, ratio_limit);
|
qDebug("Ratio: %f (limit: %f)", ratio, ratio_limit);
|
||||||
Q_ASSERT(ratio_limit >= 0.f);
|
Q_ASSERT(ratio_limit >= 0.f);
|
||||||
if(ratio <= MAX_RATIO && ratio >= ratio_limit) {
|
if(ratio <= MAX_RATIO && ratio >= ratio_limit) {
|
||||||
@@ -445,7 +445,7 @@ void QBtSession::configureSession() {
|
|||||||
// * Session settings
|
// * Session settings
|
||||||
session_settings sessionSettings = s->settings();
|
session_settings sessionSettings = s->settings();
|
||||||
sessionSettings.user_agent = "qBittorrent "VERSION;
|
sessionSettings.user_agent = "qBittorrent "VERSION;
|
||||||
std::cout << "HTTP user agent is " << sessionSettings.user_agent << std::endl;
|
//std::cout << "HTTP user agent is " << sessionSettings.user_agent << std::endl;
|
||||||
addConsoleMessage(tr("HTTP user agent is %1").arg(misc::toQString(sessionSettings.user_agent)));
|
addConsoleMessage(tr("HTTP user agent is %1").arg(misc::toQString(sessionSettings.user_agent)));
|
||||||
|
|
||||||
sessionSettings.upnp_ignore_nonrouters = true;
|
sessionSettings.upnp_ignore_nonrouters = true;
|
||||||
@@ -972,7 +972,17 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed) {
|
|||||||
add_torrent_params p = initializeAddTorrentParams(hash);
|
add_torrent_params p = initializeAddTorrentParams(hash);
|
||||||
|
|
||||||
// Get save path
|
// Get save path
|
||||||
const QString savePath(getSavePath(hash, false));
|
QString savePath;
|
||||||
|
if (!resumed && savepathLabel_fromurl.contains(magnet_uri)) {
|
||||||
|
QPair<QString, QString> savePath_label = savepathLabel_fromurl.take(magnet_uri);
|
||||||
|
if(!savePath_label.first.isEmpty())
|
||||||
|
savePath = savePath_label.first;
|
||||||
|
// Remember label
|
||||||
|
if(!savePath_label.second.isEmpty())
|
||||||
|
TorrentTempData::setLabel(hash, savePath_label.second);
|
||||||
|
}
|
||||||
|
if (savePath.isEmpty())
|
||||||
|
savePath = getSavePath(hash, false);
|
||||||
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && resumed) {
|
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && resumed) {
|
||||||
qDebug("addMagnetURI: Temp folder is enabled.");
|
qDebug("addMagnetURI: Temp folder is enabled.");
|
||||||
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
|
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
|
||||||
@@ -2775,14 +2785,22 @@ void QBtSession::downloadFromURLList(const QStringList& urls) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBtSession::addMagnetSkipAddDlg(QString uri) {
|
void QBtSession::addMagnetInteractive(const QString& uri)
|
||||||
|
{
|
||||||
|
emit newMagnetLink(uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label) {
|
||||||
|
if (!save_path.isEmpty() || !label.isEmpty())
|
||||||
|
savepathLabel_fromurl[uri] = qMakePair(save_path, label);
|
||||||
addMagnetUri(uri, false);
|
addMagnetUri(uri, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label) {
|
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label) {
|
||||||
//emit aboutToDownloadFromUrl(url);
|
//emit aboutToDownloadFromUrl(url);
|
||||||
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
||||||
savepathLabel_fromurl[qurl] = qMakePair(save_path, label);
|
if (!save_path.isEmpty() || !label.isEmpty())
|
||||||
|
savepathLabel_fromurl[qurl] = qMakePair(save_path, label);
|
||||||
url_skippingDlg << qurl;
|
url_skippingDlg << qurl;
|
||||||
// Launch downloader thread
|
// Launch downloader thread
|
||||||
downloader->downloadTorrentUrl(url);
|
downloader->downloadTorrentUrl(url);
|
||||||
|
@@ -164,7 +164,8 @@ public slots:
|
|||||||
#endif
|
#endif
|
||||||
void addPeerBanMessage(QString msg, bool from_ipfilter);
|
void addPeerBanMessage(QString msg, bool from_ipfilter);
|
||||||
void processDownloadedFile(QString, QString);
|
void processDownloadedFile(QString, QString);
|
||||||
void addMagnetSkipAddDlg(QString uri);
|
void addMagnetSkipAddDlg(const QString& uri, const QString& save_path = QString(), const QString& label = QString());
|
||||||
|
void addMagnetInteractive(const QString& uri);
|
||||||
void downloadFromURLList(const QStringList& urls);
|
void downloadFromURLList(const QStringList& urls);
|
||||||
void configureSession();
|
void configureSession();
|
||||||
void banIP(QString ip);
|
void banIP(QString ip);
|
||||||
@@ -205,6 +206,7 @@ signals:
|
|||||||
void trackerError(const QString &hash, QString time, QString msg);
|
void trackerError(const QString &hash, QString time, QString msg);
|
||||||
void trackerAuthenticationRequired(const QTorrentHandle& h);
|
void trackerAuthenticationRequired(const QTorrentHandle& h);
|
||||||
void newDownloadedTorrent(QString path, QString url);
|
void newDownloadedTorrent(QString path, QString url);
|
||||||
|
void newMagnetLink(const QString& link);
|
||||||
void updateFileSize(const QString &hash);
|
void updateFileSize(const QString &hash);
|
||||||
void downloadFromUrlFailure(QString url, QString reason);
|
void downloadFromUrlFailure(QString url, QString reason);
|
||||||
void torrentFinishedChecking(const QTorrentHandle& h);
|
void torrentFinishedChecking(const QTorrentHandle& h);
|
||||||
|
@@ -326,23 +326,28 @@ void RSSImp::downloadTorrent() {
|
|||||||
foreach(const QListWidgetItem* item, selected_items) {
|
foreach(const QListWidgetItem* item, selected_items) {
|
||||||
const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString())
|
const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString())
|
||||||
->getItem(item->data(Article::IdRole).toString());
|
->getItem(item->data(Article::IdRole).toString());
|
||||||
// Load possible cookies
|
|
||||||
QList<QNetworkCookie> cookies;
|
QString torrentLink = article.hasAttachment() ? article.torrentUrl() : article.link();
|
||||||
QString feed_url = m_feedList->getItemID(m_feedList->selectedItems().first());
|
|
||||||
QString feed_hostname = QUrl::fromEncoded(feed_url.toUtf8()).host();
|
// Check if it is a magnet link
|
||||||
const QList<QByteArray> raw_cookies = RssSettings().getHostNameCookies(feed_hostname);
|
if (torrentLink.startsWith("magnet:", Qt::CaseInsensitive))
|
||||||
foreach (const QByteArray& raw_cookie, raw_cookies) {
|
QBtSession::instance()->addMagnetInteractive(torrentLink);
|
||||||
QList<QByteArray> cookie_parts = raw_cookie.split('=');
|
else {
|
||||||
if (cookie_parts.size() == 2) {
|
// Load possible cookies
|
||||||
qDebug("Loading cookie: %s = %s", cookie_parts.first().constData(), cookie_parts.last().constData());
|
QList<QNetworkCookie> cookies;
|
||||||
cookies << QNetworkCookie(cookie_parts.first(), cookie_parts.last());
|
QString feed_url = m_feedList->getItemID(m_feedList->selectedItems().first());
|
||||||
|
QString feed_hostname = QUrl::fromEncoded(feed_url.toUtf8()).host();
|
||||||
|
const QList<QByteArray> raw_cookies = RssSettings().getHostNameCookies(feed_hostname);
|
||||||
|
foreach (const QByteArray& raw_cookie, raw_cookies) {
|
||||||
|
QList<QByteArray> cookie_parts = raw_cookie.split('=');
|
||||||
|
if (cookie_parts.size() == 2) {
|
||||||
|
qDebug("Loading cookie: %s = %s", cookie_parts.first().constData(), cookie_parts.last().constData());
|
||||||
|
cookies << QNetworkCookie(cookie_parts.first(), cookie_parts.last());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
qDebug("Loaded %d cookies for RSS item\n", cookies.size());
|
||||||
qDebug("Loaded %d cookies for RSS item\n", cookies.size());
|
|
||||||
if (article.hasAttachment()) {
|
QBtSession::instance()->downloadFromUrl(torrentLink, cookies);
|
||||||
QBtSession::instance()->downloadFromUrl(article.torrentUrl(), cookies);
|
|
||||||
} else {
|
|
||||||
QBtSession::instance()->downloadFromUrl(article.link(), cookies);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -314,7 +314,10 @@ void RssFeed::downloadMatchingArticleTorrents() {
|
|||||||
item.markAsRead();
|
item.markAsRead();
|
||||||
// Download the torrent
|
// Download the torrent
|
||||||
QBtSession::instance()->addConsoleMessage(tr("Automatically downloading %1 torrent from %2 RSS feed...").arg(item.title()).arg(displayName()));
|
QBtSession::instance()->addConsoleMessage(tr("Automatically downloading %1 torrent from %2 RSS feed...").arg(item.title()).arg(displayName()));
|
||||||
QBtSession::instance()->downloadUrlAndSkipDialog(torrent_url, matching_rule.savePath(), matching_rule.label());
|
if (torrent_url.startsWith("magnet:", Qt::CaseInsensitive))
|
||||||
|
QBtSession::instance()->addMagnetSkipAddDlg(torrent_url, matching_rule.savePath(), matching_rule.label());
|
||||||
|
else
|
||||||
|
QBtSession::instance()->downloadUrlAndSkipDialog(torrent_url, matching_rule.savePath(), matching_rule.label());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -501,10 +501,8 @@ void torrentAdditionDialog::updateDiskSpaceLabels() {
|
|||||||
// Determine torrent size
|
// Determine torrent size
|
||||||
qulonglong torrent_size = 0;
|
qulonglong torrent_size = 0;
|
||||||
if(t->num_files() > 1) {
|
if(t->num_files() > 1) {
|
||||||
const unsigned int nbFiles = t->num_files();
|
const std::vector<int> priorities = PropListModel->model()->getFilesPriorities();
|
||||||
const std::vector<int> priorities = PropListModel->model()->getFilesPriorities(nbFiles);
|
for(unsigned int i=0; i<priorities.size(); ++i) {
|
||||||
|
|
||||||
for(unsigned int i=0; i<nbFiles; ++i) {
|
|
||||||
if(priorities[i] > 0)
|
if(priorities[i] > 0)
|
||||||
torrent_size += t->file_at(i).size;
|
torrent_size += t->file_at(i).size;
|
||||||
}
|
}
|
||||||
@@ -598,7 +596,7 @@ bool torrentAdditionDialog::allFiltered() const {
|
|||||||
void torrentAdditionDialog::savePiecesPriorities(){
|
void torrentAdditionDialog::savePiecesPriorities(){
|
||||||
qDebug("Saving pieces priorities");
|
qDebug("Saving pieces priorities");
|
||||||
Q_ASSERT(!is_magnet);
|
Q_ASSERT(!is_magnet);
|
||||||
const std::vector<int> priorities = PropListModel->model()->getFilesPriorities(t->num_files());
|
const std::vector<int> priorities = PropListModel->model()->getFilesPriorities();
|
||||||
TorrentTempData::setFilesPriority(hash, priorities);
|
TorrentTempData::setFilesPriority(hash, priorities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -338,11 +338,10 @@ class TorrentFilesModel: public QAbstractItemModel {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TorrentFileItem *rootItem;
|
TorrentFileItem *rootItem;
|
||||||
TorrentFileItem **files_index;
|
std::vector<TorrentFileItem *> files_index;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TorrentFilesModel(QObject *parent=0): QAbstractItemModel(parent) {
|
TorrentFilesModel(QObject *parent=0): QAbstractItemModel(parent) {
|
||||||
files_index = 0;
|
|
||||||
QList<QVariant> rootData;
|
QList<QVariant> rootData;
|
||||||
rootData << tr("Name") << tr("Size") << tr("Progress") << tr("Priority");
|
rootData << tr("Name") << tr("Size") << tr("Progress") << tr("Priority");
|
||||||
rootItem = new TorrentFileItem(rootData);
|
rootItem = new TorrentFileItem(rootData);
|
||||||
@@ -350,13 +349,16 @@ public:
|
|||||||
|
|
||||||
~TorrentFilesModel() {
|
~TorrentFilesModel() {
|
||||||
qDebug() << Q_FUNC_INFO << "ENTER";
|
qDebug() << Q_FUNC_INFO << "ENTER";
|
||||||
delete [] files_index;
|
|
||||||
delete rootItem;
|
delete rootItem;
|
||||||
qDebug() << Q_FUNC_INFO << "EXIT";
|
qDebug() << Q_FUNC_INFO << "EXIT";
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateFilesProgress(std::vector<libtorrent::size_type> fp) {
|
void updateFilesProgress(const std::vector<libtorrent::size_type>& fp) {
|
||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
|
|
||||||
|
if (fp.size() != files_index.size())
|
||||||
|
return;
|
||||||
|
|
||||||
for(unsigned int i=0; i<fp.size(); ++i) {
|
for(unsigned int i=0; i<fp.size(); ++i) {
|
||||||
Q_ASSERT(fp[i] >= 0);
|
Q_ASSERT(fp[i] >= 0);
|
||||||
files_index[i]->setProgress(fp[i]);
|
files_index[i]->setProgress(fp[i]);
|
||||||
@@ -366,6 +368,10 @@ public:
|
|||||||
|
|
||||||
void updateFilesPriorities(const std::vector<int> &fprio) {
|
void updateFilesPriorities(const std::vector<int> &fprio) {
|
||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
|
|
||||||
|
if (fprio.size() != files_index.size())
|
||||||
|
return;
|
||||||
|
|
||||||
for(unsigned int i=0; i<fprio.size(); ++i) {
|
for(unsigned int i=0; i<fprio.size(); ++i) {
|
||||||
//qDebug("Called updateFilesPriorities with %d", fprio[i]);
|
//qDebug("Called updateFilesPriorities with %d", fprio[i]);
|
||||||
files_index[i]->setPriority(fprio[i]);
|
files_index[i]->setPriority(fprio[i]);
|
||||||
@@ -373,9 +379,9 @@ public:
|
|||||||
emit dataChanged(index(0,0), index(rowCount(), columnCount()));
|
emit dataChanged(index(0,0), index(rowCount(), columnCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> getFilesPriorities(unsigned int nbFiles) const {
|
std::vector<int> getFilesPriorities() const {
|
||||||
std::vector<int> prio;
|
std::vector<int> prio;
|
||||||
for(unsigned int i=0; i<nbFiles; ++i) {
|
for(unsigned int i=0; i<files_index.size(); ++i) {
|
||||||
//qDebug("Called getFilesPriorities: %d", files_index[i]->getPriority());
|
//qDebug("Called getFilesPriorities: %d", files_index[i]->getPriority());
|
||||||
prio.push_back(files_index[i]->getPriority());
|
prio.push_back(files_index[i]->getPriority());
|
||||||
}
|
}
|
||||||
@@ -541,10 +547,7 @@ public:
|
|||||||
void clear() {
|
void clear() {
|
||||||
qDebug("clear called");
|
qDebug("clear called");
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
if(files_index) {
|
files_index.clear();
|
||||||
delete [] files_index;
|
|
||||||
files_index = 0;
|
|
||||||
}
|
|
||||||
rootItem->deleteAllChildren();
|
rootItem->deleteAllChildren();
|
||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
@@ -555,7 +558,7 @@ public:
|
|||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
// Initialize files_index array
|
// Initialize files_index array
|
||||||
qDebug("Torrent contains %d files", t.num_files());
|
qDebug("Torrent contains %d files", t.num_files());
|
||||||
files_index = new TorrentFileItem*[t.num_files()];
|
files_index.reserve(t.num_files());
|
||||||
|
|
||||||
TorrentFileItem *parent = this->rootItem;
|
TorrentFileItem *parent = this->rootItem;
|
||||||
TorrentFileItem *root_folder = parent;
|
TorrentFileItem *root_folder = parent;
|
||||||
@@ -582,8 +585,7 @@ public:
|
|||||||
current_parent = new_parent;
|
current_parent = new_parent;
|
||||||
}
|
}
|
||||||
// Actually create the file
|
// Actually create the file
|
||||||
TorrentFileItem *f = new TorrentFileItem(t, fentry, current_parent, i);
|
files_index.push_back(new TorrentFileItem(t, fentry, current_parent, i));
|
||||||
files_index[i] = f;
|
|
||||||
}
|
}
|
||||||
emit layoutChanged();
|
emit layoutChanged();
|
||||||
}
|
}
|
||||||
|
@@ -109,7 +109,10 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
|
|||||||
h.file_progress(fp);
|
h.file_progress(fp);
|
||||||
for(int i=0; i<h.num_files(); ++i) {
|
for(int i=0; i<h.num_files(); ++i) {
|
||||||
QVariantMap file;
|
QVariantMap file;
|
||||||
file["name"] = h.filename_at(i);
|
QString fileName = h.filename_at(i);
|
||||||
|
if (fileName.endsWith(".!qB"))
|
||||||
|
fileName.chop(4);
|
||||||
|
file["name"] = fileName;
|
||||||
libtorrent::size_type size = h.filesize_at(i);
|
libtorrent::size_type size = h.filesize_at(i);
|
||||||
file["size"] = misc::friendlyUnit((double)size);
|
file["size"] = misc::friendlyUnit((double)size);
|
||||||
if(size > 0)
|
if(size > 0)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<img src="../images/skin/mascot.png" align="right"></img>
|
<img src="images/skin/mascot.png" align="right"></img>
|
||||||
<p>qBittorrent ${VERSION} (Web UI)</p>
|
<p>qBittorrent ${VERSION} (Web UI)</p>
|
||||||
<p>Copyright (c) 2011 <a href="mailto:chris@qbittorrent.org">Christophe Dumez</a></p>
|
<p>Copyright (c) 2011 <a href="mailto:chris@qbittorrent.org">Christophe Dumez</a></p>
|
||||||
<p>Homepage: <a href="http://www.qbittorrent.com">http://www.qbittorrent.com</a></p>
|
<p>Homepage: <a href="http://www.qbittorrent.com">http://www.qbittorrent.com</a></p>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
$('addTrackersButton').addEvent('click', function(e){
|
$('addTrackersButton').addEvent('click', function(e){
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
var hash = new URI().getData('hash');
|
var hash = new URI().getData('hash');
|
||||||
new Request({url: '/command/addTrackers', method: 'post', data: {hash: hash, urls: $('trackersUrls').value},
|
new Request({url: 'command/addTrackers', method: 'post', data: {hash: hash, urls: $('trackersUrls').value},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
window.parent.document.getElementById('trackersPage').parentNode.removeChild(window.parent.document.getElementById('trackersPage'));
|
window.parent.document.getElementById('trackersPage').parentNode.removeChild(window.parent.document.getElementById('trackersPage'));
|
||||||
}
|
}
|
||||||
|
@@ -45,9 +45,9 @@ window.addEvent('domready', function(){
|
|||||||
});
|
});
|
||||||
$('confirmBtn').addEvent('click', function(e){
|
$('confirmBtn').addEvent('click', function(e){
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
var cmd = '/command/delete';
|
var cmd = 'command/delete';
|
||||||
if($('deleteFromDiskCB').get('checked'))
|
if($('deleteFromDiskCB').get('checked'))
|
||||||
cmd = '/command/deletePerm';
|
cmd = 'command/deletePerm';
|
||||||
new Request({url: cmd,
|
new Request({url: cmd,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {hashes: hashes.join('|')},
|
data: {hashes: hashes.join('|')},
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
setDlLimit = function() {
|
setDlLimit = function() {
|
||||||
var limit = $("dllimitUpdatevalue").get('html').toInt() * 1024;
|
var limit = $("dllimitUpdatevalue").get('html').toInt() * 1024;
|
||||||
if(hash == "global") {
|
if(hash == "global") {
|
||||||
new Request({url: '/command/setGlobalDlLimit',
|
new Request({url: 'command/setGlobalDlLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {'limit': limit},
|
data: {'limit': limit},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
}).send();
|
}).send();
|
||||||
} else {
|
} else {
|
||||||
new Request({url: '/command/setTorrentDlLimit',
|
new Request({url: 'command/setTorrentDlLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {'hash': hash, 'limit': limit},
|
data: {'hash': hash, 'limit': limit},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
@@ -51,4 +51,4 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -196,7 +196,7 @@
|
|||||||
|
|
||||||
<fieldset class="settings">
|
<fieldset class="settings">
|
||||||
<legend>_(Torrent Queueing)</legend>
|
<legend>_(Torrent Queueing)</legend>
|
||||||
<input type="checkbox" id="queueing_checkbox" onclick="updateQueuingSystem();"/>
|
<input type="checkbox" id="queueing_checkbox" onclick="updateQueueingSystem();"/>
|
||||||
<label for="queueing_checkbox">_(Torrent Queueing)</label><br/>
|
<label for="queueing_checkbox">_(Torrent Queueing)</label><br/>
|
||||||
<div class="formRow">
|
<div class="formRow">
|
||||||
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active downloads:)</label>
|
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active downloads:)</label>
|
||||||
@@ -1043,7 +1043,7 @@ applyPreferences = function() {
|
|||||||
// Send it to qBT
|
// Send it to qBT
|
||||||
var json_str = JSON.encode(settings);
|
var json_str = JSON.encode(settings);
|
||||||
|
|
||||||
new Request({url: '/command/setPreferences',
|
new Request({url: 'command/setPreferences',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {'json': json_str,
|
data: {'json': json_str,
|
||||||
},
|
},
|
||||||
|
@@ -88,7 +88,7 @@ var allCBUnchecked = function() {
|
|||||||
|
|
||||||
var setFilePriority = function(id, priority) {
|
var setFilePriority = function(id, priority) {
|
||||||
if(current_hash == "") return;
|
if(current_hash == "") return;
|
||||||
new Request({url: '/command/setFilePrio', method: 'post', data: {'hash': current_hash, 'id': id, 'priority': priority}}).send();
|
new Request({url: 'command/setFilePrio', method: 'post', data: {'hash': current_hash, 'id': id, 'priority': priority}}).send();
|
||||||
// Display or add combobox
|
// Display or add combobox
|
||||||
if(priority > 0) {
|
if(priority > 0) {
|
||||||
$('comboPrio'+id).set("value", 1);
|
$('comboPrio'+id).set("value", 1);
|
||||||
|
@@ -15,7 +15,7 @@ function hideAll() {
|
|||||||
<iframe id="upload_frame" name="upload_frame" style="width:1px;height:1px;border:0px;" src="javascript:false;"></iframe>
|
<iframe id="upload_frame" name="upload_frame" style="width:1px;height:1px;border:0px;" src="javascript:false;"></iframe>
|
||||||
<center>
|
<center>
|
||||||
<h1 class="vcenter"><img class="vcenter" title="Download local torrent" src="theme/list-add"/>_(Download local torrent)</h1>
|
<h1 class="vcenter"><img class="vcenter" title="Download local torrent" src="theme/list-add"/>_(Download local torrent)</h1>
|
||||||
<form action="/command/upload" enctype="multipart/form-data" method="post" id="uploadForm" target="upload_frame">
|
<form action="command/upload" enctype="multipart/form-data" method="post" id="uploadForm" target="upload_frame">
|
||||||
<input type="file" name="torrentfile" id="torrentfile" size="40"/><br/><br/>
|
<input type="file" name="torrentfile" id="torrentfile" size="40"/><br/><br/>
|
||||||
<input type="submit" value="_(Download)" id="upButton"/>
|
<input type="submit" value="_(Download)" id="upButton"/>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
setUpLimit = function() {
|
setUpLimit = function() {
|
||||||
var limit = $("uplimitUpdatevalue").get('html').toInt() * 1024;
|
var limit = $("uplimitUpdatevalue").get('html').toInt() * 1024;
|
||||||
if(hash == "global") {
|
if(hash == "global") {
|
||||||
new Request({url: '/command/setGlobalUpLimit',
|
new Request({url: 'command/setGlobalUpLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {'limit': limit},
|
data: {'limit': limit},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
}).send();
|
}).send();
|
||||||
}else {
|
}else {
|
||||||
new Request({url: '/command/setTorrentUpLimit',
|
new Request({url: 'command/setTorrentUpLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {'hash': hash, 'limit': limit},
|
data: {'hash': hash, 'limit': limit},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
@@ -51,4 +51,4 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -103,7 +103,7 @@ void HttpConnection::read() {
|
|||||||
const int expected_length = m_parser.header().contentLength();
|
const int expected_length = m_parser.header().contentLength();
|
||||||
QByteArray message = input.mid(header_end + 4, expected_length);
|
QByteArray message = input.mid(header_end + 4, expected_length);
|
||||||
|
|
||||||
if (expected_length > 100000) {
|
if (expected_length > 10000000) {
|
||||||
qWarning() << "Bad request: message too long";
|
qWarning() << "Bad request: message too long";
|
||||||
m_generator.setStatusLine(400, "Bad Request");
|
m_generator.setStatusLine(400, "Bad Request");
|
||||||
input.clear();
|
input.clear();
|
||||||
|
@@ -58,8 +58,8 @@ void HttpResponseGenerator::setContentTypeByExt(const QString& ext) {
|
|||||||
setContentType("text/javascript");
|
setContentType("text/javascript");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(ext == "png") {
|
if (ext == "png") {
|
||||||
setContentType("image/x-png");
|
setContentType("image/png");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ window.addEvent('domready', function(){
|
|||||||
$('urls').focus();
|
$('urls').focus();
|
||||||
$('downButton').addEvent('click', function(e){
|
$('downButton').addEvent('click', function(e){
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
new Request({url: '/command/download', method: 'post', data: {urls: $('urls').value},
|
new Request({url: 'command/download', method: 'post', data: {urls: $('urls').value},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
window.parent.document.getElementById('downloadPage').parentNode.removeChild(window.parent.document.getElementById('downloadPage'));
|
window.parent.document.getElementById('downloadPage').parentNode.removeChild(window.parent.document.getElementById('downloadPage'));
|
||||||
}
|
}
|
||||||
|
@@ -152,7 +152,7 @@ initializeWindows = function(){
|
|||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
/*if(h.length && confirm('_(Are you sure you want to delete the selected torrents from the transfer list?)')) {
|
/*if(h.length && confirm('_(Are you sure you want to delete the selected torrents from the transfer list?)')) {
|
||||||
h.each(function(item, index){
|
h.each(function(item, index){
|
||||||
new Request({url: '/command/delete', method: 'post', data: {hash: item}}).send();
|
new Request({url: 'command/delete', method: 'post', data: {hash: item}}).send();
|
||||||
});
|
});
|
||||||
}*/
|
}*/
|
||||||
if(h.length) {
|
if(h.length) {
|
||||||
@@ -180,7 +180,7 @@ initializeWindows = function(){
|
|||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
if(h.length){
|
if(h.length){
|
||||||
h.each(function(hash, index){
|
h.each(function(hash, index){
|
||||||
new Request({url: '/command/pause', method: 'post', data: {hash: hash}}).send();
|
new Request({url: 'command/pause', method: 'post', data: {hash: hash}}).send();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -189,7 +189,7 @@ initializeWindows = function(){
|
|||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
if(h.length){
|
if(h.length){
|
||||||
h.each(function(hash, index){
|
h.each(function(hash, index){
|
||||||
new Request({url: '/command/resume', method: 'post', data: {hash: hash}}).send();
|
new Request({url: 'command/resume', method: 'post', data: {hash: hash}}).send();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -198,7 +198,7 @@ initializeWindows = function(){
|
|||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
if(h.length){
|
if(h.length){
|
||||||
h.each(function(hash, index){
|
h.each(function(hash, index){
|
||||||
new Request({url: '/command/recheck', method: 'post', data: {hash: hash}}).send();
|
new Request({url: 'command/recheck', method: 'post', data: {hash: hash}}).send();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -209,14 +209,14 @@ initializeWindows = function(){
|
|||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
if(h.length){
|
if(h.length){
|
||||||
h.each(function(hash, index){
|
h.each(function(hash, index){
|
||||||
new Request({url: '/command/'+item, method: 'post', data: {hash: hash}}).send();
|
new Request({url: 'command/'+item, method: 'post', data: {hash: hash}}).send();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addClickEvent(item+'All', function(e){
|
addClickEvent(item+'All', function(e){
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
new Request({url: '/command/'+item+'all'}).send();
|
new Request({url: 'command/'+item+'all'}).send();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ initializeWindows = function(){
|
|||||||
setPriorityFN = function(cmd) {
|
setPriorityFN = function(cmd) {
|
||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
if(h.length) {
|
if(h.length) {
|
||||||
new Request({url: '/command/'+cmd, method: 'post', data: {hashes: h.join("|")}}).send();
|
new Request({url: 'command/'+cmd, method: 'post', data: {hashes: h.join("|")}}).send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ MochaUI.extend({
|
|||||||
// Get global upload limit
|
// Get global upload limit
|
||||||
var maximum = 500;
|
var maximum = 500;
|
||||||
var req = new Request({
|
var req = new Request({
|
||||||
url: '/command/getGlobalUpLimit',
|
url: 'command/getGlobalUpLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {},
|
data: {},
|
||||||
onSuccess: function(data) {
|
onSuccess: function(data) {
|
||||||
@@ -64,7 +64,7 @@ MochaUI.extend({
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var req = new Request({
|
var req = new Request({
|
||||||
url: '/command/getTorrentUpLimit',
|
url: 'command/getTorrentUpLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {hash: hash},
|
data: {hash: hash},
|
||||||
onSuccess: function(data) {
|
onSuccess: function(data) {
|
||||||
@@ -109,7 +109,7 @@ MochaUI.extend({
|
|||||||
// Get global upload limit
|
// Get global upload limit
|
||||||
var maximum = 500;
|
var maximum = 500;
|
||||||
var req = new Request({
|
var req = new Request({
|
||||||
url: '/command/getGlobalDlLimit',
|
url: 'command/getGlobalDlLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {},
|
data: {},
|
||||||
onSuccess: function(data) {
|
onSuccess: function(data) {
|
||||||
@@ -151,7 +151,7 @@ MochaUI.extend({
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var req = new Request({
|
var req = new Request({
|
||||||
url: '/command/getTorrentDlLimit',
|
url: 'command/getTorrentDlLimit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {hash: hash},
|
data: {hash: hash},
|
||||||
onSuccess: function(data) {
|
onSuccess: function(data) {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# Generated by the configure file
|
# Generated by the configure file
|
||||||
include(conf.pri)
|
include($$OUT_PWD/../conf.pri)
|
||||||
|
|
||||||
# COMPILATION SPECIFIC
|
# COMPILATION SPECIFIC
|
||||||
!nox:dbus {
|
!nox:dbus {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
PROJECT_NAME = qbittorrent
|
PROJECT_NAME = qbittorrent
|
||||||
PROJECT_VERSION = 2.9.9
|
PROJECT_VERSION = 2.9.10
|
||||||
|
|
||||||
os2 {
|
os2 {
|
||||||
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
||||||
@@ -9,4 +9,4 @@ os2 {
|
|||||||
|
|
||||||
DEFINES += VERSION_MAJOR=2
|
DEFINES += VERSION_MAJOR=2
|
||||||
DEFINES += VERSION_MINOR=9
|
DEFINES += VERSION_MINOR=9
|
||||||
DEFINES += VERSION_BUGFIX=9
|
DEFINES += VERSION_BUGFIX=10
|
||||||
|
Reference in New Issue
Block a user