summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcustom/uucp-mediaserver/scripts/queue45
-rw-r--r--odin/strm/send_kitty2
2 files changed, 31 insertions, 16 deletions
diff --git a/custom/uucp-mediaserver/scripts/queue b/custom/uucp-mediaserver/scripts/queue
index 0ad653ff..ea294a6d 100755
--- a/custom/uucp-mediaserver/scripts/queue
+++ b/custom/uucp-mediaserver/scripts/queue
@@ -44,20 +44,30 @@ base=$(basename $0)
44suffix=${base##*.} 44suffix=${base##*.}
45 45
46force=0 46force=0
47if [[ "$1" == "-f" ]]; then
48 shift
49 force=1
50 if [[ -n "$1" && "$1" -eq "$1" ]] 2>/dev/null; then
51 force="$1"
52 shift
53 fi
54fi
55
56noCall=false 47noCall=false
57if [[ "$1" == "-r" ]]; then 48prepend=false
58 shift 49while getopts "frp" OPT; do
59 noCall=true 50 case OPT in
60fi 51 r)
52 noCall=true
53 ;;
54 f)
55 if [[ ${@:$OPTIND} =~ ^[0-9]+$ ]];then
56 force=${@:$OPTIND}
57 OPTIND=$((OPTIND+1))
58 else
59 force=1
60 fi
61 ;;
62 p)
63 prepend=true
64 ;;
65 \?)
66 echo "Invalid option -${OPTARG}" >&2
67 exit 2
68 ;;
69 esac
70done
61 71
62for f (${@}); do 72for f (${@}); do
63 f=$(readlink -f ${f}) 73 f=$(readlink -f ${f})
@@ -68,7 +78,12 @@ for f (${@}); do
68 if uustat | grep -q ${f:t}; then 78 if uustat | grep -q ${f:t}; then
69 printf "‘%s’ is already in uucp queue\n" ${f:t} | warn 79 printf "‘%s’ is already in uucp queue\n" ${f:t} | warn
70 fi 80 fi
71 print -r ${f} >> @queueDir@/${suffix}.queue 81
82 if ${prepend}; then
83 mv =(print -r ${f}; cat @queueDir@/${suffix}.queue) @queueDir@/${suffix}.queue
84 else
85 print -r ${f} >> @queueDir@/${suffix}.queue
86 fi
72done 87done
73 88
74offset=1 89offset=1
@@ -85,7 +100,7 @@ while true; do
85 if [[ -n "${file}" ]]; then 100 if [[ -n "${file}" ]]; then
86 printf "‘%s’ does not exist, skipping\n" "${file}" >&2 101 printf "‘%s’ does not exist, skipping\n" "${file}" >&2
87 printf "Subject: Missing file in %s\n\n%s" $logTag ${file} \ 102 printf "Subject: Missing file in %s\n\n%s" $logTag ${file} \
88 | sendmail gkleen \ 103 | sendmail uucp \
89 && echo "Sent mail." 104 && echo "Sent mail."
90 fi 105 fi
91 advance 106 advance
diff --git a/odin/strm/send_kitty b/odin/strm/send_kitty
index 60eb11ec..2eb3e98a 100644
--- a/odin/strm/send_kitty
+++ b/odin/strm/send_kitty
@@ -37,5 +37,5 @@ fi
37newFile="${concatDir}/$(date +'%Y-%m-%d-%H-%M-%S').mkv" 37newFile="${concatDir}/$(date +'%Y-%m-%d-%H-%M-%S').mkv"
38 38
39@ffmpeg@/bin/ffmpeg -safe 0 -f concat -i =(awk $'{ print "file \'"$0"\'" }' ${fList}) -c copy -metadata "description=$(xargs -a ${fList} -- basename -s ".mkv")" ${newFile} 39@ffmpeg@/bin/ffmpeg -safe 0 -f concat -i =(awk $'{ print "file \'"$0"\'" }' ${fList}) -c copy -metadata "description=$(xargs -a ${fList} -- basename -s ".mkv")" ${newFile}
40queue.hel -r ${newFile} 40queue.hel -p -r ${newFile}
41ln -vfs $(realpath --relative-to=${lastFile:h} ${newFile}) ${lastFile} 41ln -vfs $(realpath --relative-to=${lastFile:h} ${newFile}) ${lastFile}