From ed11f8e9d6d0a016e4f1024d1f7dfff2e664cd46 Mon Sep 17 00:00:00 2001 From: Piotr Kubowicz Date: Sat, 10 Oct 2020 16:22:06 +0200 Subject: [PATCH] Add .opus as an audio extension Wikimedia Commons has pronunciation recordings with .opus extension. Anki is able to play such files, but until now adding them required changing the extension to .ogg or some other supported one. Also sort the audio extensions list. --- CONTRIBUTORS | 1 + qt/aqt/sound.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8688354e3..103a4749b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -63,6 +63,7 @@ Jakub Kaczmarzyk Akshara Balachandra lukkea David Allison +Piotr Kubowicz ******************** diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index 24d6e4a37..7f1a91616 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -72,14 +72,15 @@ class Player(ABC): AUDIO_EXTENSIONS = { - "wav", - "mp3", - "ogg", + "3gp", "flac", "m4a", - "3gp", - "spx", + "mp3", "oga", + "ogg", + "opus", + "spx", + "wav", }