forked from HPR/hpr_hub
2024-05-08_08-38-34Z_Wednesday - debugging for hprtranscode
This commit is contained in:
parent
f2b5ca38c8
commit
046344d523
@ -46,18 +46,21 @@ function create_tts_summary {
|
|||||||
show_type=""
|
show_type=""
|
||||||
if [[ -f "${1}" && -n "${2}" ]]
|
if [[ -f "${1}" && -n "${2}" ]]
|
||||||
then
|
then
|
||||||
|
echo "DEBUG: Show type is local" 1>&2
|
||||||
show_type="local"
|
show_type="local"
|
||||||
mediafile="${1}"
|
mediafile="${1}"
|
||||||
media_dir="$( dirname "${mediafile}" )"
|
media_dir="$( dirname "${mediafile}" )"
|
||||||
ep_num="${2}"
|
ep_num="${2}"
|
||||||
echo "The duration is \"$( \date -ud "1970-01-01 $( ffprobe -i "${mediafile}" 2>&1| awk -F ': |, ' '/Duration:/ { print $2 }' )" +%s )\"."
|
echo "The duration is \"$( \date -ud "1970-01-01 $( ffprobe -i "${mediafile}" 2>&1| awk -F ': |, ' '/Duration:/ { print $2 }' )" +%s )\"."
|
||||||
else
|
else
|
||||||
|
echo "DEBUG: Show type is remote" 1>&2
|
||||||
show_type="remote"
|
show_type="remote"
|
||||||
response=$( curl --silent --netrc-file ${HOME}/.netrc "https://hub.hackerpublicradio.org/cms/status.php" | \
|
response=$( curl --silent --netrc-file ${HOME}/.netrc "https://hub.hackerpublicradio.org/cms/status.php" | \
|
||||||
grep 'SHOW_POSTED' | \
|
grep 'SHOW_POSTED' | \
|
||||||
head -1 | \
|
head -1 | \
|
||||||
sed 's/,/ /g' )
|
sed 's/,/ /g' )
|
||||||
|
|
||||||
|
echo "DEBUG: Getting server response" 1>&2
|
||||||
if [ -z "${response}" ]
|
if [ -z "${response}" ]
|
||||||
then
|
then
|
||||||
echo "INFO: There appear to be no more shows with the status \"SHOW_POSTED\"."
|
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}"
|
media_dir="${processing_dir}/${timestamp_epoc}_${ep_num}_${ep_date}_${key}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "DEBUG: Checking variables" 1>&2
|
||||||
if [ -z "${show_type}" ]
|
if [ -z "${show_type}" ]
|
||||||
then
|
then
|
||||||
echo "sorry, variable \"show_type\" is not set."
|
echo "sorry, variable \"show_type\" is not set."
|
||||||
|
Loading…
Reference in New Issue
Block a user