2024-05-08_08-38-34Z_Wednesday - debugging for hprtranscode

This commit is contained in:
Ken Fallon 2024-05-08 10:38:34 +02:00
parent f2b5ca38c8
commit 046344d523

View File

@ -46,18 +46,21 @@ function create_tts_summary {
show_type=""
if [[ -f "${1}" && -n "${2}" ]]
then
echo "DEBUG: Show type is local" 1>&2
show_type="local"
mediafile="${1}"
media_dir="$( dirname "${mediafile}" )"
ep_num="${2}"
echo "The duration is \"$( \date -ud "1970-01-01 $( ffprobe -i "${mediafile}" 2>&1| awk -F ': |, ' '/Duration:/ { print $2 }' )" +%s )\"."
else
echo "DEBUG: Show type is remote" 1>&2
show_type="remote"
response=$( curl --silent --netrc-file ${HOME}/.netrc "https://hub.hackerpublicradio.org/cms/status.php" | \
grep 'SHOW_POSTED' | \
head -1 | \
sed 's/,/ /g' )
echo "DEBUG: Getting server response" 1>&2
if [ -z "${response}" ]
then
echo "INFO: There appear to be no more shows with the status \"SHOW_POSTED\"."
@ -78,6 +81,7 @@ else
media_dir="${processing_dir}/${timestamp_epoc}_${ep_num}_${ep_date}_${key}"
fi
echo "DEBUG: Checking variables" 1>&2
if [ -z "${show_type}" ]
then
echo "sorry, variable \"show_type\" is not set."