Accept images with capitalized extensions.

When using the "Attach pictures/audio/video" button in the "Browse"
window, files with a capitalized extension (e.g. image.JPG) aren't
selectable.

Add the extensions in upper case to the list of supported extensions.
This commit is contained in:
Miguel Gazquez 2025-12-22 13:09:58 +01:00
parent 8f2144534b
commit fbfdfd443a
2 changed files with 32 additions and 22 deletions

View file

@ -256,6 +256,7 @@ Eltaurus <https://github.com/Eltaurus-Lt>
jariji
Francisco Esteva <fr.esteva@duocuc.cl>
SelfishPig <https://github.com/SelfishPig>
Miguel Gazquez <miguel.gazquez82@gmail.com>
********************

View file

@ -63,29 +63,38 @@ from aqt.utils import (
)
from aqt.webview import AnkiWebView, AnkiWebViewKind
pics = ("jpg", "jpeg", "png", "gif", "svg", "webp", "ico", "avif")
pics = (
"jpg", "JPG",
"jpeg", "JPEG",
"png" ",PNG",
"gif" ",GIF",
"svg" ",SVG",
"webp", "WEBP",
"ico" ",ICO",
"avif", "AVIF",
)
audio = (
"3gp",
"aac",
"avi",
"flac",
"flv",
"m4a",
"mkv",
"mov",
"mp3",
"mp4",
"mpeg",
"mpg",
"oga",
"ogg",
"ogv",
"ogx",
"opus",
"spx",
"swf",
"wav",
"webm",
"3gp", "3GP",
"aac", "AAC",
"avi", "AVI",
"flac", "FLAC",
"flv", "FLV",
"m4a", "M4A",
"mkv", "MKV",
"mov", "MOV",
"mp3", "MP3",
"mp4", "MP4",
"mpeg", "MPEG",
"mpg", "MPG",
"oga", "OGA",
"ogg", "OGG",
"ogv", "OGV",
"ogx", "OGX",
"opus", "OPUS",
"spx", "SPX",
"swf", "SWF",
"wav", "WAV",
"webm", "WEBM",
)