From 7e76b84d7018e9999e1f6056eb5ca023d92e1e56 Mon Sep 17 00:00:00 2001 From: muckngrind4 Date: Sat, 10 Sep 2016 23:01:31 -0700 Subject: [PATCH 1/7] Update config --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 06a7358..413b7fa 100644 --- a/config +++ b/config @@ -48,7 +48,7 @@ HANDBRAKE_CLI=HandBrakeCLI #Pushbullet API Key #Leave empty or comment out to disable Pushbullet notifications -PB_KEY="o.u74EXY4fkFGABUSyxjvj1NCEHxgVXZov" +#PB_KEY="" #IFTTT API KEY #Leave empty or comment out to disable IFTTT notifications From 4e0c05f787d01edd59dd4641881c13b76e728a69 Mon Sep 17 00:00:00 2001 From: muckngrind4 Date: Sun, 11 Sep 2016 00:48:44 -0700 Subject: [PATCH 2/7] Fixed bug in video_transcode.sh Fixed bug in notification. --- video_transcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_transcode.sh b/video_transcode.sh index fb59f9c..fb319e2 100755 --- a/video_transcode.sh +++ b/video_transcode.sh @@ -35,5 +35,5 @@ echo "Start video transcoding script" >> $LOG rmdir $SRC -echo /opt/arm/notify.sh "\"Transcode: ${ID_FS_LABEl} complete.\"" |at now +echo /opt/arm/notify.sh "\"Transcode: ${ID_FS_LABEL} complete.\"" |at now From 9f6db3a07819f341f96f288679e432ebad4b96f7 Mon Sep 17 00:00:00 2001 From: Benjamin Bryan Date: Sun, 11 Sep 2016 12:46:40 -0700 Subject: [PATCH 3/7] move config to config.sample --- config.sample | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 config.sample diff --git a/config.sample b/config.sample new file mode 100644 index 0000000..413b7fa --- /dev/null +++ b/config.sample @@ -0,0 +1,71 @@ +#!/bin/bash +# ARM (Automatic Ripping Machine) oonfig file + +##################### +## Directory setup ## +##################### + +#Base directory of ARM media directory +#Ripped and transcoded files end up here +ARMPATH="/mnt/media/ARM/" + +#Path to raw MakeMKV directory +#Destination for MakeMKV and source for HandBrake +RAWPATH="/mnt/media/ARM/raw/" + +#Path to directory to hold log files +#Make sure to include trailing / +LOGPATH="/opt/arm/logs/" + +#How long to let log files live before deleting (in days) +LOGLIFE=1 + +######################## +## MakeMKV Parameters ## +######################## + +#Minimum length of track for MakeMKV rip (in seconds) +MINLENGTH="600" + + +########################## +## HandBrake Parameters ## +########################## + +# Handbrake preset profile +# See https://trac.handbrake.fr/wiki/BuiltInPresets +HB_PRESET="High Profile" + +#Extension of the final video file +DEST_EXT=mkv + +#Handbrake binary to call +HANDBRAKE_CLI=HandBrakeCLI + +############################# +## Notification Parameters ## +############################# + +#Pushbullet API Key +#Leave empty or comment out to disable Pushbullet notifications +#PB_KEY="" + +#IFTTT API KEY +#Leave empty or comment out to disable IFTTT notifications +#IFTTT_KEY="" + +#IFTTT Event Name +IFTTT_EVENT="arm_event" + +#Determine logfile name +#use the label of the DVD/CD or else use empty.log +#this is required for udev events where there is no media available +#such as ejecting the drive +if [ -z $ID_FS_LABEL]; then + LOGFILE="empty.log" +else + LOGFILE=${ID_FS_LABEL}".log" +fi + +#Set full logfile path +LOG=$LOGPATH$LOGFILE From 5c5146df522f13921c6ffb378e28393d4cf12aa1 Mon Sep 17 00:00:00 2001 From: Benjamin Bryan Date: Sun, 11 Sep 2016 12:47:17 -0700 Subject: [PATCH 4/7] add config to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5e49c24..d482ba9 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ logs/* test.sh archive/ +config From 88a779d014b009146770570a78678fa0ffb0dd79 Mon Sep 17 00:00:00 2001 From: Benjamin Bryan Date: Sun, 11 Sep 2016 13:07:31 -0700 Subject: [PATCH 5/7] remove config --- config | 71 ---------------------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 config diff --git a/config b/config deleted file mode 100644 index 413b7fa..0000000 --- a/config +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -# ARM (Automatic Ripping Machine) oonfig file - -##################### -## Directory setup ## -##################### - -#Base directory of ARM media directory -#Ripped and transcoded files end up here -ARMPATH="/mnt/media/ARM/" - -#Path to raw MakeMKV directory -#Destination for MakeMKV and source for HandBrake -RAWPATH="/mnt/media/ARM/raw/" - -#Path to directory to hold log files -#Make sure to include trailing / -LOGPATH="/opt/arm/logs/" - -#How long to let log files live before deleting (in days) -LOGLIFE=1 - -######################## -## MakeMKV Parameters ## -######################## - -#Minimum length of track for MakeMKV rip (in seconds) -MINLENGTH="600" - - -########################## -## HandBrake Parameters ## -########################## - -# Handbrake preset profile -# See https://trac.handbrake.fr/wiki/BuiltInPresets -HB_PRESET="High Profile" - -#Extension of the final video file -DEST_EXT=mkv - -#Handbrake binary to call -HANDBRAKE_CLI=HandBrakeCLI - -############################# -## Notification Parameters ## -############################# - -#Pushbullet API Key -#Leave empty or comment out to disable Pushbullet notifications -#PB_KEY="" - -#IFTTT API KEY -#Leave empty or comment out to disable IFTTT notifications -#IFTTT_KEY="" - -#IFTTT Event Name -IFTTT_EVENT="arm_event" - -#Determine logfile name -#use the label of the DVD/CD or else use empty.log -#this is required for udev events where there is no media available -#such as ejecting the drive -if [ -z $ID_FS_LABEL]; then - LOGFILE="empty.log" -else - LOGFILE=${ID_FS_LABEL}".log" -fi - -#Set full logfile path -LOG=$LOGPATH$LOGFILE From 5c2eff6e2fce178e6532f4eecbd7ee3ddf7f8bbf Mon Sep 17 00:00:00 2001 From: Benjamin Bryan Date: Sun, 11 Sep 2016 15:18:13 -0700 Subject: [PATCH 6/7] create log dir if needed --- identify.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/identify.sh b/identify.sh index d1ec3c5..6a645b7 100755 --- a/identify.sh +++ b/identify.sh @@ -5,6 +5,9 @@ source /opt/arm/config { echo "Starting Identify Script..." >> $LOG +# Create log dir if needed +mkdir -p $LOGPATH + #Clean up old log files FILESFOUND=( $(find $LOGPATH -mtime +$LOGLIFE -type f)) echo "Deleting ${#FILESFOUND[@]} old log files:"${FILESFOUND[@]} >> $LOG From fdadc08c8cf17961784c0ed52c9c8d87ae315b80 Mon Sep 17 00:00:00 2001 From: Benjamin Bryan Date: Sun, 11 Sep 2016 15:21:43 -0700 Subject: [PATCH 7/7] move that to a better place --- identify.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/identify.sh b/identify.sh index 6a645b7..ce420bd 100755 --- a/identify.sh +++ b/identify.sh @@ -2,11 +2,12 @@ # source /opt/arm/config +# Create log dir if needed +mkdir -p $LOGPATH + { echo "Starting Identify Script..." >> $LOG -# Create log dir if needed -mkdir -p $LOGPATH #Clean up old log files FILESFOUND=( $(find $LOGPATH -mtime +$LOGLIFE -type f))