Skip to content

Commit 7aa1625

Browse files
committed
use OBJECTS_FIND_EXCLUSIONS array
to standardize how to search in objects
1 parent 0d84680 commit 7aa1625

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

makeframemd5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ while [ "${*}" != "" ] ; do
3838
_set_up_framemd5
3939
cd "${PACKAGE_PATH}"
4040
FILELIST=$(_maketemp)
41-
find "./objects" -type f ! -name ".*" ! -path "*/access/*" ! -path "*/service/*" > "${FILELIST}"
41+
find "./objects" -type f "${OBJECTS_FIND_EXCLUSIONS[@]}" > "${FILELIST}"
4242
(IFS=$'\n'
4343
for FILE in $(cat "${FILELIST}") ; do
4444
VIDEOTEST=$(file -Ib "${FILE}" | grep 'video')

mmfunctions

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
SCRIPTNAME=$(basename "${0}")
33
SCRIPTDIR=$(dirname "${0}")
44

5+
OBJECTS_FIND_EXCLUSIONS=(! -name ".*")
6+
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/access/*")
7+
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/service/*")
8+
OBJECTS_FIND_EXCLUSIONS+=(! -path "*/trimmed_materials/*")
9+
510
# load configuration file
611
if [ -f "${TEMP_MMCONFIG}" ] ; then
712
# for use in ingestfiletest; prevents test files from going to permanent storage
@@ -991,7 +996,7 @@ _find_input (){
991996
ISOBJECT="Y"
992997
INPUTFILES=$(_maketemp)
993998
# find av files in a directory and output to a temp list
994-
find "${1}/objects" -type f -size +0 ! -path "*/access/*" ! -path "*/service/*" ! -name ".DS_Store" | while read file ; do
999+
find "${1}/objects" -type f -size +0 "${OBJECTS_FIND_EXCLUSIONS[@]}" | while read file ; do
9951000
streamcount=$(ffprobe -loglevel quiet "$file" -show_entries format=nb_streams -of default=nw=1:nk=1)
9961001
duration_ts=$(ffprobe -loglevel quiet "$file" -show_entries stream=duration_ts -of default=nw=1:nk=1)
9971002
if [[ "$streamcount" > 0 && "${duration_ts}" != 1 ]] ; then

0 commit comments

Comments
 (0)