mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 04:38:04 -06:00
@@ -29,12 +29,12 @@
|
||||
#include "serialize_torrent.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/bittorrent/torrent.h"
|
||||
#include "base/bittorrent/trackerentry.h"
|
||||
#include "base/tagset.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
namespace
|
||||
@@ -116,7 +116,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
|
||||
{KEY_TORRENT_FIRST_LAST_PIECE_PRIO, torrent.hasFirstLastPiecePriority()},
|
||||
|
||||
{KEY_TORRENT_CATEGORY, torrent.category()},
|
||||
{KEY_TORRENT_TAGS, torrent.tags().values().join(", ")},
|
||||
{KEY_TORRENT_TAGS, torrent.tags().join(QLatin1String(", "))},
|
||||
{KEY_TORRENT_SUPER_SEEDING, torrent.superSeeding()},
|
||||
{KEY_TORRENT_FORCE_START, torrent.isForced()},
|
||||
{KEY_TORRENT_SAVE_PATH, Utils::Fs::toNativePath(torrent.savePath())},
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QVariantMap>
|
||||
#include <QVariant>
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
|
||||
@@ -637,7 +637,7 @@ void TorrentsController::addAction()
|
||||
const std::optional<bool> addPaused = parseBool(params()["paused"]);
|
||||
const QString savepath = params()["savepath"].trimmed();
|
||||
const QString category = params()["category"];
|
||||
const QSet<QString> tags = List::toSet(params()["tags"].split(',', QString::SkipEmptyParts));
|
||||
const QStringList tags = params()["tags"].split(',', QString::SkipEmptyParts);
|
||||
const QString torrentName = params()["rename"].trimmed();
|
||||
const int upLimit = parseInt(params()["upLimit"]).value_or(-1);
|
||||
const int dlLimit = parseInt(params()["dlLimit"]).value_or(-1);
|
||||
@@ -676,7 +676,7 @@ void TorrentsController::addAction()
|
||||
addTorrentParams.contentLayout = contentLayout;
|
||||
addTorrentParams.savePath = savepath;
|
||||
addTorrentParams.category = category;
|
||||
addTorrentParams.tags = tags;
|
||||
addTorrentParams.tags.insert(tags.cbegin(), tags.cend());
|
||||
addTorrentParams.name = torrentName;
|
||||
addTorrentParams.uploadLimit = upLimit;
|
||||
addTorrentParams.downloadLimit = dlLimit;
|
||||
|
||||
Reference in New Issue
Block a user