1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Ignore files without a file extension

Files which do not have a file extension are most likely not an image
and should not be used as a page of a comic book.
This commit is contained in:
Patrick Farwick 2022-02-17 16:31:28 +00:00
parent 43077bd259
commit e1889d9151

View file

@ -263,10 +263,12 @@ class ArchiveSource {
await this.archive.extractFiles();
let files = await this.archive.getFilesArray();
// metadata files and files without a file extension should not be considered as a page
files = files.filter((file) => {
const name = file.file.name;
const index = name.lastIndexOf('.');
return index !== 1 && supportedFormats.includes(name.slice(index + 1));
return index !== -1 && supportedFormats.includes(name.slice(index + 1));
});
files.sort((a, b) => {
if (a.file.name < b.file.name) {