mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Correctly handle Auto TMM in Torrent Files Watcher
This commit is contained in:
committed by
Vladimir Golovnev
parent
5ffa7e4752
commit
4cfccc54ea
@@ -511,7 +511,8 @@ void TorrentFilesWatcher::Worker::processFolder(const QString &path, const QStri
|
|||||||
if (path != watchedFolderPath)
|
if (path != watchedFolderPath)
|
||||||
{
|
{
|
||||||
const QString subdirPath = watchedDir.relativeFilePath(path);
|
const QString subdirPath = watchedDir.relativeFilePath(path);
|
||||||
if (addTorrentParams.useAutoTMM)
|
const bool useAutoTMM = addTorrentParams.useAutoTMM.value_or(!BitTorrent::Session::instance()->isAutoTMMDisabledByDefault());
|
||||||
|
if (useAutoTMM)
|
||||||
{
|
{
|
||||||
addTorrentParams.category = addTorrentParams.category.isEmpty()
|
addTorrentParams.category = addTorrentParams.category.isEmpty()
|
||||||
? subdirPath : (addTorrentParams.category + QLatin1Char('/') + subdirPath);
|
? subdirPath : (addTorrentParams.category + QLatin1Char('/') + subdirPath);
|
||||||
@@ -590,7 +591,8 @@ void TorrentFilesWatcher::Worker::processFailedTorrents()
|
|||||||
if (exactDirPath != dir.path())
|
if (exactDirPath != dir.path())
|
||||||
{
|
{
|
||||||
const QString subdirPath = dir.relativeFilePath(exactDirPath);
|
const QString subdirPath = dir.relativeFilePath(exactDirPath);
|
||||||
if (addTorrentParams.useAutoTMM)
|
const bool useAutoTMM = addTorrentParams.useAutoTMM.value_or(!BitTorrent::Session::instance()->isAutoTMMDisabledByDefault());
|
||||||
|
if (useAutoTMM)
|
||||||
{
|
{
|
||||||
addTorrentParams.category = addTorrentParams.category.isEmpty()
|
addTorrentParams.category = addTorrentParams.category.isEmpty()
|
||||||
? subdirPath : (addTorrentParams.category + QLatin1Char('/') + subdirPath);
|
? subdirPath : (addTorrentParams.category + QLatin1Char('/') + subdirPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user