1
Allgemeines [ General ] / HD-Aufnahmen verteilen und archivieren
« on: February 28, 2017, 14:27:43 »
Hallo Claus,
du hast recht. "line" ist an dieser Stelle kein Schlüsselwort. Vielen Dank für den Hinweis!
Hier also die aktuelle Version:
du hast recht. "line" ist an dieser Stelle kein Schlüsselwort. Vielen Dank für den Hinweis!
Hier also die aktuelle Version:
Code: [Select]
#!/bin/sh
#/usr/bin/finishforkodi
# This script scans "indir" for vdr-recording-subdirs with already cut, but not for deletion marked movies and glues all ts-files
# there together to one file. This file is renamed in to "Title(year).ts" so that Movie scrapers can recognize the file
# properly and so collect additional info and fanart from the internet. At last the script moves all finished files to "outdir"
# for further processing e.g. by Handbrake or for simply viewing them. :-)
# The original recording is deleted nad a log-file is placed insind "indir".
#
# "indir" and "outdir" can be defined by editing the following two lines:
indir="/data/tv/"
outdir="/data/finished/"
# --- Do not edit behind this line. ---
find ${indir} -path *%*.rec | while read recording; do
cd "${recording}"
title="$(grep ^T info | sed -e 's/^T //g' -e 's/[.:]//g' -e 's/|/\n/g')"
year="$(grep ^S info | sed -r -e 's/[^0-9]*//g' -e 's/[0-9]+/(&)/')"
name="${title} ${year}.ts"
echo "Concatenating '${name}'"
test -e "${outdir}${name}" && rm -f "${outdir}${name}"
for tsfile in $(find -name "0000[0-9].ts" | sort); do
cat "${tsfile}" >> "${outdir}${name}"
done
cd ..
test -e "${recording}" && rm -rf "${recording}"
find ${indir} -type d -empty -delete
date -R|tr '\n' ' '>> ${indir}finishforkodi.log; echo "Movie '${name}' successfully renamed and concatenated." >> ${indir}finishforkodi.log
done