initial commit of bin scripts into git
This commit is contained in:
32
AddFootyData.sh
Executable file
32
AddFootyData.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# recordid=75 ; # get this manually
|
||||
|
||||
dir=/myth/videos/Football/2008/
|
||||
intid=$(echo -n "select intid from videometadata where filename='$dir`/bin/ls -rt $dir| tail -n1`'" \
|
||||
| mysql --user=mythtv --password=mythtv mythconverg | tail -n1)
|
||||
|
||||
|
||||
Rd=`( cd /myth/videos/Football/2008 ; /bin/ls -1 | sort | tail -n 1 | cut -c3-4 )`
|
||||
|
||||
recordid=$(echo -n "select recordid from recorded where title like '%AFL%'" \
|
||||
| mysql --user=mythtv --password=mythtv mythconverg | tail -n1)
|
||||
|
||||
if [ "$Rd" -lt "10" ]; then
|
||||
Rd=`echo $Rd | cut -c2`
|
||||
fi
|
||||
|
||||
echo "something like this:"
|
||||
|
||||
echo "update videometadata set length =
|
||||
hour( timediff( (select endtime from recorded where recordid=$recordid),
|
||||
(select starttime from recorded where recordid=$recordid) ) ) * 60 +
|
||||
minute( timediff( (select endtime from recorded where
|
||||
recordid=$recordid),
|
||||
(select starttime from recorded where recordid=$recordid) ) )
|
||||
where intid=$intid;
|
||||
update videometadata set plot = (select description from recorded where recordid=$recordid) where intid=$intid;
|
||||
update videometadata set year = year( date( (select starttime from recorded where recordid=$recordid) )) where intid=$intid;
|
||||
update videometadata set director = 'AFL Round $Rd' where intid=$intid;
|
||||
update videometadata set rating = 'G' where intid=$intid;
|
||||
update videometadata set coverfile = '/myth/video-cover-art/gfc.jpg' where intid=$intid;"
|
||||
Reference in New Issue
Block a user