mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix Preview for .!qB extended files
This commit is contained in:
parent
3e7329fb07
commit
c7efd0dd05
2 changed files with 14 additions and 3 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "misc.h"
|
||||
#include "previewlistdelegate.h"
|
||||
#include "previewselect.h"
|
||||
#include "fs_utils.h"
|
||||
|
||||
PreviewSelect::PreviewSelect(QWidget* parent, QTorrentHandle h): QDialog(parent), h(h) {
|
||||
setupUi(this);
|
||||
|
@ -58,7 +59,7 @@ PreviewSelect::PreviewSelect(QWidget* parent, QTorrentHandle h): QDialog(parent)
|
|||
unsigned int nbFiles = h.num_files();
|
||||
for (unsigned int i=0; i<nbFiles; ++i) {
|
||||
QString fileName = h.filename_at(i);
|
||||
QString extension = fileName.split(QString::fromUtf8(".")).last().toUpper();
|
||||
QString extension = fsutils::fileExtension(fileName).toUpper();
|
||||
if (misc::isPreviewable(extension)) {
|
||||
int row = previewListModel->rowCount();
|
||||
previewListModel->insertRow(row);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue