mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-24 01:08:06 -06:00
BUGFIX: Fix issue when altering files priorities of a seeding torrent (closes #665799)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- BUGFIX: Remember the current property tab on startup
|
||||
- BUGFIX: Fix status list widget height issue on style change
|
||||
- BUGFIX: Fix rounding issue in torrent progress display
|
||||
- BUGFIX: Fix issue when altering files priorities of a seeding torrent
|
||||
|
||||
* Tue Oct 19 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.7
|
||||
- BUGFIX: Display the priority column when the queueing system gets enabled
|
||||
|
||||
@@ -585,6 +585,14 @@ void QTorrentHandle::prioritize_files(const std::vector<int> &v) {
|
||||
if(was_seed && !is_seed()) {
|
||||
// Reset seed status
|
||||
TorrentPersistentData::saveSeedStatus(*this);
|
||||
// Move to temp folder if necessary
|
||||
if(Preferences::isTempPathEnabled()) {
|
||||
QString tmp_path = Preferences::getTempPath();
|
||||
QString root_folder = TorrentPersistentData::getRootFolder(hash());
|
||||
if(!root_folder.isEmpty())
|
||||
tmp_path = QDir(tmp_path).absoluteFilePath(root_folder);
|
||||
move_storage(tmp_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,10 +664,21 @@ void QTorrentHandle::move_storage(QString new_path) const {
|
||||
}
|
||||
|
||||
void QTorrentHandle::file_priority(int index, int priority) const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
Q_ASSERT(torrent_handle::is_valid());
|
||||
bool was_seed = is_seed();
|
||||
h.file_priority(index, priority);
|
||||
// Save seed status
|
||||
TorrentPersistentData::saveSeedStatus(*this);
|
||||
if(was_seed && !is_seed()) {
|
||||
// Save seed status
|
||||
TorrentPersistentData::saveSeedStatus(*this);
|
||||
// Move to temp folder if necessary
|
||||
if(Preferences::isTempPathEnabled()) {
|
||||
QString tmp_path = Preferences::getTempPath();
|
||||
QString root_folder = TorrentPersistentData::getRootFolder(hash());
|
||||
if(!root_folder.isEmpty())
|
||||
tmp_path = QDir(tmp_path).absoluteFilePath(root_folder);
|
||||
move_storage(tmp_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
|
||||
Reference in New Issue
Block a user