From 04bda0178cf5dbbe0806129b06a409ceb4df495b Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Mon, 20 Jan 2025 19:43:26 +0100 Subject: [PATCH] Support for nex flac and ogg mime-type: decode --- lib/decode/file | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lib/decode/file b/lib/decode/file index b0f350a..5797b9d 100644 --- a/lib/decode/file +++ b/lib/decode/file @@ -51,6 +51,27 @@ decodeFile() { fi fi ;; + 'audio/ogg opus') + if [[ ${destinationformat[$destination]} = opus ]] \ + && checkCopy + then + copied=1 + else + (( disableopusdec )) && continue + decodeOpusdec + if (( ${destinationnormalize["$destination"]}))\ + || ( + [ -n "${destinationfrequency["$destination"]}" ]\ + && (( ${rate:-0} != ${destinationfrequency["$destination"]}))\ + ) || ( + [ -n "${destinationchannels["$destination"]}" ]\ + && (( ${channels:-0} != ${destinationchannels["$destination"]} )) + ) + then + sox_needed=1 + fi + fi + ;; 'application/ogg'*) if [[ ${destinationformat[$destination]} = vorbis ]] \ && checkCopy @@ -60,9 +81,21 @@ decodeFile() { decodeSox fi ;; + 'audio/ogg'*) + if [[ ${destinationformat[$destination]} = vorbis ]] \ + && checkCopy + then + copied=1 + else + decodeSox + fi + ;; 'audio/x-flac') decodeSox ;; + 'audio/flac') + decodeSox + ;; *) extendedtype=$(file -b "$sourcepath/$filename") case "$extendedtype" in