From 348a1550e80955381330b264e29495a79e7aa43d Mon Sep 17 00:00:00 2001 From: q3aql Date: Mon, 6 Nov 2023 19:38:49 +0100 Subject: [PATCH] Fix error messages on MacOS --- src/ks-av1 | 4 ++-- src/ks-av1s | 4 ++-- src/ks-avi | 4 ++-- src/ks-crop | 2 +- src/ks-mp3 | 2 +- src/ks-mp3-album | 2 +- src/ks-mp4 | 4 ++-- src/ks-mp4k | 4 ++-- src/ks-mp4s | 4 ++-- src/ks-oga | 2 +- src/ks-oga-album | 2 +- src/ks-upa | 2 +- src/ks-upf | 2 +- src/ks-upr | 2 +- src/ks-upv | 2 +- wrapper/ks-av1-wrapper | 2 +- wrapper/ks-av1s-wrapper | 2 +- wrapper/ks-avi-wrapper | 2 +- wrapper/ks-mp4-wrapper | 2 +- wrapper/ks-mp4k-wrapper | 2 +- wrapper/ks-mp4s-wrapper | 2 +- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/ks-av1 b/src/ks-av1 index 3b47ae0..754718c 100755 --- a/src/ks-av1 +++ b/src/ks-av1 @@ -61,7 +61,7 @@ function set_resolution() { fi done if [ ${bc_found} -eq 0 ] ; then - file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1) + file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1) if [ -z "${file_rel}" ] ; then echo ${set_rel} else @@ -214,7 +214,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp &> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-av1s b/src/ks-av1s index e1ff8fa..e8cb6c2 100755 --- a/src/ks-av1s +++ b/src/ks-av1s @@ -61,7 +61,7 @@ function set_resolution() { fi done if [ ${bc_found} -eq 0 ] ; then - file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1) + file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1) if [ -z "${file_rel}" ] ; then echo ${set_rel} else @@ -214,7 +214,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-avi b/src/ks-avi index acd59e6..edce21e 100755 --- a/src/ks-avi +++ b/src/ks-avi @@ -64,7 +64,7 @@ function set_resolution() { fi done if [ ${bc_found} -eq 0 ] ; then - file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1) + file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1) if [ -z "${file_rel}" ] ; then echo ${set_rel} else @@ -222,7 +222,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-crop b/src/ks-crop index 76ca719..5b44365 100755 --- a/src/ks-crop +++ b/src/ks-crop @@ -114,7 +114,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-mp3 b/src/ks-mp3 index 5de20a1..a8bc6ac 100755 --- a/src/ks-mp3 +++ b/src/ks-mp3 @@ -148,7 +148,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp cutDisplayName=$(echo ${DisplayName} | cut -c1) diff --git a/src/ks-mp3-album b/src/ks-mp3-album index 98d6078..fda62b5 100755 --- a/src/ks-mp3-album +++ b/src/ks-mp3-album @@ -122,7 +122,7 @@ function extractFolderOrFile() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp cutDisplayName=$(echo ${DisplayName} | cut -c1) diff --git a/src/ks-mp4 b/src/ks-mp4 index 8f5e440..8ff3647 100755 --- a/src/ks-mp4 +++ b/src/ks-mp4 @@ -64,7 +64,7 @@ function set_resolution() { fi done if [ ${bc_found} -eq 0 ] ; then - file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1) + file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1) if [ -z "${file_rel}" ] ; then echo ${set_rel} else @@ -222,7 +222,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-mp4k b/src/ks-mp4k index 8dc3709..f9ab8f3 100755 --- a/src/ks-mp4k +++ b/src/ks-mp4k @@ -64,7 +64,7 @@ function set_resolution() { fi done if [ ${bc_found} -eq 0 ] ; then - file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1) + file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1) if [ -z "${file_rel}" ] ; then echo ${set_rel} else @@ -222,7 +222,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-mp4s b/src/ks-mp4s index 3258d5b..5c21607 100755 --- a/src/ks-mp4s +++ b/src/ks-mp4s @@ -64,7 +64,7 @@ function set_resolution() { fi done if [ ${bc_found} -eq 0 ] ; then - file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1) + file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1) if [ -z "${file_rel}" ] ; then echo ${set_rel} else @@ -222,7 +222,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-oga b/src/ks-oga index a839310..4adf039 100755 --- a/src/ks-oga +++ b/src/ks-oga @@ -148,7 +148,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp cutDisplayName=$(echo ${DisplayName} | cut -c1) diff --git a/src/ks-oga-album b/src/ks-oga-album index 74444af..166a17a 100755 --- a/src/ks-oga-album +++ b/src/ks-oga-album @@ -122,7 +122,7 @@ function extractFolderOrFile() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp cutDisplayName=$(echo ${DisplayName} | cut -c1) diff --git a/src/ks-upa b/src/ks-upa index 7279be9..03df081 100755 --- a/src/ks-upa +++ b/src/ks-upa @@ -115,7 +115,7 @@ function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) echo $FileNoExtension > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-upf b/src/ks-upf index 250a5ae..bc3264c 100755 --- a/src/ks-upf +++ b/src/ks-upf @@ -142,7 +142,7 @@ function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) echo $FileNoExtension > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-upr b/src/ks-upr index e00d4e4..1fb9a89 100755 --- a/src/ks-upr +++ b/src/ks-upr @@ -132,7 +132,7 @@ function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) echo $FileNoExtension > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/src/ks-upv b/src/ks-upv index 967829c..f78cb02 100755 --- a/src/ks-upv +++ b/src/ks-upv @@ -115,7 +115,7 @@ function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) echo $FileNoExtension > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/wrapper/ks-av1-wrapper b/wrapper/ks-av1-wrapper index f3474ea..414fe85 100755 --- a/wrapper/ks-av1-wrapper +++ b/wrapper/ks-av1-wrapper @@ -100,7 +100,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/wrapper/ks-av1s-wrapper b/wrapper/ks-av1s-wrapper index 698e432..04ead7a 100755 --- a/wrapper/ks-av1s-wrapper +++ b/wrapper/ks-av1s-wrapper @@ -100,7 +100,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/wrapper/ks-avi-wrapper b/wrapper/ks-avi-wrapper index 0f417d9..afbfedc 100755 --- a/wrapper/ks-avi-wrapper +++ b/wrapper/ks-avi-wrapper @@ -100,7 +100,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/wrapper/ks-mp4-wrapper b/wrapper/ks-mp4-wrapper index bb04362..a4b6ae1 100755 --- a/wrapper/ks-mp4-wrapper +++ b/wrapper/ks-mp4-wrapper @@ -100,7 +100,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/wrapper/ks-mp4k-wrapper b/wrapper/ks-mp4k-wrapper index e5ed16a..0aebd82 100755 --- a/wrapper/ks-mp4k-wrapper +++ b/wrapper/ks-mp4k-wrapper @@ -100,7 +100,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName} diff --git a/wrapper/ks-mp4s-wrapper b/wrapper/ks-mp4s-wrapper index 35d3cd5..de001a3 100755 --- a/wrapper/ks-mp4s-wrapper +++ b/wrapper/ks-mp4s-wrapper @@ -100,7 +100,7 @@ function removeExtension() { # Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp - sed -i 's/_/ /g' ${dirTemp}/name.tmp + sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null DisplayName=$(cat ${dirTemp}/name.tmp) rm -rf ${dirTemp}/name.tmp echo ${DisplayName}