mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 11:49:01 +03:00
Merge pull request #3194 from glassez/save_path
Fix BitTorrent::TorrentHandle class.
This commit is contained in:
commit
35e04a795d
2 changed files with 13 additions and 2 deletions
|
@ -206,7 +206,8 @@ TorrentHandle::TorrentHandle(Session *session, const libtorrent::torrent_handle
|
|||
if (!data.resumed) {
|
||||
if (hasMetadata()) {
|
||||
setFirstLastPiecePriority(data.sequential);
|
||||
appendExtensionsToIncompleteFiles();
|
||||
if (m_session->isAppendExtensionEnabled())
|
||||
appendExtensionsToIncompleteFiles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1556,7 +1557,8 @@ void TorrentHandle::handleMetadataReceivedAlert(libt::metadata_received_alert *p
|
|||
Q_UNUSED(p);
|
||||
qDebug("Metadata received for torrent %s.", qPrintable(name()));
|
||||
updateStatus();
|
||||
appendExtensionsToIncompleteFiles();
|
||||
if (m_session->isAppendExtensionEnabled())
|
||||
appendExtensionsToIncompleteFiles();
|
||||
m_session->handleTorrentMetadataReceived(this);
|
||||
|
||||
if (isPaused()) {
|
||||
|
@ -1695,6 +1697,14 @@ void TorrentHandle::removeExtensionsFromIncompleteFiles()
|
|||
}
|
||||
|
||||
void TorrentHandle::adjustActualSavePath()
|
||||
{
|
||||
if (!isMoveInProgress())
|
||||
adjustActualSavePath_impl();
|
||||
else
|
||||
m_moveStorageTriggers.append(boost::bind(&TorrentHandle::adjustActualSavePath_impl, this));
|
||||
}
|
||||
|
||||
void TorrentHandle::adjustActualSavePath_impl()
|
||||
{
|
||||
QString path;
|
||||
if (!useTempPath()) {
|
||||
|
|
|
@ -333,6 +333,7 @@ namespace BitTorrent
|
|||
void resolveCountries(bool b);
|
||||
void adjustSavePath();
|
||||
void adjustActualSavePath();
|
||||
void adjustActualSavePath_impl();
|
||||
void moveStorage(const QString &newPath);
|
||||
void appendExtensionsToIncompleteFiles();
|
||||
void removeExtensionsFromIncompleteFiles();
|
||||
|
|
Loading…
Reference in a new issue