mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 03:28:41 -07:00
Add unified class to represent parsed torrent metadata
* Add unified class to represent parsed torrent metadata * Unify startup logic of "Add new torrent dialog" PR #19301.
This commit is contained in:
parent
d554f4d44a
commit
f27f2c20e0
18 changed files with 498 additions and 439 deletions
|
@ -41,8 +41,8 @@
|
|||
#include <QVariant>
|
||||
#include <QVector>
|
||||
|
||||
#include "../bittorrent/magneturi.h"
|
||||
#include "../bittorrent/session.h"
|
||||
#include "../bittorrent/torrentdescriptor.h"
|
||||
#include "../asyncfilestorage.h"
|
||||
#include "../global.h"
|
||||
#include "../logger.h"
|
||||
|
@ -474,7 +474,7 @@ void AutoDownloader::processJob(const QSharedPointer<ProcessingJob> &job)
|
|||
const auto torrentURL = job->articleData.value(Article::KeyTorrentURL).toString();
|
||||
BitTorrent::Session::instance()->addTorrent(torrentURL, rule.addTorrentParams());
|
||||
|
||||
if (BitTorrent::MagnetUri(torrentURL).isValid())
|
||||
if (BitTorrent::TorrentDescriptor::parse(torrentURL))
|
||||
{
|
||||
if (Feed *feed = Session::instance()->feedByURL(job->feedURL))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue