mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Improve detection of filename extension of audio/video files
This commit is contained in:
parent
529dd6e3a8
commit
e1f9083c81
4 changed files with 21 additions and 8 deletions
|
@ -44,6 +44,7 @@
|
|||
#include <QVector>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include "base/bittorrent/common.h"
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrent.h"
|
||||
|
@ -93,7 +94,10 @@ namespace
|
|||
|
||||
for (int i = 0; i < torrent->filesCount(); ++i)
|
||||
{
|
||||
if (Utils::Misc::isPreviewable(Utils::Fs::fileExtension(torrent->fileName(i))))
|
||||
QString fileName = torrent->fileName(i);
|
||||
if (fileName.endsWith(QB_EXT))
|
||||
fileName.chop(QB_EXT.length());
|
||||
if (Utils::Misc::isPreviewable(fileName))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue