summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-scripts/shootscreens.sh
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/linhes-scripts/shootscreens.sh
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/linhes-scripts/shootscreens.sh')
-rwxr-xr-xabs/core/linhes-scripts/shootscreens.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/abs/core/linhes-scripts/shootscreens.sh b/abs/core/linhes-scripts/shootscreens.sh
new file mode 100755
index 0000000..7b1260c
--- /dev/null
+++ b/abs/core/linhes-scripts/shootscreens.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Written by Bob Igo from the MythTV Store at http://MythiC.TV
+# Email: bob@stormlogic.com
+#
+# If you run into problems with this script, please send me email
+
+# This code generates screenshots (cover files) for all videos in
+# MythTV's videometadata table that do not have covers associated with them.
+
+if [ "$1" == "1" ]; then
+ OSD=1
+else
+ OSD=0
+fi
+
+> /tmp/shooter.log
+{
+ percentage=0
+ # Change IFS to be a newline so that filenames with spaces will be handled properly.
+ IFS=$'\n'
+ vidcount=`mysql -u root mythconverg -B -e "select filename from videometadata where coverfile=\"No Cover\";" | wc -l`
+ increment=$(expr 100 / $vidcount)
+ for vid in `mysql -u root mythconverg -B -e "select filename from videometadata where coverfile=\"No Cover\";" | grep -v -e "^filename$"`
+ do
+ if [ $OSD == 1 ]; then
+ osd_cat --barmode=percentage --percentage=$percentage --pos=middle --align=center --color=white --text="Generating Video Thumbnails..." --font=$FONT --shadow=3 --color=yellow --delay=0 &
+ percentage=$(expr $percentage + $increment)
+ fi
+
+ screenshooter.sh -v $vid
+ done
+ if [ $OSD == 1 ]; then
+ killall -9 osd_cat
+ osd_cat --barmode=percentage --percentage=100 --pos=middle --align=center --color=white --text="Video Thumbnails Generated!" --font=$FONT --shadow=3 --color=yellow --delay=3 &
+ fi
+} \ No newline at end of file