Improve torrent content handling

Hide .pad files.

PR #15468.
This commit is contained in:
Vladimir Golovnev 2021-10-02 21:42:58 +03:00 committed by GitHub
parent a8ade3a04b
commit bc71827c01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 179 additions and 145 deletions

View file

@ -91,9 +91,9 @@ namespace
if (!torrent->hasMetadata())
return false;
for (int i = 0; i < torrent->filesCount(); ++i)
for (const QString &filePath : asConst(torrent->filePaths()))
{
QString fileName = torrent->fileName(i);
QString fileName = Utils::Fs::fileName(filePath);
if (fileName.endsWith(QB_EXT))
fileName.chop(QB_EXT.length());
if (Utils::Misc::isPreviewable(fileName))