From 653019921ee1d9017e959b315b91bc75d54efc4a Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 14 Jul 2022 18:32:00 -0500 Subject: [PATCH] Add:Support for OGA file extension #804, Update:Mime type for m4b and m4a to audio/mp4 --- client/plugins/constants.js | 2 +- server/utils/constants.js | 5 +++-- server/utils/globals.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/plugins/constants.js b/client/plugins/constants.js index 4c3838e4..27884222 100644 --- a/client/plugins/constants.js +++ b/client/plugins/constants.js @@ -1,6 +1,6 @@ const SupportedFileTypes = { image: ['png', 'jpg', 'jpeg', 'webp'], - audio: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'mp4', 'aac', 'wma', 'aiff', 'wav'], + audio: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'oga', 'mp4', 'aac', 'wma', 'aiff', 'wav'], ebook: ['epub', 'pdf', 'mobi', 'azw3', 'cbr', 'cbz'], info: ['nfo'], text: ['txt'], diff --git a/server/utils/constants.js b/server/utils/constants.js index bf4c8aaf..2429c325 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -35,10 +35,11 @@ module.exports.PlayMethod = { module.exports.AudioMimeType = { MP3: 'audio/mpeg', - M4B: 'audio/mpeg', - M4A: 'audio/mpeg', + M4B: 'audio/mp4', + M4A: 'audio/mp4', MP4: 'audio/mp4', OGG: 'audio/ogg', + OGA: 'audio/ogg', OPUS: 'audio/ogg', AAC: 'audio/aac', FLAC: 'audio/flac', diff --git a/server/utils/globals.js b/server/utils/globals.js index 016cbc3c..84205fce 100644 --- a/server/utils/globals.js +++ b/server/utils/globals.js @@ -1,6 +1,6 @@ const globals = { SupportedImageTypes: ['png', 'jpg', 'jpeg', 'webp'], - SupportedAudioTypes: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'mp4', 'aac', 'wma', 'aiff', 'wav'], + SupportedAudioTypes: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'oga', 'mp4', 'aac', 'wma', 'aiff', 'wav'], SupportedEbookTypes: ['epub', 'pdf', 'mobi', 'azw3', 'cbr', 'cbz'], SupportedVideoTypes: ['mp4'], TextFileTypes: ['txt', 'nfo'],