Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workaround for when a package includes a restoration #238

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions mmfunctions
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ OBJECTS_FIND_EXCLUSIONS=(! -name ".*")
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/access/*")
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/service/*")
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/trimmed_materials/*")
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/restoration/*")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this line is kept in, then it is unable to make access file from restoration because it does not recognize the input. Tested it without this line and then it worked. :)


# load configuration file
if [ -f "${TEMP_MMCONFIG}" ] ; then
Expand Down Expand Up @@ -997,8 +998,14 @@ _find_input (){
fi
ISOBJECT="Y"
INPUTFILES=$(_maketemp)
if [[ -d "${1}/objects/restoration" ]] ; then
LOOKHERE="${1}/objects/restoration"
_report -dt "This package contains a restoration, using that for processing."
else
LOOKHERE="${1}/objects"
fi
# find av files in a directory and output to a temp list
find "${1}/objects" -type f -size +0 "${OBJECTS_FIND_EXCLUSIONS[@]}" | while read file ; do
find "${LOOKHERE}" -type f -size +0 "${OBJECTS_FIND_EXCLUSIONS[@]}" | while read file ; do
streamcount=$(ffprobe -loglevel quiet "$file" -show_entries format=nb_streams -of default=nw=1:nk=1)
duration_ts=$(ffprobe -loglevel quiet "$file" -show_entries stream=duration_ts -of default=nw=1:nk=1)
if [[ "$streamcount" > 0 && "${duration_ts}" != 1 ]] ; then
Expand Down Expand Up @@ -1033,7 +1040,7 @@ _find_input (){
fi
fi
else
_report -wt "A valid source file isn't found in ${1}/objects."
_report -wt "A valid source file isn't found in ${LOOKHERE}."
_writeerrorlog "_find_input" "A valid source file was not found, so the script could not proceed."
exit 1
fi
Expand Down