Fix error messages on MacOS

This commit is contained in:
q3aql 2023-11-06 19:38:49 +01:00
parent 8b758765a6
commit 348a1550e8
21 changed files with 27 additions and 27 deletions

View File

@ -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 <file number>
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}

View File

@ -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 <file number>
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}

View File

@ -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 <file number>
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}

View File

@ -114,7 +114,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}

View File

@ -148,7 +148,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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)

View File

@ -122,7 +122,7 @@ function extractFolderOrFile() {
# Syntax: showFileWithSpace <file number>
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)

View File

@ -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 <file number>
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}

View File

@ -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 <file number>
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}

View File

@ -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 <file number>
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}

View File

@ -148,7 +148,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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)

View File

@ -122,7 +122,7 @@ function extractFolderOrFile() {
# Syntax: showFileWithSpace <file number>
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)

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -100,7 +100,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}

View File

@ -100,7 +100,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}

View File

@ -100,7 +100,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}

View File

@ -100,7 +100,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}

View File

@ -100,7 +100,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}

View File

@ -100,7 +100,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
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}