Skip to content

Commit

Permalink
if no pbcore data from protrack, try with fmpbcore if available
Browse files Browse the repository at this point in the history
  • Loading branch information
dericed committed Apr 10, 2019
1 parent f67190c commit 0838010
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions prot2rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ _query_protrack_push_to_resourcespace(){
TEMPXML=$(_maketemp)
# get PBCore XML for that mediaid
"${SCRIPTDIR}/pbprotracktor" "${MEDIAID}" | _remove_empty_xml_nodes 2> /dev/null > "${TEMPXML}"
if [[ -f "${SCRIPTDIR}/fmpbcore" && -f "${TEMPXML}" && ! -s "${TEMPXML}" ]] ; then
echo "No data retrived from protrack. Now trying to grab pbcore for ${MEDIAID} using fmpbcore."
"${SCRIPTDIR}/fmpbcore" "${MEDIAID}" | _remove_empty_xml_nodes 2> /dev/null > "${TEMPXML}"
fi
if [[ ! -s "${TEMPXML}" ]] ; then
echo "Error, no pbcore data found for ${MEDIAID}."
return
fi
xml val "${TEMPXML}" >/dev/null
if [ "${?}" != "0" ] ; then
echo "pbprotracktor did not return a result for ${MEDIAID}, skipping."
Expand Down

0 comments on commit 0838010

Please sign in to comment.