Handle .!qB extension behind the scenes

PR #15920.
This commit is contained in:
Vladimir Golovnev 2022-01-08 08:45:50 +03:00 committed by GitHub
parent 9f6130cbaa
commit f44341a8e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 63 additions and 105 deletions

View file

@ -43,7 +43,6 @@
#include <QVector>
#include <QWheelEvent>
#include "base/bittorrent/common.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrent.h"
#include "base/bittorrent/trackerentry.h"
@ -93,9 +92,7 @@ namespace
for (const QString &filePath : asConst(torrent->filePaths()))
{
QString fileName = Utils::Fs::fileName(filePath);
if (fileName.endsWith(QB_EXT))
fileName.chop(QB_EXT.length());
const QString fileName = Utils::Fs::fileName(filePath);
if (Utils::Misc::isPreviewable(fileName))
return true;
}