diff --git a/copyparty/mtag.py b/copyparty/mtag.py index cedc0c27..7a1d7a62 100644 --- a/copyparty/mtag.py +++ b/copyparty/mtag.py @@ -64,7 +64,7 @@ def have_ff(scmd: str) -> bool: HAVE_FFMPEG = not os.environ.get("PRTY_NO_FFMPEG") and have_ff("ffmpeg") HAVE_FFPROBE = not os.environ.get("PRTY_NO_FFPROBE") and have_ff("ffprobe") -CBZ_PICS = set("png jpg jpeg gif bmp tga tif tiff webp avif".split()) +CBZ_PICS = set("png jpg jpeg gif bmp tga tif tiff webp avif jxl".split()) CBZ_01 = re.compile(r"(^|[^0-9v])0+[01]\b") FMT_AU = set("mp3 ogg flac wav".split()) diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index c8fbeecb..d4d5534c 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -39,7 +39,6 @@ window.baguetteBox = (function () { re_i = /^[^?]+\.(a?png|avif|bmp|gif|heif|jfif|jpe?g|jxl|svg|tiff?|webp)(\?|$)/i, re_v = /^[^?]+\.(webm|mkv|mp4|m4v|mov)(\?|$)/i, re_cbz = /^[^?]+\.(cbz)(\?|$)/i, - cbz_pics = ["png", "jpg", "jpeg", "gif", "bmp", "tga", "tif", "tiff", "webp", "avif"], anims = ['slideIn', 'fadeIn', 'none'], data = {}, // all galleries imagesElements = [], @@ -251,8 +250,7 @@ window.baguetteBox = (function () { var imagesList = fileList.map(function (file) { return file["fn"]; }).filter(function (file) { - return file.indexOf(".") !== -1 - && cbz_pics.indexOf(file.split(".").pop()) !== -1; + return re_i.test(file); }).sort(); if (imagesList.length === 0) {