mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
parent
7faa8b7a02
commit
d1515456bc
8 changed files with 83 additions and 30 deletions
|
|
@ -976,20 +976,23 @@ void AddNewTorrentDialog::setupTreeview()
|
|||
m_ui->contentTreeView->setExpanded(currentIndex, true);
|
||||
}
|
||||
|
||||
// Check file name blacklist for torrents that are manually added
|
||||
QVector<BitTorrent::DownloadPriority> priorities = m_contentModel->model()->getFilePriorities();
|
||||
Q_ASSERT(priorities.size() == m_torrentInfo.filesCount());
|
||||
|
||||
for (int i = 0; i < priorities.size(); ++i)
|
||||
if (BitTorrent::Session::instance()->isExcludedFileNamesEnabled())
|
||||
{
|
||||
if (priorities[i] == BitTorrent::DownloadPriority::Ignored)
|
||||
continue;
|
||||
// Check file name blacklist for torrents that are manually added
|
||||
QVector<BitTorrent::DownloadPriority> priorities = m_contentModel->model()->getFilePriorities();
|
||||
Q_ASSERT(priorities.size() == m_torrentInfo.filesCount());
|
||||
|
||||
if (BitTorrent::Session::instance()->isFilenameExcluded(m_torrentInfo.filePath(i).filename()))
|
||||
priorities[i] = BitTorrent::DownloadPriority::Ignored;
|
||||
for (int i = 0; i < priorities.size(); ++i)
|
||||
{
|
||||
if (priorities[i] == BitTorrent::DownloadPriority::Ignored)
|
||||
continue;
|
||||
|
||||
if (BitTorrent::Session::instance()->isFilenameExcluded(m_torrentInfo.filePath(i).filename()))
|
||||
priorities[i] = BitTorrent::DownloadPriority::Ignored;
|
||||
}
|
||||
|
||||
m_contentModel->model()->updateFilesPriorities(priorities);
|
||||
}
|
||||
|
||||
m_contentModel->model()->updateFilesPriorities(priorities);
|
||||
}
|
||||
|
||||
updateDiskSpaceLabel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue