Allow to move content files to Trash instead of deleting them

PR #20252.
This commit is contained in:
Vladimir Golovnev
2024-06-29 08:21:35 +03:00
committed by GitHub
parent c5fa05299b
commit 4e27e88f6a
24 changed files with 383 additions and 116 deletions

View File

@@ -986,6 +986,21 @@ PathList TorrentImpl::filePaths() const
return m_filePaths;
}
PathList TorrentImpl::actualFilePaths() const
{
if (!hasMetadata())
return {};
PathList paths;
paths.reserve(filesCount());
const lt::file_storage files = nativeTorrentInfo()->files();
for (const lt::file_index_t &nativeIndex : asConst(m_torrentInfo.nativeIndexes()))
paths.emplaceBack(files.file_path(nativeIndex));
return paths;
}
QVector<DownloadPriority> TorrentImpl::filePriorities() const
{
return m_filePriorities;