flag to enable udf check

This commit is contained in:
Benjamin Bryan
2016-10-01 15:24:51 -07:00
parent e042192cfb
commit 6ae9949341
2 changed files with 26 additions and 16 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.
ARM_CHECK_UDF=true
#####################
## Directory setup ##
#####################

View File

@@ -2,8 +2,6 @@
#
source /opt/arm/config
echo "starting" >> /opt/arm/logs/generic
# Create log dir if needed
mkdir -p $LOGPATH
@@ -23,23 +21,27 @@ export HOME="/root/"
if [ $ID_FS_TYPE == "udf" ]; then
echo "identified udf" >> $LOG
echo "found ${ID_FS_LABEL} on ${DEVNAME}" >> $LOG
# 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
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
#echo "ripping video" >> $LOG
#/opt/arm/video_rip.sh $LOG
elif (($ID_CDROM_MEDIA_TRACK_COUNT_AUDIO > 0 )); then
echo "identified audio" >> $LOG