mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Don't pollute move queue by torrents w/o metadata
There's really nothing to move if the torrent still doesn't have metadata. Additionally, such torrents in the queue can lead to unexpected behavior when reloading the torrent after metadata is received. PR #17823.
This commit is contained in:
parent
3b0ac0962e
commit
e7370d1a0f
1 changed files with 9 additions and 0 deletions
|
@ -504,6 +504,9 @@ void TorrentImpl::setAutoTMMEnabled(bool enabled)
|
||||||
|
|
||||||
Path TorrentImpl::actualStorageLocation() const
|
Path TorrentImpl::actualStorageLocation() const
|
||||||
{
|
{
|
||||||
|
if (!hasMetadata())
|
||||||
|
return {};
|
||||||
|
|
||||||
return Path(m_nativeStatus.save_path);
|
return Path(m_nativeStatus.save_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1690,6 +1693,12 @@ void TorrentImpl::resume(const TorrentOperatingMode mode)
|
||||||
|
|
||||||
void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageMode mode)
|
void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageMode mode)
|
||||||
{
|
{
|
||||||
|
if (!hasMetadata())
|
||||||
|
{
|
||||||
|
m_session->handleTorrentSavePathChanged(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_session->addMoveTorrentStorageJob(this, newPath, mode))
|
if (m_session->addMoveTorrentStorageJob(this, newPath, mode))
|
||||||
{
|
{
|
||||||
m_storageIsMoving = true;
|
m_storageIsMoving = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue