2020-04-12 18:08:19 +03:00
|
|
|
/*
|
|
|
|
* Bittorrent Client using Qt and libtorrent.
|
2023-02-26 14:44:58 +03:00
|
|
|
* Copyright (C) 2015-2023 Vladimir Golovnev <glassez@yandex.ru>
|
2020-04-12 18:08:19 +03:00
|
|
|
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* In addition, as a special exception, the copyright holders give permission to
|
|
|
|
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
|
|
* modified versions of it that use the same license as the "OpenSSL" library),
|
|
|
|
* and distribute the linked executables. You must obey the GNU General Public
|
|
|
|
* License in all respects for all of the code used other than "OpenSSL". If you
|
|
|
|
* modify file(s), you may extend this exception to your version of the file(s),
|
|
|
|
* but you are not obligated to do so. If you do not wish to do so, delete this
|
|
|
|
* exception statement from your version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <functional>
|
2022-04-25 09:25:45 +03:00
|
|
|
#include <memory>
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2020-08-05 08:31:41 +03:00
|
|
|
#include <libtorrent/add_torrent_params.hpp>
|
2020-04-12 18:08:19 +03:00
|
|
|
#include <libtorrent/fwd.hpp>
|
|
|
|
#include <libtorrent/torrent_handle.hpp>
|
2022-04-25 09:25:45 +03:00
|
|
|
#include <libtorrent/torrent_info.hpp>
|
2020-04-12 18:08:19 +03:00
|
|
|
#include <libtorrent/torrent_status.hpp>
|
|
|
|
|
2022-01-25 06:05:16 +03:00
|
|
|
#include <QBitArray>
|
2020-04-12 18:08:19 +03:00
|
|
|
#include <QDateTime>
|
|
|
|
#include <QHash>
|
2021-04-19 09:40:15 +03:00
|
|
|
#include <QMap>
|
2020-04-12 18:08:19 +03:00
|
|
|
#include <QObject>
|
|
|
|
#include <QQueue>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
|
|
|
|
2022-02-08 06:03:48 +03:00
|
|
|
#include "base/path.h"
|
2021-04-02 13:45:50 +08:00
|
|
|
#include "base/tagset.h"
|
2020-04-12 18:08:19 +03:00
|
|
|
#include "infohash.h"
|
2020-05-07 20:15:33 +03:00
|
|
|
#include "speedmonitor.h"
|
2021-01-06 15:12:40 +03:00
|
|
|
#include "torrent.h"
|
2022-04-01 09:35:45 +03:00
|
|
|
#include "torrentcontentlayout.h"
|
2020-04-12 18:08:19 +03:00
|
|
|
#include "torrentinfo.h"
|
2022-05-22 09:09:11 +03:00
|
|
|
#include "trackerentry.h"
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
namespace BitTorrent
|
|
|
|
{
|
2022-08-27 08:01:24 +03:00
|
|
|
class SessionImpl;
|
2021-03-22 10:26:43 +03:00
|
|
|
struct LoadTorrentParams;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
enum class MoveStorageMode
|
|
|
|
{
|
2022-10-11 10:05:21 +03:00
|
|
|
FailIfExist,
|
2020-04-12 18:08:19 +03:00
|
|
|
KeepExistingFiles,
|
|
|
|
Overwrite
|
|
|
|
};
|
|
|
|
|
2020-12-02 09:17:13 +03:00
|
|
|
enum class MaintenanceJob
|
|
|
|
{
|
|
|
|
None,
|
|
|
|
HandleMetadata
|
|
|
|
};
|
|
|
|
|
2021-05-20 09:30:15 +03:00
|
|
|
struct FileErrorInfo
|
|
|
|
{
|
|
|
|
lt::error_code error;
|
|
|
|
lt::operation_t operation;
|
|
|
|
};
|
|
|
|
|
2022-11-14 20:45:08 +03:00
|
|
|
class TorrentImpl final : public Torrent
|
2020-04-12 18:08:19 +03:00
|
|
|
{
|
2022-11-14 20:45:08 +03:00
|
|
|
Q_OBJECT
|
2021-06-29 14:45:23 +08:00
|
|
|
Q_DISABLE_COPY_MOVE(TorrentImpl)
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
public:
|
2022-08-27 08:01:24 +03:00
|
|
|
TorrentImpl(SessionImpl *session, lt::session *nativeSession
|
2020-12-02 09:17:13 +03:00
|
|
|
, const lt::torrent_handle &nativeHandle, const LoadTorrentParams ¶ms);
|
2021-01-06 15:12:40 +03:00
|
|
|
~TorrentImpl() override;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
bool isValid() const;
|
|
|
|
|
2021-03-05 12:43:58 +03:00
|
|
|
InfoHash infoHash() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
QString name() const override;
|
|
|
|
QDateTime creationDate() const override;
|
|
|
|
QString creator() const override;
|
|
|
|
QString comment() const override;
|
|
|
|
bool isPrivate() const override;
|
|
|
|
qlonglong totalSize() const override;
|
|
|
|
qlonglong wantedSize() const override;
|
|
|
|
qlonglong completedSize() const override;
|
|
|
|
qlonglong pieceLength() const override;
|
|
|
|
qlonglong wastedSize() const override;
|
|
|
|
QString currentTracker() const override;
|
|
|
|
|
|
|
|
bool isAutoTMMEnabled() const override;
|
|
|
|
void setAutoTMMEnabled(bool enabled) override;
|
2022-02-08 06:03:48 +03:00
|
|
|
Path savePath() const override;
|
|
|
|
void setSavePath(const Path &path) override;
|
|
|
|
Path downloadPath() const override;
|
|
|
|
void setDownloadPath(const Path &path) override;
|
|
|
|
Path actualStorageLocation() const override;
|
|
|
|
Path rootPath() const override;
|
|
|
|
Path contentPath() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
QString category() const override;
|
|
|
|
bool belongsToCategory(const QString &category) const override;
|
|
|
|
bool setCategory(const QString &category) override;
|
|
|
|
|
2021-04-02 13:45:50 +08:00
|
|
|
TagSet tags() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
bool hasTag(const QString &tag) const override;
|
|
|
|
bool addTag(const QString &tag) override;
|
|
|
|
bool removeTag(const QString &tag) override;
|
|
|
|
void removeAllTags() override;
|
|
|
|
|
|
|
|
int filesCount() const override;
|
|
|
|
int piecesCount() const override;
|
|
|
|
int piecesHave() const override;
|
|
|
|
qreal progress() const override;
|
|
|
|
QDateTime addedTime() const override;
|
|
|
|
qreal ratioLimit() const override;
|
|
|
|
int seedingTimeLimit() const override;
|
|
|
|
|
2022-02-08 06:03:48 +03:00
|
|
|
Path filePath(int index) const override;
|
|
|
|
Path actualFilePath(int index) const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
qlonglong fileSize(int index) const override;
|
2022-02-08 06:03:48 +03:00
|
|
|
PathList filePaths() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
QVector<DownloadPriority> filePriorities() const override;
|
|
|
|
|
|
|
|
TorrentInfo info() const override;
|
2023-02-17 07:08:00 +03:00
|
|
|
bool isFinished() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
bool isPaused() const override;
|
|
|
|
bool isQueued() const override;
|
|
|
|
bool isForced() const override;
|
|
|
|
bool isChecking() const override;
|
|
|
|
bool isDownloading() const override;
|
2022-10-14 07:12:51 +02:00
|
|
|
bool isMoving() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
bool isUploading() const override;
|
|
|
|
bool isCompleted() const override;
|
|
|
|
bool isActive() const override;
|
|
|
|
bool isInactive() const override;
|
|
|
|
bool isErrored() const override;
|
|
|
|
bool isSequentialDownload() const override;
|
|
|
|
bool hasFirstLastPiecePriority() const override;
|
|
|
|
TorrentState state() const override;
|
|
|
|
bool hasMetadata() const override;
|
|
|
|
bool hasMissingFiles() const override;
|
|
|
|
bool hasError() const override;
|
|
|
|
int queuePosition() const override;
|
|
|
|
QVector<TrackerEntry> trackers() const override;
|
|
|
|
QVector<QUrl> urlSeeds() const override;
|
|
|
|
QString error() const override;
|
|
|
|
qlonglong totalDownload() const override;
|
|
|
|
qlonglong totalUpload() const override;
|
|
|
|
qlonglong activeTime() const override;
|
|
|
|
qlonglong finishedTime() const override;
|
|
|
|
qlonglong eta() const override;
|
|
|
|
QVector<qreal> filesProgress() const override;
|
|
|
|
int seedsCount() const override;
|
|
|
|
int peersCount() const override;
|
|
|
|
int leechsCount() const override;
|
|
|
|
int totalSeedsCount() const override;
|
|
|
|
int totalPeersCount() const override;
|
|
|
|
int totalLeechersCount() const override;
|
|
|
|
QDateTime lastSeenComplete() const override;
|
|
|
|
QDateTime completedTime() const override;
|
|
|
|
qlonglong timeSinceUpload() const override;
|
|
|
|
qlonglong timeSinceDownload() const override;
|
|
|
|
qlonglong timeSinceActivity() const override;
|
|
|
|
int downloadLimit() const override;
|
|
|
|
int uploadLimit() const override;
|
|
|
|
bool superSeeding() const override;
|
2020-11-29 16:36:07 +02:00
|
|
|
bool isDHTDisabled() const override;
|
|
|
|
bool isPEXDisabled() const override;
|
|
|
|
bool isLSDDisabled() const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
QVector<PeerInfo> peers() const override;
|
|
|
|
QBitArray pieces() const override;
|
|
|
|
QBitArray downloadingPieces() const override;
|
|
|
|
QVector<int> pieceAvailability() const override;
|
|
|
|
qreal distributedCopies() const override;
|
|
|
|
qreal maxRatio() const override;
|
|
|
|
int maxSeedingTime() const override;
|
|
|
|
qreal realRatio() const override;
|
|
|
|
int uploadPayloadRate() const override;
|
|
|
|
int downloadPayloadRate() const override;
|
|
|
|
qlonglong totalPayloadUpload() const override;
|
|
|
|
qlonglong totalPayloadDownload() const override;
|
|
|
|
int connectionsCount() const override;
|
|
|
|
int connectionsLimit() const override;
|
|
|
|
qlonglong nextAnnounce() const override;
|
|
|
|
QVector<qreal> availableFileFractions() const override;
|
|
|
|
|
|
|
|
void setName(const QString &name) override;
|
|
|
|
void setSequentialDownload(bool enable) override;
|
|
|
|
void setFirstLastPiecePriority(bool enabled) override;
|
|
|
|
void pause() override;
|
2020-04-19 16:12:50 +03:00
|
|
|
void resume(TorrentOperatingMode mode = TorrentOperatingMode::AutoManaged) override;
|
2020-04-12 18:08:19 +03:00
|
|
|
void forceReannounce(int index = -1) override;
|
|
|
|
void forceDHTAnnounce() override;
|
|
|
|
void forceRecheck() override;
|
2022-02-08 06:03:48 +03:00
|
|
|
void renameFile(int index, const Path &path) override;
|
2020-04-12 18:08:19 +03:00
|
|
|
void prioritizeFiles(const QVector<DownloadPriority> &priorities) override;
|
|
|
|
void setRatioLimit(qreal limit) override;
|
|
|
|
void setSeedingTimeLimit(int limit) override;
|
|
|
|
void setUploadLimit(int limit) override;
|
|
|
|
void setDownloadLimit(int limit) override;
|
|
|
|
void setSuperSeeding(bool enable) override;
|
2020-11-29 16:36:07 +02:00
|
|
|
void setDHTDisabled(bool disable) override;
|
|
|
|
void setPEXDisabled(bool disable) override;
|
|
|
|
void setLSDDisabled(bool disable) override;
|
2020-04-12 18:08:19 +03:00
|
|
|
void flushCache() const override;
|
2022-05-22 09:09:11 +03:00
|
|
|
void addTrackers(QVector<TrackerEntry> trackers) override;
|
|
|
|
void removeTrackers(const QStringList &trackers) override;
|
|
|
|
void replaceTrackers(QVector<TrackerEntry> trackers) override;
|
2020-04-12 18:08:19 +03:00
|
|
|
void addUrlSeeds(const QVector<QUrl> &urlSeeds) override;
|
|
|
|
void removeUrlSeeds(const QVector<QUrl> &urlSeeds) override;
|
|
|
|
bool connectPeer(const PeerAddress &peerAddress) override;
|
2020-05-21 13:21:00 +06:00
|
|
|
void clearPeers() override;
|
2022-11-18 09:46:24 +03:00
|
|
|
void setMetadata(const TorrentInfo &torrentInfo) override;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2022-10-09 16:07:16 +03:00
|
|
|
StopCondition stopCondition() const override;
|
|
|
|
void setStopCondition(StopCondition stopCondition) override;
|
|
|
|
|
2020-04-12 18:08:19 +03:00
|
|
|
QString createMagnetURI() const override;
|
2022-04-27 12:29:00 +08:00
|
|
|
nonstd::expected<QByteArray, QString> exportToBuffer() const override;
|
|
|
|
nonstd::expected<void, QString> exportToFile(const Path &path) const override;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2022-11-14 20:45:08 +03:00
|
|
|
void fetchPeerInfo(std::function<void (QVector<PeerInfo>)> resultHandler) const override;
|
|
|
|
void fetchURLSeeds(std::function<void (QVector<QUrl>)> resultHandler) const override;
|
|
|
|
void fetchPieceAvailability(std::function<void (QVector<int>)> resultHandler) const override;
|
|
|
|
void fetchDownloadingPieces(std::function<void (QBitArray)> resultHandler) const override;
|
|
|
|
void fetchAvailableFileFractions(std::function<void (QVector<qreal>)> resultHandler) const override;
|
|
|
|
|
2020-04-12 18:08:19 +03:00
|
|
|
bool needSaveResumeData() const;
|
|
|
|
|
|
|
|
// Session interface
|
|
|
|
lt::torrent_handle nativeHandle() const;
|
|
|
|
|
|
|
|
void handleAlert(const lt::alert *a);
|
|
|
|
void handleStateUpdate(const lt::torrent_status &nativeStatus);
|
2021-05-20 10:36:44 +03:00
|
|
|
void handleCategoryOptionsChanged();
|
2020-04-12 18:08:19 +03:00
|
|
|
void handleAppendExtensionToggled();
|
2022-11-19 13:33:38 +03:00
|
|
|
void saveResumeData(lt::resume_data_flags_t flags = {});
|
2022-04-22 12:40:31 +03:00
|
|
|
void handleMoveStorageJobFinished(const Path &path, bool hasOutstandingJob);
|
2022-02-08 06:03:48 +03:00
|
|
|
void fileSearchFinished(const Path &savePath, const PathList &fileNames);
|
2022-11-30 09:54:30 +03:00
|
|
|
TrackerEntry updateTrackerEntry(const lt::announce_entry &announceEntry, const QMap<TrackerEntry::Endpoint, int> &updateInfo);
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
private:
|
2021-04-02 13:45:50 +08:00
|
|
|
using EventTrigger = std::function<void ()>;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2022-04-25 09:25:45 +03:00
|
|
|
std::shared_ptr<const lt::torrent_info> nativeTorrentInfo() const;
|
|
|
|
|
2020-04-12 18:08:19 +03:00
|
|
|
void updateStatus(const lt::torrent_status &nativeStatus);
|
2023-02-26 14:44:58 +03:00
|
|
|
void updateProgress();
|
2020-04-12 18:08:19 +03:00
|
|
|
void updateState();
|
|
|
|
|
|
|
|
void handleFastResumeRejectedAlert(const lt::fastresume_rejected_alert *p);
|
|
|
|
void handleFileCompletedAlert(const lt::file_completed_alert *p);
|
2021-05-20 09:30:15 +03:00
|
|
|
void handleFileErrorAlert(const lt::file_error_alert *p);
|
2021-08-08 13:27:22 +08:00
|
|
|
#ifdef QBT_USES_LIBTORRENT2
|
2021-03-29 11:26:44 +03:00
|
|
|
void handleFilePrioAlert(const lt::file_prio_alert *p);
|
|
|
|
#endif
|
2020-04-12 18:08:19 +03:00
|
|
|
void handleFileRenamedAlert(const lt::file_renamed_alert *p);
|
|
|
|
void handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p);
|
|
|
|
void handleMetadataReceivedAlert(const lt::metadata_received_alert *p);
|
|
|
|
void handlePerformanceAlert(const lt::performance_alert *p) const;
|
|
|
|
void handleSaveResumeDataAlert(const lt::save_resume_data_alert *p);
|
|
|
|
void handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p);
|
|
|
|
void handleTorrentCheckedAlert(const lt::torrent_checked_alert *p);
|
|
|
|
void handleTorrentFinishedAlert(const lt::torrent_finished_alert *p);
|
|
|
|
void handleTorrentPausedAlert(const lt::torrent_paused_alert *p);
|
|
|
|
void handleTorrentResumedAlert(const lt::torrent_resumed_alert *p);
|
|
|
|
|
|
|
|
bool isMoveInProgress() const;
|
2020-04-19 16:12:50 +03:00
|
|
|
|
2020-04-12 18:08:19 +03:00
|
|
|
void setAutoManaged(bool enable);
|
|
|
|
|
2022-12-15 06:57:07 +03:00
|
|
|
Path wantedActualPath(int index, const Path &path) const;
|
2021-05-20 10:36:44 +03:00
|
|
|
void adjustStorageLocation();
|
2022-12-15 06:57:07 +03:00
|
|
|
void doRenameFile(int index, const Path &path);
|
2022-02-08 06:03:48 +03:00
|
|
|
void moveStorage(const Path &newPath, MoveStorageMode mode);
|
2020-04-12 18:08:19 +03:00
|
|
|
void manageIncompleteFiles();
|
2022-02-13 08:07:30 +03:00
|
|
|
void applyFirstLastPiecePriority(bool enabled);
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2021-03-24 10:59:36 +03:00
|
|
|
void prepareResumeData(const lt::add_torrent_params ¶ms);
|
2022-02-08 06:03:48 +03:00
|
|
|
void endReceivedMetadataHandling(const Path &savePath, const PathList &fileNames);
|
2021-01-01 16:08:01 +03:00
|
|
|
void reload();
|
2020-12-02 09:17:13 +03:00
|
|
|
|
2022-04-27 12:29:00 +08:00
|
|
|
nonstd::expected<lt::entry, QString> exportTorrent() const;
|
|
|
|
|
2022-11-14 20:45:08 +03:00
|
|
|
template <typename Func, typename Callback>
|
|
|
|
void invokeAsync(Func func, Callback resultHandler) const;
|
|
|
|
|
2022-08-27 08:01:24 +03:00
|
|
|
SessionImpl *const m_session = nullptr;
|
2022-06-23 12:28:00 +08:00
|
|
|
lt::session *m_nativeSession = nullptr;
|
2020-04-12 18:08:19 +03:00
|
|
|
lt::torrent_handle m_nativeHandle;
|
2022-04-25 09:25:45 +03:00
|
|
|
mutable lt::torrent_status m_nativeStatus;
|
2020-04-19 11:12:18 +08:00
|
|
|
TorrentState m_state = TorrentState::Unknown;
|
2020-04-12 18:08:19 +03:00
|
|
|
TorrentInfo m_torrentInfo;
|
2022-02-08 06:03:48 +03:00
|
|
|
PathList m_filePaths;
|
2022-02-01 10:59:54 +05:30
|
|
|
QHash<lt::file_index_t, int> m_indexMap;
|
2022-02-13 08:07:30 +03:00
|
|
|
QVector<DownloadPriority> m_filePriorities;
|
2022-04-21 13:18:41 +03:00
|
|
|
QBitArray m_completedFiles;
|
2022-07-13 14:35:04 +08:00
|
|
|
SpeedMonitor m_payloadRateMonitor;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2021-03-05 12:43:58 +03:00
|
|
|
InfoHash m_infoHash;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
// m_moveFinishedTriggers is activated only when the following conditions are met:
|
|
|
|
// all file rename jobs complete, all file move jobs complete
|
|
|
|
QQueue<EventTrigger> m_moveFinishedTriggers;
|
2020-04-19 11:12:18 +08:00
|
|
|
int m_renameCount = 0;
|
2020-04-19 11:14:37 +08:00
|
|
|
bool m_storageIsMoving = false;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
2022-04-21 16:08:43 +03:00
|
|
|
QQueue<EventTrigger> m_statusUpdatedTriggers;
|
|
|
|
|
2020-12-02 09:17:13 +03:00
|
|
|
MaintenanceJob m_maintenanceJob = MaintenanceJob::None;
|
|
|
|
|
2022-11-30 09:54:30 +03:00
|
|
|
QVector<TrackerEntry> m_trackerEntries;
|
2023-02-16 08:49:16 +03:00
|
|
|
QVector<QUrl> m_urlSeeds;
|
2021-05-20 09:30:15 +03:00
|
|
|
FileErrorInfo m_lastFileError;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
// Persistent data
|
|
|
|
QString m_name;
|
2022-02-08 06:03:48 +03:00
|
|
|
Path m_savePath;
|
|
|
|
Path m_downloadPath;
|
2020-04-12 18:08:19 +03:00
|
|
|
QString m_category;
|
2021-04-02 13:45:50 +08:00
|
|
|
TagSet m_tags;
|
2020-04-12 18:08:19 +03:00
|
|
|
qreal m_ratioLimit;
|
|
|
|
int m_seedingTimeLimit;
|
2020-04-19 16:12:50 +03:00
|
|
|
TorrentOperatingMode m_operatingMode;
|
2020-12-10 09:54:27 +03:00
|
|
|
TorrentContentLayout m_contentLayout;
|
2023-02-17 07:08:00 +03:00
|
|
|
bool m_hasFinishedStatus;
|
2020-04-19 11:12:18 +08:00
|
|
|
bool m_hasMissingFiles = false;
|
2020-09-07 11:20:50 +03:00
|
|
|
bool m_hasFirstLastPiecePriority = false;
|
2020-04-19 11:14:37 +08:00
|
|
|
bool m_useAutoTMM;
|
2020-04-19 16:12:50 +03:00
|
|
|
bool m_isStopped;
|
2022-10-30 08:28:13 +03:00
|
|
|
StopCondition m_stopCondition = StopCondition::None;
|
2020-04-12 18:08:19 +03:00
|
|
|
|
|
|
|
bool m_unchecked = false;
|
2020-08-05 08:31:41 +03:00
|
|
|
|
|
|
|
lt::add_torrent_params m_ltAddTorrentParams;
|
2022-01-25 06:05:16 +03:00
|
|
|
|
2022-09-01 06:54:51 +03:00
|
|
|
int m_downloadLimit = 0;
|
|
|
|
int m_uploadLimit = 0;
|
|
|
|
|
2023-02-26 14:44:58 +03:00
|
|
|
QBitArray m_pieces;
|
|
|
|
QVector<std::int64_t> m_filesProgress;
|
2020-04-12 18:08:19 +03:00
|
|
|
};
|
|
|
|
}
|