mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Added support for magnet links in search engine. Most search Web sites provides magnet links now and in the futures, they may provide only the magnet links.
This commit is contained in:
parent
fca24a8f84
commit
88c56d8250
3 changed files with 109 additions and 102 deletions
|
@ -12,6 +12,7 @@
|
|||
- FEATURE: Torrents can be renamed in transfer list
|
||||
- FEATURE: Display torrent addition dialog for magnet links too
|
||||
- FEATURE: Files contained in a torrent are opened on double click (files panel)
|
||||
- FEATURE: Added support for magnet links in search engine
|
||||
- BUGFIX: Use XDG folders (.cache, .local) instead of .qbittorrent
|
||||
- COSMETIC: Use checkboxes to filter torrent content instead of comboboxes
|
||||
- COSMETIC: Use alternating row colors in transfer list (set in program preferences)
|
||||
|
|
|
@ -130,7 +130,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||
void addTorrent(QString path);
|
||||
void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker);
|
||||
void processDownloadedFiles(QString path, QString url);
|
||||
void downloadFromURLList(const QStringList& urls);
|
||||
void finishedTorrent(QTorrentHandle& h) const;
|
||||
// Options slots
|
||||
void on_actionOptions_triggered();
|
||||
|
@ -143,6 +142,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
void setTabText(int index, QString text) const;
|
||||
void showNotificationBaloon(QString title, QString msg) const;
|
||||
void downloadFromURLList(const QStringList& urls);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
|
|
|
@ -301,6 +301,11 @@ void SearchEngine::saveResultsColumnsWidth() {
|
|||
}
|
||||
|
||||
void SearchEngine::downloadTorrent(QString engine_url, QString torrent_url) {
|
||||
if(torrent_url.startsWith("magnet:")) {
|
||||
QStringList urls;
|
||||
urls << torrent_url;
|
||||
parent->downloadFromURLList(urls);
|
||||
} else {
|
||||
QProcess *downloadProcess = new QProcess(this);
|
||||
connect(downloadProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(downloadFinished(int,QProcess::ExitStatus)));
|
||||
downloaders << downloadProcess;
|
||||
|
@ -311,6 +316,7 @@ void SearchEngine::downloadTorrent(QString engine_url, QString torrent_url) {
|
|||
// Launch search
|
||||
downloadProcess->start("python", params, QIODevice::ReadOnly);
|
||||
}
|
||||
}
|
||||
|
||||
void SearchEngine::searchStarted(){
|
||||
// Update SearchEngine widgets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue