Compare commits
1 Commits
release-1.
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c490fcb39 |
37
Changelog
@@ -1,30 +1,4 @@
|
||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
|
||||
- FEATURE: Added Magnet URI support
|
||||
- FEATURE: Search engine supports category-based requests
|
||||
- FEATURE: Make use of torrent enclosure in RSS feeds for direct download
|
||||
- FEATURE: Implemented a RSS feed downloader with filter support
|
||||
- FEATURE: Save old RSS item to hard disk to remember them on start up
|
||||
- FEATURE: Display free disk space in torrent addition dialog
|
||||
- FEATURE: In torrent addition from URL, paste clipboard content if it contains an URL
|
||||
- FEATURE: RSS feeds URLs can now be copied to clipboard
|
||||
- FEATURE: RSS feeds can now be grouped into folders
|
||||
- FEATURE: Added "Unread" item to RSS feed list to display all unread news
|
||||
- FEATURE: If a torrent contains a torrent file, process downloaded torrent file too
|
||||
- FEATURE: A random listening port can be chosen automatically
|
||||
- BUGFIX: torrent resume code rewrited
|
||||
- BUGFIX: Greatly improved column sorting code
|
||||
- BUGFIX: Possibility to create trackerless torrents
|
||||
- COSMETIC: Redesigned search tab to improve usability
|
||||
- COSMETIC: Redesigned RSS tab to improve usability
|
||||
|
||||
* Sun Aug 21 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.1
|
||||
- BUGFIX: Fix problems when changing save path (if using temporary download folder)
|
||||
- BUGFIX: Display real save path instead of the temporary one in torrent properties
|
||||
- BUGFIX: Catching invalid_handle exception to avoid rare crashes
|
||||
- BUGFIX: Fixed popup menu position in RSS feeds list
|
||||
- BUGFIX: Don't save RSS feed state if it could not be updated
|
||||
|
||||
* Thu Aug 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
|
||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
|
||||
- FEATURE: Display swarm information in lists
|
||||
- FEATURE: Allow to define temporary download folder
|
||||
- FEATURE: Display total amount of uploaded data in finished list
|
||||
@@ -32,20 +6,11 @@
|
||||
- FEATURE: Search results tab columns are now remembered upon startup
|
||||
- FEATURE: Added right click menu in search engine to clear completion history
|
||||
- FEATURE: Allow to set a different port for DHT (UDP) than the one used for Bittorrent
|
||||
- FEATURE: Updated spoofing code to avoid trackers ban
|
||||
- BUGFIX: Provide more helpful explanation when an I/O error occured
|
||||
- BUGFIX: Stop enforcing UTF-8 and use system locale instead
|
||||
- COSMETIC: Redesigned program preferences
|
||||
- COSMETIC: Updated icons set
|
||||
|
||||
* Fri Jul 24 2009 - Christophe DUMEZ <chris@qbittorrent.org> - 1.3.5
|
||||
- BUGFIX: Made IP filter parser more robust
|
||||
- BUGFIX: Fixed torrent creation tool
|
||||
- BUGFIX: Fixed possible overflow in progress calculation in arborescence.h
|
||||
- BUGFIX: Save properties window size, position, columns width and restore them
|
||||
- BUGFIX: Set a minimum default width for NAME column in properties
|
||||
- BUGFIX: Remember visual indexes of columns in transfer lists
|
||||
|
||||
* Sun Jul 12 2009 - Christophe DUMEZ <chris@qbittorrent.org> - v1.3.4
|
||||
- BUGFIX: Fixed IP filter file parsing on 64bits
|
||||
- BUGFIX: Suppressed QLayout: Attempting to add QLayout "" to properties "properties" warning message when opening a properties dialog
|
||||
|
95
configure
vendored
@@ -18,6 +18,11 @@ Main options:
|
||||
--help This help text.
|
||||
|
||||
Dependency options:
|
||||
--with-libtorrent-inc=[path] Path to libtorrent-rasterbar include
|
||||
files
|
||||
--with-libtorrent-lib=[path] Path to libtorrent-rasterbar library
|
||||
files
|
||||
--with-libtorrent-static-lib=[path] Path to libtorrent-rasterbar .a file
|
||||
--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
|
||||
@@ -140,6 +145,21 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-inc=*)
|
||||
QC_WITH_LIBTORRENT_INC=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-lib=*)
|
||||
QC_WITH_LIBTORRENT_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-static-lib=*)
|
||||
QC_WITH_LIBTORRENT_STATIC_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libboost-inc=*)
|
||||
QC_WITH_LIBBOOST_INC=$optarg
|
||||
shift
|
||||
@@ -191,6 +211,9 @@ echo PREFIX=$PREFIX
|
||||
echo BINDIR=$BINDIR
|
||||
echo DATADIR=$DATADIR
|
||||
echo EX_QTDIR=$EX_QTDIR
|
||||
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||
echo QC_WITH_LIBTORRENT_STATIC_LIB=$QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
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
|
||||
@@ -323,29 +346,70 @@ public:
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent-rasterbar
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
// see Conf::findPkgConfig
|
||||
class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.14.4 advised)"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString adv_ver = "0.14.4";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||
return false;
|
||||
for(int n = 0; n < incs.count(); ++n)
|
||||
conf->addIncludePath(incs[n]);
|
||||
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. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toUtf8().data(), adv_ver.toUtf8().data());
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/magnet_uri.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||
conf->addLib(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||
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(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1503,6 +1567,9 @@ export PREFIX
|
||||
export BINDIR
|
||||
export DATADIR
|
||||
export EX_QTDIR
|
||||
export QC_WITH_LIBTORRENT_INC
|
||||
export QC_WITH_LIBTORRENT_LIB
|
||||
export QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
export QC_WITH_LIBBOOST_INC
|
||||
export QC_WITH_LIBCURL_INC
|
||||
export QC_WITH_LIBCURL_LIB
|
||||
|
@@ -64,11 +64,14 @@ public:
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
QString out = "";
|
||||
QProcess magickConfig;
|
||||
QStringList params;
|
||||
params << "--libs";
|
||||
qconf->doCommand("Magick++-config", params, &out);
|
||||
out = out.replace("\n", "");
|
||||
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||
magickConfig.waitForStarted();
|
||||
magickConfig.waitForFinished();
|
||||
QByteArray result = magickConfig.readAll();
|
||||
result = result.replace("\n", "");
|
||||
conf->addLib(result.data());
|
||||
conf->addDefine("HAVE_MAGICK");
|
||||
return true;
|
||||
|
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent-rasterbar
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
// see Conf::findPkgConfig
|
||||
@@ -8,22 +11,61 @@ class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.14.4 advised)"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString adv_ver = "0.14.4";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||
return false;
|
||||
for(int n = 0; n < incs.count(); ++n)
|
||||
conf->addIncludePath(incs[n]);
|
||||
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. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/magnet_uri.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||
conf->addLib(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||
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(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
@@ -35,7 +35,6 @@
|
||||
#include "qtorrenthandle.h"
|
||||
|
||||
class QStandardItemModel;
|
||||
class QSortFilterProxyModel;
|
||||
class bittorrent;
|
||||
class FinishedListDelegate;
|
||||
|
||||
@@ -48,7 +47,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
bittorrent *BTSession;
|
||||
FinishedListDelegate *finishedListDelegate;
|
||||
QStandardItemModel *finishedListModel;
|
||||
QSortFilterProxyModel *proxyModel;
|
||||
unsigned int nbFinished;
|
||||
void hideOrShowColumn(int index);
|
||||
bool loadHiddenColumns();
|
||||
@@ -71,6 +69,10 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void displayFinishedHoSMenu(const QPoint&);
|
||||
void setRowColor(int row, QString color);
|
||||
void saveColWidthFinishedList() const;
|
||||
void toggleFinishedListSortOrder(int index);
|
||||
void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder);
|
||||
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
||||
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
||||
void updateFileSize(QString hash);
|
||||
void on_actionSet_upload_limit_triggered();
|
||||
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
||||
@@ -91,8 +93,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void deleteTorrent(QString hash);
|
||||
void showPropertiesFromHash(QString hash);
|
||||
void loadLastSortedColumn();
|
||||
void saveLastSortedColumn();
|
||||
void updateMetadata(QTorrentHandle &h);
|
||||
|
||||
signals:
|
||||
void torrentMovedFromFinishedList(QString);
|
||||
|
84
src/GUI.cpp
@@ -34,7 +34,6 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QStatusBar>
|
||||
#include <QFrame>
|
||||
#include <QClipboard>
|
||||
#ifdef QT_4_4
|
||||
#include <QLocalServer>
|
||||
#include <QLocalSocket>
|
||||
@@ -68,7 +67,6 @@
|
||||
#include <stdlib.h>
|
||||
#include "console_imp.h"
|
||||
#include "httpserver.h"
|
||||
#include "torrentPersistentData.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
@@ -144,7 +142,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
connect(BTSession, SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString)));
|
||||
connect(BTSession, SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString)));
|
||||
connect(BTSession, SIGNAL(deletedTorrent(QString)), this, SLOT(deleteTorrent(QString)));
|
||||
connect(BTSession, SIGNAL(torrentPaused(QTorrentHandle&)), this, SLOT(setPaused(QTorrentHandle&)));
|
||||
qDebug("create tabWidget");
|
||||
tabs = new QTabWidget();
|
||||
// Download torrents tab
|
||||
@@ -163,7 +160,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
// Search engine tab
|
||||
searchEngine = new SearchEngine(BTSession, myTrayIcon, systrayIntegration);
|
||||
tabs->addTab(searchEngine, tr("Search"));
|
||||
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/oxygen/edit-find.png")));
|
||||
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png")));
|
||||
readSettings();
|
||||
// RSS Tab
|
||||
rssWidget = 0;
|
||||
@@ -174,7 +171,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
// Configure BT session according to options
|
||||
configureSession(true);
|
||||
// Resume unfinished torrents
|
||||
BTSession->startUpTorrents();
|
||||
BTSession->resumeUnfinishedTorrents();
|
||||
downloadingTorrentTab->loadLastSortedColumn();
|
||||
finishedTorrentTab->loadLastSortedColumn();
|
||||
// Add torrent given on command line
|
||||
@@ -315,7 +312,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
if(enable) {
|
||||
// RSS tab
|
||||
if(rssWidget == 0) {
|
||||
rssWidget = new RSSImp(BTSession);
|
||||
rssWidget = new RSSImp();
|
||||
tabs->addTab(rssWidget, tr("RSS"));
|
||||
tabs->setTabIcon(3, QIcon(QString::fromUtf8(":/Icons/rss32.png")));
|
||||
}
|
||||
@@ -381,7 +378,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
qDebug("In GUI, a torrent has finished");
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
bool show_msg = true;
|
||||
if(TorrentPersistentData::isSeed(h.hash()))
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished"))
|
||||
show_msg = false;
|
||||
QString fileName = h.name();
|
||||
bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool();
|
||||
@@ -427,8 +424,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
finishedTorrentTab->addTorrent(h.hash());
|
||||
} else {
|
||||
// Move torrent back to download list (if necessary)
|
||||
if(TorrentPersistentData::isSeed(h.hash())) {
|
||||
TorrentPersistentData::saveSeedStatus(h);
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished")) {
|
||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished");
|
||||
finishedTorrentTab->deleteTorrent(h.hash());
|
||||
downloadingTorrentTab->addTorrent(h.hash());
|
||||
}
|
||||
@@ -445,20 +442,14 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
// Download will be paused by libtorrent. Updating GUI information accordingly
|
||||
QString hash = h.hash();
|
||||
qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data());
|
||||
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()));
|
||||
}
|
||||
|
||||
void GUI::setPaused(QTorrentHandle &h) const {
|
||||
if(!h.is_paused()) return;
|
||||
qDebug("Marking torrent %s as paused", h.hash().toLocal8Bit().data());
|
||||
if(h.is_seed()) {
|
||||
// In finished list
|
||||
qDebug("Automatically paused torrent was in finished list");
|
||||
finishedTorrentTab->pauseTorrent(h.hash());
|
||||
finishedTorrentTab->pauseTorrent(hash);
|
||||
}else{
|
||||
downloadingTorrentTab->pauseTorrent(h.hash());
|
||||
downloadingTorrentTab->pauseTorrent(hash);
|
||||
}
|
||||
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::createKeyboardShortcuts() {
|
||||
@@ -599,28 +590,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
}
|
||||
}
|
||||
|
||||
void GUI::copyMagnetURI() const {
|
||||
QStringList hashes;
|
||||
switch(tabs->currentIndex()){
|
||||
case 0:
|
||||
hashes = downloadingTorrentTab->getSelectedTorrents();
|
||||
break;
|
||||
case 1:
|
||||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
QStringList magnet_uris;
|
||||
foreach(QString hash, hashes) {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
if(h.is_valid()) {
|
||||
magnet_uris << misc::toQString(make_magnet_uri(h.get_torrent_info()));
|
||||
}
|
||||
}
|
||||
qApp->clipboard()->setText(magnet_uris.join("\n"));
|
||||
}
|
||||
|
||||
void GUI::goBuyPage() const {
|
||||
QStringList hashes;
|
||||
switch(tabs->currentIndex()){
|
||||
@@ -776,7 +745,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
if(event->mimeData()->hasUrls()) {
|
||||
QList<QUrl> urls = event->mimeData()->urls();
|
||||
foreach(const QUrl &url, urls) {
|
||||
QString tmp = url.toString().trimmed();
|
||||
QString tmp = url.toString();
|
||||
tmp.trimmed();
|
||||
if(!tmp.isEmpty())
|
||||
files << url.toString();
|
||||
}
|
||||
@@ -793,11 +763,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
BTSession->downloadFromUrl(file);
|
||||
continue;
|
||||
}
|
||||
if(file.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
// FIXME: Possibly skipped torrent addition dialog
|
||||
BTSession->addMagnetUri(file);
|
||||
continue;
|
||||
}
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
dialog->showLoad(file);
|
||||
@@ -911,7 +876,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
inDownloadList = false;
|
||||
break;
|
||||
case 3: //RSSImp
|
||||
rssWidget->deleteSelectedItems();
|
||||
rssWidget->on_delStream_button_clicked();
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
@@ -955,10 +920,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
param = param.trimmed();
|
||||
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("magnet:", Qt::CaseInsensitive)) {
|
||||
// FIXME: Possibily skipped torrent addition dialog
|
||||
BTSession->addMagnetUri(param);
|
||||
}else{
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
@@ -969,7 +930,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GUI::addTorrent(QString path) {
|
||||
BTSession->addTorrent(path);
|
||||
@@ -1027,7 +987,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
// Connection
|
||||
// * Ports binding
|
||||
unsigned short old_listenPort = BTSession->getListenPort();
|
||||
BTSession->setListeningPort(options->getPort());
|
||||
BTSession->setListeningPortsRange(options->getPorts());
|
||||
unsigned short new_listenPort = BTSession->getListenPort();
|
||||
if(new_listenPort != old_listenPort) {
|
||||
BTSession->addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||
@@ -1374,7 +1334,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
} else {
|
||||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
}
|
||||
qDebug("nb hashes: %d", hashes.size());
|
||||
foreach(const QString &hash, hashes) {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
if(!h.is_paused()){
|
||||
@@ -1462,7 +1421,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
||||
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
||||
if(!h.is_valid()) continue;
|
||||
try {
|
||||
if(h.is_seed()) {
|
||||
// Update in finished list
|
||||
finishedTorrentTab->updateTorrent(h);
|
||||
@@ -1471,12 +1429,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
if(downloadingTorrentTab->updateTorrent(h)) {
|
||||
// Torrent was added, we may need to remove it from finished tab
|
||||
finishedTorrentTab->deleteTorrent(h.hash());
|
||||
TorrentPersistentData::saveSeedStatus(h);
|
||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished");
|
||||
}
|
||||
}
|
||||
} catch(invalid_handle e) {
|
||||
qDebug("Caught Invalid handle exception, lucky us.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(displaySpeedInTitle) {
|
||||
@@ -1536,14 +1491,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
* *
|
||||
*****************************************************/
|
||||
|
||||
void GUI::downloadFromURLList(const QStringList& url_list) {
|
||||
foreach(const QString url, url_list) {
|
||||
if(url.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
BTSession->addMagnetUri(url);
|
||||
} else {
|
||||
BTSession->downloadFromUrl(url);
|
||||
}
|
||||
}
|
||||
void GUI::downloadFromURLList(const QStringList& urls) {
|
||||
BTSession->downloadFromURLList(urls);
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
@@ -1661,4 +1610,3 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
downloadFromURL *downloadFromURLDialog = new downloadFromURL(this);
|
||||
connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&)));
|
||||
}
|
||||
|
||||
|
@@ -143,7 +143,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void fullDiskError(QTorrentHandle& h, QString msg) const;
|
||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||
void createSystrayDelayed();
|
||||
void setPaused(QTorrentHandle &h) const;
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayDownTab() const;
|
||||
@@ -192,7 +191,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void setTabText(int index, QString text) const;
|
||||
void openDestinationFolder() const;
|
||||
void goBuyPage() const;
|
||||
void copyMagnetURI() const;
|
||||
void updateRatio();
|
||||
|
||||
protected:
|
||||
|
BIN
src/Icons/add_file.png
Normal file
After Width: | Height: | Size: 1005 B |
BIN
src/Icons/add_folder.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/Icons/gnome-shutdown.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 7.0 KiB |
BIN
src/Icons/money.png
Normal file
After Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 659 B |
BIN
src/Icons/oxygen/configure.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 873 B |
Before Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 907 B |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P;
|
||||
Comment=V1.5.0
|
||||
Categories=Qt;Network;P2P
|
||||
Comment=V1.4.0
|
||||
Exec=qbittorrent %f
|
||||
GenericName=Bittorrent client
|
||||
GenericName[bg]=Торент клиент
|
||||
|
BIN
src/Icons/refresh.png
Normal file
After Width: | Height: | Size: 948 B |
BIN
src/Icons/skin/add.png
Normal file
After Width: | Height: | Size: 842 B |