Created
October 28, 2017 13:01
-
-
Save JasperE84/2570dce43a4fe3e8e0feaa3791091d66 to your computer and use it in GitHub Desktop.
TVHeadend post-remove script for automatic removal of edl, log and logo files as generated by comskip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# TVHeadend post-remove script to remove log/edl/logo.txt files (generated by comskip) from recording dir | |
# TVHeadend config: Configuration -> Recording -> Select profile -> Add the following in setting "Post-remove command": /home/USER/PATH/comskip-pd.sh "%f" | |
# | |
INPUTVIDEO="$1" # Full path to recording, i.e. /home/user/Videos/News.ts | |
FILENAME=$(basename "$INPUTVIDEO") | |
BASENAME="${FILENAME%.*}" | |
DIRNAME=`/usr/bin/dirname "$INPUTVIDEO"` | |
EDLFILE="$DIRNAME/$BASENAME.edl" | |
LOGFILE="$DIRNAME/$BASENAME.log" | |
TXTFILE="$DIRNAME/$BASENAME.txt" | |
LOGOFILE="$DIRNAME/$BASENAME.logo.txt" | |
/bin/rm "$EDLFILE" | |
/bin/rm "$LOGFILE" | |
/bin/rm "$TXTFILE" | |
/bin/rm "$LOGOFILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have comskip set to only place a .txt file in the recordings folder. Does this script wait until the recording has been deleted before the comskip .txt file gets removed?
Thanks