5 Commits

Author SHA1 Message Date
Benjamin Bryan
30ee175cff Merge pull request #5 from ahnooie/video_identification
Distinguish udf video from udf data
2016-10-01 15:36:59 -07:00
Benjamin Bryan
02e7154e34 comment clarification 2016-10-01 15:34:27 -07:00
Benjamin Bryan
6ae9949341 flag to enable udf check 2016-10-01 15:24:51 -07:00
Benjamin Bryan
e042192cfb pipes for or 2016-10-01 14:54:24 -07:00
Benjamin Bryan
b39a6baf2d distinguish udf video from data 2016-10-01 14:33:52 -07:00
2 changed files with 30 additions and 3 deletions

View File

@@ -1,6 +1,14 @@
#!/bin/bash
# ARM (Automatic Ripping Machine) oonfig file
#################
## ARM Options ##
#################
# Distinguish UDF video discs from UDF data discs. Requires mounting disc so adds a few seconds to the identify script.
ARM_CHECK_UDF=true
#####################
## Directory setup ##
#####################

View File

@@ -19,10 +19,29 @@ export HOME="/root/"
if [ $ID_FS_TYPE == "udf" ]; then
echo "identified video" >> $LOG
echo "identified udf" >> $LOG
echo "found ${ID_FS_LABEL} on ${DEVNAME}" >> $LOG
#echo "ripping video" >> $LOG
/opt/arm/video_rip.sh $LOG
if [ $ARM_CHECK_UDF == true ]; then
# check to see if this is really a video
mkdir -p /mnt/${DEVNAME}
mount ${DEVNAME} /mnt/${DEVNAME}
if [[ -d /mnt/${DEVNAME}/VIDEO_TS || -d /mnt/${DEVNAME}/BDMV ]]; then
echo "identified udf as video" >> $LOG
umount /mnt/${DEVNAME}
/opt/arm/video_rip.sh $LOG
else
umount /mnt/${DEVNAME}
echo "identified udf as data" >> $LOG
/opt/arm/data_rip.sh $LOG
eject $DEVNAME
fi
else
echo "ARM_CHECK_UDF is false, assuming udf is video" >> $LOG
/opt/arm/video_rip.sh $LOG
fi
elif (($ID_CDROM_MEDIA_TRACK_COUNT_AUDIO > 0 )); then
echo "identified audio" >> $LOG