ffmpeg-mythtv/myth-update-basename.sh

13 lines
425 B
Bash
Raw Normal View History

#!/bin/bash
set -e
set -x
chanid=$1
starttimeutc=$2
basename=$3
filesize=$(stat --printf="%s" $destdir/$basename)
dir="$HOME/.mythtv/"
config="config.xml"
mysql_password=$(awk -v FS='[<>]' '/Password/{print $3}' $dir/$config)
printf "update recorded set basename='%s', filesize='%s' where chanid=%s and starttime=%s;" $basename $filesize $chanid $starttimeutc | mysql --user=${USER} --password=${mysql_password} mythconverg