mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 13:41:26 -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
|
@ -90,9 +90,8 @@ PreviewSelectDialog::PreviewSelectDialog(QWidget *parent, const BitTorrent::Torr
|
|||
{
|
||||
QString fileName = torrent->fileName(i);
|
||||
if (fileName.endsWith(QB_EXT))
|
||||
fileName.chop(4);
|
||||
QString extension = Utils::Fs::fileExtension(fileName).toUpper();
|
||||
if (Utils::Misc::isPreviewable(extension))
|
||||
fileName.chop(QB_EXT.length());
|
||||
if (Utils::Misc::isPreviewable(fileName))
|
||||
{
|
||||
int row = m_previewListModel->rowCount();
|
||||
m_previewListModel->insertRow(row);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue