summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/linhes-scripts
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-10-23 18:17:40 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-10-23 18:19:39 (GMT)
commitadbcf19958300e9b6598990184c8815b945ba0ee (patch)
treef4283c850ac0ac202c17e78a637ee7ca8147621b /abs/core-testing/linhes-scripts
parent61a68250df10d29b624650948484898334ff22d0 (diff)
downloadlinhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.zip
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.gz
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.bz2
Removed old core and extra from repo. Renamed -testing to core/extra. This will setup the base for the testing branch.
Diffstat (limited to 'abs/core-testing/linhes-scripts')
-rwxr-xr-xabs/core-testing/linhes-scripts/770-wrapper.sh37
-rw-r--r--abs/core-testing/linhes-scripts/PKGBUILD91
-rw-r--r--abs/core-testing/linhes-scripts/dct700-cc.sh27
-rwxr-xr-xabs/core-testing/linhes-scripts/idle.sh102
-rwxr-xr-xabs/core-testing/linhes-scripts/importfiles.sh18
-rw-r--r--abs/core-testing/linhes-scripts/install_hulu.sh70
-rwxr-xr-xabs/core-testing/linhes-scripts/limit-mythcommflag.sh91
-rw-r--r--abs/core-testing/linhes-scripts/linhes-scripts.install7
-rw-r--r--abs/core-testing/linhes-scripts/linhes_update.sh39
-rw-r--r--abs/core-testing/linhes-scripts/linhes_update2.sh28
-rw-r--r--abs/core-testing/linhes-scripts/linhes_update3.sh17
-rwxr-xr-xabs/core-testing/linhes-scripts/mplayer-resumer-vdpau.pl204
-rwxr-xr-xabs/core-testing/linhes-scripts/mplayer-resumer.pl188
-rwxr-xr-xabs/core-testing/linhes-scripts/myth2fuze318
-rwxr-xr-xabs/core-testing/linhes-scripts/myth2mp382
-rwxr-xr-xabs/core-testing/linhes-scripts/myth2x264223
-rwxr-xr-xabs/core-testing/linhes-scripts/myth2xvid223
-rwxr-xr-xabs/core-testing/linhes-scripts/mythwelcome-config.py27
-rwxr-xr-xabs/core-testing/linhes-scripts/mythwelcome-set-alarm.sh23
-rwxr-xr-xabs/core-testing/linhes-scripts/mythwelcome-test-wakeup.sh16
-rwxr-xr-xabs/core-testing/linhes-scripts/pause-mythcommflag.sh53
-rwxr-xr-xabs/core-testing/linhes-scripts/pause_mythcommflag8
-rwxr-xr-xabs/core-testing/linhes-scripts/qip7100-cc.sh25
-rw-r--r--abs/core-testing/linhes-scripts/remove_php_mythvideo.sh13
-rwxr-xr-xabs/core-testing/linhes-scripts/removecommercials.sh233
-rwxr-xr-xabs/core-testing/linhes-scripts/run-limit-mythcommflag2
-rwxr-xr-xabs/core-testing/linhes-scripts/run-pause-mythcommflag2
-rwxr-xr-xabs/core-testing/linhes-scripts/screenshooter.sh230
-rwxr-xr-xabs/core-testing/linhes-scripts/shootscreens-mythtv.sh19
-rwxr-xr-xabs/core-testing/linhes-scripts/shootscreens.sh44
-rwxr-xr-xabs/core-testing/linhes-scripts/system-cleanup.sh47
-rw-r--r--abs/core-testing/linhes-scripts/update_schema_021_to_022.sh21
-rwxr-xr-xabs/core-testing/linhes-scripts/upgrade_linhes.sh136
-rw-r--r--abs/core-testing/linhes-scripts/upgrade_to_0.22.sh94
-rwxr-xr-xabs/core-testing/linhes-scripts/vdpau-detector103
35 files changed, 0 insertions, 2861 deletions
diff --git a/abs/core-testing/linhes-scripts/770-wrapper.sh b/abs/core-testing/linhes-scripts/770-wrapper.sh
deleted file mode 100755
index 3095541..0000000
--- a/abs/core-testing/linhes-scripts/770-wrapper.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-# 770-wrapper.sh by Cecil Watsona
-# Modifed from
-# pdatranscode
-#
-# created by Jeff Volckaert (inspired by Zach White)
-# modified 01/16/06
-VIDEODIR=$1
-FILENAME=$2
-TITLE=$3
-# Remove non-alpha characters from TITLE
-TITLE=${TITLE//[^a-zA-Z0-9]/}
-STARTTIME=$4
-DIROUT=/myth/n770
-
-# Sanity checking, to make sure everything is in order.
-if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then
- echo "Usage: $0 <VideoDirectory> <FileName> "<Title>" <Starttime>"
- exit 5
-fi
-if [ ! -f $VIDEODIR/$FILENAME ]; then
- echo "File does not exist: $VIDEODIR/$FILENAME"
- exit 6
-fi
-
-# Transcode the file
-
-
-perl /usr/bin/tablet-encode -q -p mplayer $VIDEODIR/$FILENAME $DIROUT/$TITLE-$STARTTIME.avi
-
-chmod 664 $DIROUT/$TITLE-$STARTTIME.avi
-
-ERROR=$?
-if [ $ERROR -ne 0 ]; then
- echo "Transcoding failed for ${FILENAME} with error $ERROR"
- exit 3
-fi
diff --git a/abs/core-testing/linhes-scripts/PKGBUILD b/abs/core-testing/linhes-scripts/PKGBUILD
deleted file mode 100644
index 07ddbc9..0000000
--- a/abs/core-testing/linhes-scripts/PKGBUILD
+++ /dev/null
@@ -1,91 +0,0 @@
-# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
-# Maintainer: Cecil Watson<knoppmyth@gmail.com>
-
-pkgname=linhes-scripts
-pkgver=1
-pkgrel=78
-pkgdesc="Various scripts that help to make LinHES, LinHES."
-arch=('i686' 'x86_64')
-license=('GPL2')
-depends=('xosd' 'cpulimit')
-url="http://linhes.org/"
-install="linhes-scripts.install"
-source=(
-myth2xvid
-shootscreens.sh
-mplayer-resumer-vdpau.pl
-run-pause-mythcommflag
-shootscreens-mythtv.sh
-importfiles.sh
-myth2mp3
-mplayer-resumer.pl
-mythwelcome-test-wakeup.sh
-pause-mythcommflag.sh
-myth2x264
-770-wrapper.sh
-mythwelcome-set-alarm.sh
-mythwelcome-config.py
-pause_mythcommflag
-limit-mythcommflag.sh
-vdpau-detector
-idle.sh
-screenshooter.sh
-run-limit-mythcommflag
-linhes_update.sh
-linhes_update2.sh
-linhes_update3.sh
-install_hulu.sh
-update_schema_021_to_022.sh
-upgrade_linhes.sh
-remove_php_mythvideo.sh
-removecommercials.sh
-system-cleanup.sh
-myth2fuze
-dct700-cc.sh
-qip7100-cc.sh
-)
-
-build() {
- cd $startdir/src
- mkdir -p $startdir/pkg/usr/LH/bin
- install -D -m755 myt* 770* *.sh imp* shoo* *commflag*sh mplayer* vdpau* screen* linhes_* install_hulu.sh $startdir/pkg/usr/LH/bin
- mkdir -p $startdir/pkg/etc/sv/pause-mythcommflag/supervise
- cp run-pause-mythcommflag $startdir/pkg/etc/sv/pause-mythcommflag/run
- mkdir -p $startdir/pkg/etc/sv/limit-mythcommflag/supervise
- cp run-limit-mythcommflag $startdir/pkg/etc/sv/limit-mythcommflag/run
- mkdir -p $startdir/pkg/etc/logrotate.d/
- cp pause_mythcommflag $startdir/pkg/etc/logrotate.d/
-}
-
-md5sums=('f56985b2d602e11dc1e10d3e7848b2a5'
- '9a2181cdc0bc9cc8b42101f19620def8'
- '9ae2cd7a0c42d57ad8b5f515d7d60196'
- '1274bad3fb7296f00acd2d44804bad14'
- '47225fa9b6c953d56f6ede84d921a300'
- '6b6e7d34a4bda6d608d150039adefd07'
- '3fe554dbbf7d09e1f9925032ba888bf5'
- '18263972b6326e140bbef0bb7dfa2da9'
- '410795ef9039e4c6c0484e706ecfd567'
- '0750d7c65109d12aa536f312a38410d1'
- 'ac2a4a6b4100f4d7bfb9ecd9356c8c6e'
- 'd2b475821f902c5e081e7da43a35e6ac'
- '95c092f67036a361ef7a57436f44332e'
- 'a87e7394bfb3fcc5c2419a2f9ae9b9aa'
- '3b776bbff68906ddc2f62b7e0dde3fe4'
- '15f3143d2b1369da431e4268029aba40'
- '3d0adf26280cde55a0c47188fff34826'
- '93aaa2940e33ec9ebb305b839ac46a3e'
- '27a8b3680f3c631a582064fd26ab8746'
- 'b527b01d119d3bc33b8fa69bdf1082bb'
- 'c537c44156d8404016cc4b405b092d45'
- '4e66f302a77f1a857476e7f289d0c157'
- 'be324dba44ae96676973a74421944853'
- 'ccca6bdbbd86b203a3eecdbbe363e701'
- '65629302a4d2c3adf88cdf0ebc10d493'
- '2734054f08c4c885bb9070dce239d4c3'
- '87b0dc855181f98516acb18a7d551601'
- 'c54a3afd4aa3c1af560c9b6adb600f3a'
- '2fb25aef03ffd1282414d8cca3df7056'
- 'd2a29444ab9036fb385bbf044daf1ff5'
- 'df727c98350a64e2171c950bbefc9c5d'
- '7b890e7044db38e8d439f67e398af206')
diff --git a/abs/core-testing/linhes-scripts/dct700-cc.sh b/abs/core-testing/linhes-scripts/dct700-cc.sh
deleted file mode 100644
index c8d8cf6..0000000
--- a/abs/core-testing/linhes-scripts/dct700-cc.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#Script to control DCT 700/2524 on emitter #1 of CommandIR
-irsend set_transmitters 1
-REMOTE_NAME=DCT700
-cmd="$1"
-irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME menu
-sleep 1
-irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME exit
-sleep 1
-
-case $cmd in
- [0-9]*)
- for digit in $(echo $1 | sed -e 's/./& /g'); do
- irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME $digit
- sleep .2
- # If things work OK with sleep 1, try this for faster channel changes:
- # sleep 0.3
- done
- irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME ok
-sleep .3
- irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME exit
- ;;
-
- *)
- irsend SEND_ONCE $REMOTE_NAME $cmd
- ;;
-esac
diff --git a/abs/core-testing/linhes-scripts/idle.sh b/abs/core-testing/linhes-scripts/idle.sh
deleted file mode 100755
index f95b9fa..0000000
--- a/abs/core-testing/linhes-scripts/idle.sh
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/bash
-
-usage () {
- echo "Usage: $0 [-h] [-s] [-t <minutes_needed>]"
- echo
- echo "-h - Print this help/usage message and quit"
- echo "-s - Run silently (default is verbose)"
- echo "-t - Minutes of idle time needed (default is 20)"
- echo "-v - Be more verbose for debugging"
- echo
- echo "Silent mode is recommended for use in cron jobs or scripts."
- exit $1
-}
-
-msg () { # A status reporting function
- [ "$VERBOSE" -ne 0 ] && echo "$*"
-}
-
-mysql_cmd () {
- /usr/bin/mysql -u root mythconverg -sBe "$*"
-}
-
-# Command line argument handling
-VERBOSE=1
-TIME_BEFORE=20
-TIME_AFTER=5 # Only adjustable by editing here
-
-while getopts "hst:v" OPT ; do
- case $OPT in
- h) usage 0 ;;
- s) VERBOSE=0 ;;
- t) TIME_BEFORE=$OPTARG ;;
- v) VERBOSE=2 ;;
- *) usage 1 ;;
- esac
-done
-# Check for extra cruft on the command line...
-shift $(($OPTIND - 1))
-[ -n "$*" ] && usage 1
-
-msg "Checking what MythTV is doing now or plans within $TIME_BEFORE minutes..."
-msg
-
-/usr/bin/mythshutdown -s 1
-BUSY="$?"
-msg "mythshutdown returned $BUSY"
-# Ignore certain non-zero flag values
-BUSY=$(($BUSY & 0x2F))
-
-SCHEMALOCK=$(mysql_cmd "select count(*) from schemalock")
-msg "schemalock $SCHEMALOCK"
-
-JOBS=$(mysql_cmd "select count(*) from jobqueue where status = 4")
-msg "running jobs $JOBS"
-
-INUSE=$(mysql_cmd "select count(*) from inuseprograms")
-msg "inuse programs $INUSE"
-
-POTENTIAL=$(mysql_cmd "select count(*) from recordmatch as rm, program as p
- where rm.chanid = p.chanid and rm.starttime = p.starttime
- and rm.starttime < now() + interval $TIME_BEFORE minute
- and now() < p.endtime + interval $TIME_AFTER minute")
-msg "potential recordings $POTENTIAL"
-# See if any of the potential upcoming recordings are real.
-# This is ugly, but only the backend knows what programs it really
-# plans to record or ignore, so we can't just check the DB. :-(
-if [ "$VERBOSE" -ge 2 ] ; then
- mysql_cmd "select p.starttime, p.endtime, p.title, subtitle
- from recordmatch as rm, program as p
- where rm.chanid = p.chanid and rm.starttime = p.starttime
- and rm.starttime < now() + interval $TIME_BEFORE minute
- and now() < p.endtime + interval $TIME_AFTER minute
- order by p.starttime, p.endtime"
-fi
-UPCOMING=$(/usr/bin/mythbackend --printsched 2>&1 |
- /bin/awk -v potential=$POTENTIAL '
- BEGIN {item=-1;real=0}
- /--- print list start ---/,/--- print list end ---/ {
- if (item>0 && item<=potential && substr($0,70,1) ~ "[0-9]") real+=1;
- item += 1;
- }
- END {print real}
-')
-msg "planned recordings $UPCOMING"
-if [ "$VERBOSE" -ge 2 ] ; then
- /usr/bin/mythbackend --printsched 2>&1 |
- /bin/awk -v potential=$POTENTIAL '
- BEGIN {item=-1}
- /--- print list start ---/,/--- print list end ---/ {
- if (item>0 && item<=potential) print $0;
- item += 1;
- }'
-fi
-activities=$(($BUSY + $SCHEMALOCK + $JOBS + $INUSE + $UPCOMING))
-msg
-if [ "$activities" -eq 0 ] ; then
- msg "System is idle"
- exit 0
-else
- msg "System is busy"
- exit 1
-fi
diff --git a/abs/core-testing/linhes-scripts/importfiles.sh b/abs/core-testing/linhes-scripts/importfiles.sh
deleted file mode 100755
index 84f1ab5..0000000
--- a/abs/core-testing/linhes-scripts/importfiles.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-export FONT="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
-
-DVD_or_CD=`cat /proc/mounts |grep iso9660|awk '{print $2}'|tail -1`
-if [ "$DVD_or_CD" != "" ]; then
- echo "Copying files from $DVD_or_CD to /myth/video." > /tmp/screens
- echo "This could take several minutes, depending on the" >> /tmp/screens
- echo "speed and size of your optical media." >> /tmp/screens
- cat /tmp/screens | osd_cat --font=$FONT --shadow=3 --pos=middle --align=centre --color=yellow --delay=0 &
- /bin/cp -R $DVD_or_CD/* /myth/video/
- killall osd_cat
- echo "Copied videos from $DVD_or_CD to /myth/video" > /tmp/screens
- cat /tmp/screens | osd_cat --font=$FONT --shadow=3 --pos=middle --align=centre --color=yellow --delay=2 &
-else
- echo "No optical media found. If you just inserted" > /tmp/screens
- echo "your media, please wait a moment and try again." >> /tmp/screens
- cat /tmp/screens | osd_cat --font=$FONT --shadow=3 --pos=middle --align=centre --color=yellow --delay=5 &
-fi
diff --git a/abs/core-testing/linhes-scripts/install_hulu.sh b/abs/core-testing/linhes-scripts/install_hulu.sh
deleted file mode 100644
index 9b06b2e..0000000
--- a/abs/core-testing/linhes-scripts/install_hulu.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-#install_hulu.sh
-if [ -e /tmp/huludesktop_i386.deb ]
-then
-cd /tmp
-deb2targz huludesktop_i386.deb
-tar -xzvf huludesktop_i386.tar.gz -C /
-else
-echo "Cannot find huludesktop_i386.deb."
-echo "Please download it from http://www.hulu.com/labs/hulu-desktop-linux"
-echo "Then copy (or move) it to /tmp"
-exit
-fi
-if grep -q Hulu /usr/share/mythtv/themes/defaultmenu/is.xml
-then
-echo "Hulu Desktop exist in Online Streams!"
-else
- mv /usr/share/mythtv/themes/defaultmenu/is.xml /tmp
- grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
- echo "<!--#Hulu-->" >> /tmp/is.xml.tmp
- echo " <button>" >> /tmp/is.xml.tmp
- echo " <type>STREAM</type>" >> /tmp/is.xml.tmp
- echo " <text>Hulu Desktop</text>" >> /tmp/is.xml.tmp
- echo " <action>EXEC huludesktop</action>" >> /tmp/is.xml.tmp
- echo " </button>" >> /tmp/is.xml.tmp
- echo "<!--#Hulu-->" >> /tmp/is.xml.tmp
- echo "" >> /tmp/is.xml.tmp
- echo "</mythmenu>" >> /tmp/is.xml.tmp
- mv /tmp/is.xml.tmp /usr/share/mythtv/themes/defaultmenu/is.xml
-echo "Hulu Desktop has been added to Online Streams!"
-fi
-if [ -e /home/mythtv/.huludesktop ]
-then
-echo "Found existing Hulu configuration file."
-else
-cat >> /home/mythtv/.huludesktop << EOF
-[display]
-fullscreen = TRUE
-width = 1024
-height = 576
-pos_x = 201
-pos_y = 179
-
-[remote]
-lirc_device = /dev/lircd
-lirc_remote_identifier = mceusb
-lirc_release_suffix = _UP
-lirc_repeat_threshold = 10
-button_name_up = Up
-button_name_down = Down
-button_name_left = Left
-button_name_right = Right
-button_name_select = OK
-button_name_menu = Home
-
-[flash]
-flash_location = /usr/lib/mozilla/plugins/libflashplayer.so
-
-[screensaver]
-suspend_script = /usr/bin/xscreensaver-command -deactivate
-resume_script = /usr/bin/xscreensaver-command -activate
-
-[version]
-latest = (null)
-eula_version = 0
-EOF
-chown mythtv.mythtv /home/mythtv/.huludesktop
-fi
-echo "Integration of Hulu Desktop is now complete!"
-echo "Thanks for using LinHES!"
diff --git a/abs/core-testing/linhes-scripts/limit-mythcommflag.sh b/abs/core-testing/linhes-scripts/limit-mythcommflag.sh
deleted file mode 100755
index 5cd81bb..0000000
--- a/abs/core-testing/linhes-scripts/limit-mythcommflag.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-# limit-mythcommflag.sh v0.2 03/2/10
-# Utility to automatically limit mythcommflag if CPU system load is above a certain level
-# and if backend usage is above a certain level
-# Uses cpulimit from http://cpulimit.sourceforge.net/
-# Free for any use.
-# Installation:
-# cp limit-mythcommflag.sh /usr/LH/bin
-# chmod +x /usr/LH/bin/limit-mythcommflag.sh
-# Usage: Executed from runit limit-mythcommflag at boot
-
-#-----OPTIONS______
-# Number of seconds to wait between checking for mythcommflag process
-SLEEP=5
-# Backend and Frontend thresholds above which mythcommflag is stopped
-BETHRESHOLD=30
-FETHRESHOLD=55
-
-# FUNCTIONS
-limit_cpu()
-# Arg_1 = LimitedRangeNum; Arg_2 = CPULimitPercent; Arg_3 = Commflag PID
-{
-if [ $ALREADYLIMITED -ne $1 ] ; then
- if [ $cpulimit_pid -ne 0 ]; then
- kill $cpulimit_pid
- fi
- cpulimit -p $3 -l $2 &
- cpulimit_pid=$!
- ALREADYLIMITED=$1
-fi
-}
-
-stop_limit()
-{
-if [ $ALREADYLIMITED -ne 0 ]; then
- if [ $cpulimit_pid -ne 0 ]; then
- kill $cpulimit_pid
- cpulimit_pid=0
- fi
- ALREADYLIMITED=0
-fi
-}
-
-ALREADYLIMITED=0
-STOPPED=0
-cpulimit_pid=0
-
-while true; do
- PROCCOMMFLAG=`pidof mythcommflag`
- if [ -n "${PROCCOMMFLAG}" ]; then
- BACKENDCPU=`top -bn1u mythtv | grep -m 1 mythbackend | awk '{ print $9 }'`
- FRONTENDCPU=`top -bn1u mythtv | grep -m 1 mythfrontend | awk '{ print $9 }'`
- if [ "$FRONTENDCPU" = "" ]; then
- FRONTENDCPU=0
- fi
- if [ "$BACKENDCPU" -ge "$BETHRESHOLD" ]; then
- if [ "$FRONTENDCPU" -ge $FETHRESHOLD ]; then
- if [ $STOPPED -eq 0 ]; then
- kill -s STOP $PROCCOMMFLAG
- STOPPED=1
- fi
- else
- if [ $STOPPED -eq 1 ]; then
- kill -s CONT $PROCCOMMFLAG
- STOPPED=0
- fi
- stop_limit
- fi
- else
- if [ $STOPPED -eq 1 ]; then
- kill -s CONT $PROCCOMMFLAG
- STOPPED=0
- fi
- case $FRONTENDCPU in
- [0-9]|[0-3][0-9] )
- stop_limit;;
- [4-5][0-9] )
- limit_cpu "1" "70" $PROCCOMMFLAG;;
- [6-7][0-9] )
- limit_cpu "2" "50" $PROCCOMMFLAG;;
- [8-9][0-9] )
- limit_cpu "3" "20" $PROCCOMMFLAG;;
- [1][0-9][0-9] )
- limit_cpu "4" "10" $PROCCOMMFLAG;;
- esac
- fi
-# else
-# echo "No COMMFLAG Process Active"
- fi
- sleep $SLEEP
-done
diff --git a/abs/core-testing/linhes-scripts/linhes-scripts.install b/abs/core-testing/linhes-scripts/linhes-scripts.install
deleted file mode 100644
index f554bd0..0000000
--- a/abs/core-testing/linhes-scripts/linhes-scripts.install
+++ /dev/null
@@ -1,7 +0,0 @@
-
-post_upgrade() {
- . /etc/profile
- /usr/LH/bin/remove_php_mythvideo.sh
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/abs/core-testing/linhes-scripts/linhes_update.sh b/abs/core-testing/linhes-scripts/linhes_update.sh
deleted file mode 100644
index 39d2817..0000000
--- a/abs/core-testing/linhes-scripts/linhes_update.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-dsply () {
- if grep -q Updates\ Available /usr/share/mythtv/themes/defaultmenu/linhes.xml
- then
- killall -9 osd_cat
- echo -e "Updates available!\n Exit and reenter Service Menu\n to perform updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 10 -A centre
- exit
- else
- killall -9 osd_cat
- echo -e "Checking for updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 300 -A centre &
- fi
-}
-chck () {
- sudo pacman -Sy
- sudo pacman -Qu > /tmp/to_be_upgraded
-# sudo grep Target /tmp/check_update > /tmp/to_be_upgraded
- if grep -q no\ upgrades\ found /tmp/check_update
- then
- killall -9 osd_cat
- echo -e "No updates available\n at this time." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre
- else
- mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp
- sed -e '/\#Check/,/\#Check/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/themes/defaultmenu/linhes.xml
- mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp
- grep -v -e /mythmenu /tmp/linhes.xml > /tmp/linhes.xml.tmp
- echo "<!--#UpdatesAvailable-->" >> /tmp/linhes.xml.tmp
- echo " <button>" >> /tmp/linhes.xml.tmp
- echo " <type>UPGRADE</type>" >> /tmp/linhes.xml.tmp
- echo " <text>Updates Available</text>" >> /tmp/linhes.xml.tmp
- echo " <action>MENU update2.xml</action>" >> /tmp/linhes.xml.tmp
- echo " </button>" >> /tmp/linhes.xml.tmp
- echo "<!--#UpdatesAvailable-->" >> /tmp/linhes.xml.tmp
- echo "</mythmenu>" >> /tmp/linhes.xml.tmp
- mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml
- dsply
- fi
- }
-dsply
-chck
diff --git a/abs/core-testing/linhes-scripts/linhes_update2.sh b/abs/core-testing/linhes-scripts/linhes_update2.sh
deleted file mode 100644
index 80945eb..0000000
--- a/abs/core-testing/linhes-scripts/linhes_update2.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-killall -9 osd_cat
-echo -e "Performing updates." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 300000 -A centre &
-sudo pacman -Suf --noconfirm && sudo killall -9 osd_cat
-if grep -q Check\ for\ updates /usr/share/mythtv/themes/defaultmenu/linhes.xml
-then
-rm -fr /tmp/to_be_upgraded
-killall -9 osd_cat
-echo -e "Update complete." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre
-else
-mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp
-sed -e '/\#UpdatesAv/,/\#UpdatesAv/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/themes/defaultmenu/linhes.xml
-mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp
-grep -v -e /mythmenu /tmp/linhes.xml > /tmp/linhes.xml.tmp
-echo "<!--#Check for updates-->" >> /tmp/linhes.xml.tmp
-echo " <button>" >> /tmp/linhes.xml.tmp
-echo " <type>UPGRADE</type>" >> /tmp/linhes.xml.tmp
-echo " <text>Upgrade LinHES</text>" >> /tmp/linhes.xml.tmp
-echo " <action>MENU update.xml</action>" >> /tmp/linhes.xml.tmp
-echo " </button>" >> /tmp/linhes.xml.tmp
-echo "<!--#Check for updates-->" >> /tmp/linhes.xml.tmp
-echo "" >> /tmp/linhes.xml.tmp
-echo "</mythmenu>" >> /tmp/linhes.xml.tmp
-mv /tmp/linhes.xml.tmp /usr/share/mythtv/themes/defaultmenu/linhes.xml
-rm -fr /tmp/to_be_upgraded
-killall -9 osd_cat
-echo -e "Update complete." | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 5 -A centre
-fi
diff --git a/abs/core-testing/linhes-scripts/linhes_update3.sh b/abs/core-testing/linhes-scripts/linhes_update3.sh
deleted file mode 100644
index 5dc0b4d..0000000
--- a/abs/core-testing/linhes-scripts/linhes_update3.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-sudo killall osd_cat
-cat /tmp/to_be_upgraded | sed 's/ /\n/g' | sed '/^$/d' | grep - > /tmp/to_be_upgraded2
-COUNT=$(wc -l /tmp/to_be_upgraded2 | awk '{print $1}')
-if [ $COUNT -lt 20 ]
- then
- cat /tmp/to_be_upgraded2 | osd_cat -p top -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 12 -A centre -l 20
- else
- cat /tmp/to_be_upgraded2 | osd_cat -p top -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 1 -A centre -l 20 -w
-fi
-if grep kernel26 /tmp/to_be_upgraded2
-then
- killall -9 osd_cat
- echo -e "Please note:\The kernel will be upgraded.\nThis will require a reboot.\nPlease do so when no jobs are running." | osd_cat -p middle -s 5 -f"-adobe-courier-bould-*-*-*-34-*-*-*-*-*" -d 10 -A centre
-else
- exit
-fi
diff --git a/abs/core-testing/linhes-scripts/mplayer-resumer-vdpau.pl b/abs/core-testing/linhes-scripts/mplayer-resumer-vdpau.pl
deleted file mode 100755
index 9c82158..0000000
--- a/abs/core-testing/linhes-scripts/mplayer-resumer-vdpau.pl
+++ /dev/null
@@ -1,204 +0,0 @@
-#!/usr/bin/perl
-
-use Shell;
-use strict;
-use POSIX qw(floor);
-
-# 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
-
-# CHANGE LOG:
-# 3/9/2009
-# Modded Bob's wonderful resumer script to work with the vdpau
-# options detector script someone anonymously posted to the wiki
-#
-# http://www.knoppmythwiki.org/index.php?page=HardwareAcceleratedVideo
-#
-# You need to have both this and the vdpau-detector script in the same
-# dir for this to work properly. Also, change your default mplayer
-# options in mythfrontend to read simply: # mplayer-resumer-vdpau.pl %s
-#
-# To tweak the shell commands for mplayer, edit the vdpau-detector script.
-# It has a small README inside it as comments
-# ENJOY!
-
-# 5/3/2006
-# Added last time started checking.
-# If this script is restarted within $tdiff (default 5 seconds)
-# then it will delete the file used to keep track of the videos
-# resume position.
-
-# PURPOSE:
-# --------------------------
-# This is a wrapper script to prove the concept of having MythTV
-# resume playback of previously-stopped video where you left off.
-# It's likely that a good solution will look different than this
-# initial code.
-
-# RATIONALE:
-# --------------------------
-# Watching 90% of a video and stopping causes you to return to the
-# beginning again the next time you watch it. Remembering where
-# you were in the video and resuming at that position is a much nicer
-# behavior for the user.
-#
-# By default, mplayer spits out timecode information that tells you
-# where you are in the video, to the tenth of a second. Mplayer also
-# supports a seek feature on the command-line. We can make use of these
-# features to write an mplayer wrapper that will remember the last
-# position in a video file and resume to it on playback.
-
-# PARAMETERS:
-# --------------------------
-# see print_usage() below
-
-# FILES:
-# --------------------------
-# $infile, the video to play
-# $resumefile, the video's resume file (see get_resume_filename() below)
-
-# KNOWN ISSUES:
-# --------------------------
-# Mplayer misreports the timecodes on .nuv MPEG-2 files. Currently, anything
-# captured via an HDTV tuner card and put into your /myth/video directory
-# will fail with this resumer.
-#
-# Current theories include the timecode having to do with the show's broadcast
-# time, recording time, or perhaps its upload time to the station that
-# broadcast it.
-
-# DESIGN LIMITATION:
-# -------------------------
-# If the video file to be played is on a read-only filesystem, or otherwise
-# lives in a location that cannot be written to, resume will fail. This is
-# because the current implementation uses a file parallel to the video file
-# to store the timecode.
-#
-
-my $infile;
-my $resumefile;
-my $mplayer_parameters;
-my $fudge_factor=2; # number of additional seconds to skip back before playback
-my $tnow; # Time now.
-my $tprev; # Time the prog was last started.
- # Returned from the modification time of the xx.resume file.
-my $tdiff=5; # How many seconds before we should start from
- # the beginning of the movie
-#DEBUG
-#open(DEBUG,">/tmp/debug") || die "unable to open debug file";
-
-sub init () {
- $tnow = time();
- $infile = @ARGV[$#ARGV];
-
- $resumefile = &get_resume_filename($infile);
- # This returns the 9th element of the 13 element array
- # created by the stat function.
- $tprev = (stat ($resumefile))[9];
- # if this file is restarted in less than 5 seconds then
- # remove the .resume file
- if ( ($tnow - $tprev) < $tdiff ) {
- unlink($resumefile);
- }
-
- $mplayer_parameters = join(' ',@ARGV[0..$#ARGV-1]);
-}
-
-&init();
-&save_time_offset(&mplayer($mplayer_parameters,$infile), $resumefile);
-
-#close(DEBUG);
-
-# For $pathname, return $path.$filename.resume
-sub get_resume_filename () {
- my($pathname)=@_;
-
- my $idx = rindex($pathname,"/");
-
- if ($idx == -1) { # There was no "/" in $pathname
- return ".".$pathname.".resume";
- } else {
- # Now we need to split out the path from the filename.
- my $path = substr($pathname,0,$idx+1);
- my $filename = substr($pathname,$idx+1);
- return "$path.$filename.resume";
- }
-}
-
-# Calls mplayer and returns the last known video position
-sub mplayer () {
- my($parameters,$infile)=@_;
- my $seconds=0;
- my $timecode=&get_time_offset($infile);
- my $mplayeropts=`./vdpau-detector $infile`; chomp $mplayeropts;
- my @lines = split "\n", $mplayeropts;
- my $last_line = pop(@lines);
- my $command = "mplayer $last_line $parameters -ss $timecode \"$infile\" 2>&1 2>/dev/null |";
-
- open(SHELL, $command);
- # The kind of line we care about looks like this example:
- # A:1215.2 V:1215.2 A-V: 0.006 ct: 0.210 207/201 13% 0% 1.9% 0 0 68%
- # But all we care to look at is the first number.
-
- while (<SHELL>) {
- #print DEBUG $_;
- if (m/A: *[0-9]+\.[0-9]/) { # See if this line has timecodes on it
- my $last_timecode_line = &extract_last_timecode_line($_);
- if ($last_timecode_line =~ m/ *([0-9]+\.[0-9]) V/) {
- $seconds=$1;
- }
- }
- }
- close(SHELL);
-
- return $seconds;
-
- sub extract_last_timecode_line () {
- my ($line)=@_;
- my @lines=split('A:',$line);
- return @lines[$#lines-1];
- }
-}
-
-# Save the last known video position
-sub save_time_offset () {
- my($seconds, $resumefile)=@_;
-
- open(RESUMEFILE, ">$resumefile") || die "Unable to open $resumefile for writing";
- print RESUMEFILE "$seconds";
- close(RESUMEFILE);
-}
-
-# returns the number of seconds corresponding to the last known video position,
-# in hh:mm:ss format, compatible with the "-ss" parameter to mplayer
-sub get_time_offset () {
- my($videofile)=@_;
- my($resumefile) = &get_resume_filename($videofile);
- my $seconds=0;
- my $timecode;
-
- open(RESUMEFILE, "<$resumefile") || return "00:00:00";
- while(<RESUMEFILE>) {
- $seconds=$_;
- }
- close(RESUMEFILE);
-
- my $hours = floor($seconds/3600);
- $seconds = $seconds - $hours*3600;
-
- my $minutes = floor($seconds/60);
- $seconds = int($seconds - $minutes*60) - $fudge_factor;
-
- $timecode = sprintf "%02d:%02d:%02d",$hours,$minutes,$seconds;
-# print "TIMECODE: $timecode\n";
- return $timecode;
-}
-
-sub print_usage () {
- print "USAGE:\n";
- print "\t",$ARGV[0], "[mplayer parameters] video_file\n";
- print "\t","e.g. ",$ARGV[0], "-fs -zoom my.mpg\n";
- print "\t","Version 3/9/2009\n";
-}
diff --git a/abs/core-testing/linhes-scripts/mplayer-resumer.pl b/abs/core-testing/linhes-scripts/mplayer-resumer.pl
deleted file mode 100755
index c785a25..0000000
--- a/abs/core-testing/linhes-scripts/mplayer-resumer.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl
-
-use Shell;
-use strict;
-use POSIX qw(floor);
-
-# 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
-
-# PURPOSE:
-# --------------------------
-# This is a wrapper script to prove the concept of having MythTV
-# resume playback of previously-stopped video where you left off.
-# It's likely that a good solution will look different than this
-# initial code.
-
-# RATIONALE:
-# --------------------------
-# Watching 90% of a video and stopping causes you to return to the
-# beginning again the next time you watch it. Remembering where
-# you were in the video and resuming at that position is a much nicer
-# behavior for the user.
-#
-# By default, mplayer spits out timecode information that tells you
-# where you are in the video, to the tenth of a second. Mplayer also
-# supports a seek feature on the command-line. We can make use of these
-# features to write an mplayer wrapper that will remember the last
-# position in a video file and resume to it on playback.
-
-# PARAMETERS:
-# --------------------------
-# see print_usage() below
-
-# FILES:
-# --------------------------
-# $infile, the video to play
-# $resumefile, the video's resume file (see get_resume_filename() below)
-
-# KNOWN ISSUES:
-# --------------------------
-# Mplayer misreports the timecodes on .nuv MPEG-2 files. Currently, anything
-# captured via an HDTV tuner card and put into your /myth/video directory
-# will fail with this resumer.
-#
-# Current theories include the timecode having to do with the show's broadcast
-# time, recording time, or perhaps its upload time to the station that
-# broadcast it.
-
-# DESIGN LIMITATION:
-# -------------------------
-# If the video file to be played is on a read-only filesystem, or otherwise
-# lives in a location that cannot be written to, resume will fail. This is
-# because the current implementation uses a file parallel to the video file
-# to store the timecode.
-#
-
-# CHANGE LOG:
-# 5/3/2006
-# Added last time started checking.
-# If this script is restarted within $tdiff (default 5 seconds)
-# then it will delete the file used to keep track of the videos
-# resume position.
-
-
-my $infile;
-my $resumefile;
-my $mplayer_parameters;
-my $fudge_factor=2; # number of additional seconds to skip back before playback
-my $tnow; # Time now.
-my $tprev; # Time the prog was last started.
- # Returned from the modification time of the xx.resume file.
-my $tdiff=5; # How many seconds before we should start from
- # the beginning of the movie
-#DEBUG
-#open(DEBUG,">/tmp/debug") || die "unable to open debug file";
-
-sub init () {
- $tnow = time();
- $infile = @ARGV[$#ARGV];
-
- $resumefile = &get_resume_filename($infile);
- # This returns the 9th element of the 13 element array
- # created by the stat function.
- $tprev = (stat ($resumefile))[9];
- # if this file is restarted in less than 5 seconds then
- # remove the .resume file
- if ( ($tnow - $tprev) < $tdiff ) {
- unlink($resumefile);
- }
-
- $mplayer_parameters = join(' ',@ARGV[0..$#ARGV-1]);
-}
-
-&init();
-&save_time_offset(&mplayer($mplayer_parameters,$infile), $resumefile);
-
-#close(DEBUG);
-
-# For $pathname, return $path.$filename.resume
-sub get_resume_filename () {
- my($pathname)=@_;
-
- my $idx = rindex($pathname,"/");
-
- if ($idx == -1) { # There was no "/" in $pathname
- return ".".$pathname.".resume";
- } else {
- # Now we need to split out the path from the filename.
- my $path = substr($pathname,0,$idx+1);
- my $filename = substr($pathname,$idx+1);
- return "$path.$filename.resume";
- }
-}
-
-# Calls mplayer and returns the last known video position
-sub mplayer () {
- my($parameters,$infile)=@_;
- my $seconds=0;
- my $timecode=&get_time_offset($infile);
- my $command = "mplayer $parameters -ss $timecode \"$infile\" 2>&1 2>/dev/null |";
-
- open(SHELL, $command);
- # The kind of line we care about looks like this example:
- # A:1215.2 V:1215.2 A-V: 0.006 ct: 0.210 207/201 13% 0% 1.9% 0 0 68%
- # But all we care to look at is the first number.
-
- while (<SHELL>) {
- #print DEBUG $_;
- if (m/A: *[0-9]+\.[0-9]/) { # See if this line has timecodes on it
- my $last_timecode_line = &extract_last_timecode_line($_);
- if ($last_timecode_line =~ m/ *([0-9]+\.[0-9]) V/) {
- $seconds=$1;
- }
- }
- }
- close(SHELL);
-
- return $seconds;
-
- sub extract_last_timecode_line () {
- my ($line)=@_;
- my @lines=split('A:',$line);
- return @lines[$#lines-1];
- }
-}
-
-# Save the last known video position
-sub save_time_offset () {
- my($seconds, $resumefile)=@_;
-
- open(RESUMEFILE, ">$resumefile") || die "Unable to open $resumefile for writing";
- print RESUMEFILE "$seconds";
- close(RESUMEFILE);
-}
-
-# returns the number of seconds corresponding to the last known video position,
-# in hh:mm:ss format, compatible with the "-ss" parameter to mplayer
-sub get_time_offset () {
- my($videofile)=@_;
- my($resumefile) = &get_resume_filename($videofile);
- my $seconds=0;
- my $timecode;
-
- open(RESUMEFILE, "<$resumefile") || return "00:00:00";
- while(<RESUMEFILE>) {
- $seconds=$_;
- }
- close(RESUMEFILE);
-
- my $hours = floor($seconds/3600);
- $seconds = $seconds - $hours*3600;
-
- my $minutes = floor($seconds/60);
- $seconds = int($seconds - $minutes*60) - $fudge_factor;
-
- $timecode = sprintf "%02d:%02d:%02d",$hours,$minutes,$seconds;
-# print "TIMECODE: $timecode\n";
- return $timecode;
-}
-
-sub print_usage () {
- print "USAGE:\n";
- print "\t",$ARGV[0], "[mplayer parameters] video_file\n";
- print "\t","e.g. ",$ARGV[0], "-fs -zoom my.mpg\n";
- print "\t","Version 5/3/2006\n";
-}
diff --git a/abs/core-testing/linhes-scripts/myth2fuze b/abs/core-testing/linhes-scripts/myth2fuze
deleted file mode 100755
index 9e8fc3c..0000000
--- a/abs/core-testing/linhes-scripts/myth2fuze
+++ /dev/null
@@ -1,318 +0,0 @@
-#!/bin/bash
-# convert recording to avi compatable with San Disk Sansa Fuze
-# Based on and/or inspired by myth2xvid, the video4fuze project:
-# http://code.google.com/p/video4fuze
-# and the fuzemux project:
-# http://code.google.com/p/fuzemux
-#
-# version 0.2
-#
-# usage:
-# first parameter must be %DIR%/%FILE% of the recording
-# second parameter must be the %TITLE% for the output filename
-# third parameter must be the %SUBTITLE% for the output filename
-# fourth parameter must be %CHANID% if you set USECUTLIST=Y
-# fifth parameter must be %STARTTIME% for USECUTLIST=Y and output filename
-# sixth parameter must be %JOBID% for the User Job status to be updated
-# in MythTV
-# In the mythtv setup screen invoke this script like this:
-# MYTHTV User Job Command:
-# /usr/LH/bin/myth2fuze "%DIR%/%FILE%" "%TITLE%" "%SUBTITLE%" "%CHANID%" "%STARTTIME%" "%JOBID%"
-
-# options:
-USECUTLIST=Y # Y or N
-
-# check prerequesites
-for APP in {fuzemux,mencoder,ffmpeg,mythcommflag,mythtranscode,mysql}; do
- /usr/bin/which ${APP} &>/dev/null
- ERROR=$?
- if [ $ERROR -ne 0 ]; then
- echo "${APP} not found in your PATH! Aborting! ERROR: ${ERROR}" >> ${LOGFILE}
- update_status 304
- update_comment "${APP} not found in your PATH! Aborting! Exit status: ${ERROR}"
- exit 1
- fi
-done
-
-# where the converted video is stored
-OUT_DIR=/myth/video/fuze
-
-# Ensure output directory exists
-if [ ! -d ${OUT_DIR} ] ; then
- mkdir -p -m777 ${OUT_DIR}
-fi
-
-# database settings
-BACKEND_HOSTNAME=${BACKEND_HOSTNAME:-"localhost"}
-DBUSERNAME=${DBUSERNAME:-"mythtv"}
-DBPASSWORD=${DBPASSWORD:-"mythtv"}
-SQLCMD="mysql -u ${DBUSERNAME} --password=${DBPASSWORD} -h ${BACKEND_HOSTNAME} mythconverg -e"
-
-# create temp filename so multiple instances won't conflict
-TMPNAME=toFUZE-$$
-TMPDIR=/myth/tmp
-TMPFILE=${TMPDIR}/${TMPNAME}.avi
-TMPCUTFILE=${TMPDIR}/${TMPNAME}.mpg
-MENINPUTFILE=${1}
-TWOPASSFILE=/tmp/${TMPNAME}-2pass.log
-STATUSFILE=/tmp/${TMPNAME}-status.log
-MENCODER_RETURN_CODE=/tmp/${TMPNAME}-mencoder_return_code
-MENCODER_RETURN_CODE_2=/tmp/${TMPNAME}-mencoder_return_code_2
-
-# Ensure temp directory exists
-if [ ! -d ${TMPDIR} ] ; then
- mkdir -p -m777 ${TMPDIR}
-fi
-
-#------FUNCTIONS---------------
-update_comment()
-# Arg_1 = COMMENT
-{
-if [ ${NO_JOBID} = 0 ]; then
- `${SQLCMD} "update jobqueue set comment=\"${1}\" where id=\"${JOBID}\";"`
-fi
-}
-
-update_status()
-# Arg_1 = status code
-{
-if [ ${NO_JOBID} = 0 ]; then
- `${SQLCMD} "update jobqueue set status=\"${1}\" where id=\"${JOBID}\";"`
-fi
-}
-
-check_background_progress()
-# check mencoder progress in background
-# Arg_1 = PROGRESS CALCULATION
-{
-while [ `tail -1 ${STATUSFILE} | grep -cE "^Audio stream:|^Video stream:"` = 0 ]
-do
- sleep 10
- check_myth_jobcmds
- current_status=`tail -1 ${STATUSFILE} | grep "([ 0-9]\{1,\}%)"`
- prog_percent=`echo ${current_status} | sed 's_.*(\([ 0-9][ 0-9]\)%).*_\1_'`
- current_FPS=`echo ${current_status} | sed 's_.*\([ 0-9][ 0-9].[ 0-9][ 0-9]\)fps.*_\1_'`
- if [ -n ${prog_percent} ]; then
- prog_percent=`expr ${prog_percent} / ${1}`
- echo "${prog_percent}% Completed @ ${current_FPS} fps"
- update_comment "${prog_percent}% Completed @ ${current_FPS} fps"
- fi
- sleep 10
-done
-}
-
-check_myth_jobcmds()
-# check the myth database for stop pause or resume commands
-{
-if [ ${NO_JOBID} = 0 ]; then
- CURRENT_CMD=`${SQLCMD} "select cmds from jobqueue where id=\"${JOBID}\";" | sed '/[0-9]/!d'`
- case ${CURRENT_CMD} in
- # JOB_RUN
- 0) ;;
- # JOB_PAUSE
- 1) update_status 6
- kill -s STOP ${mencoder_pid} ;;
- # JOB_RESUME
- 2) update_status 4
- `${SQLCMD} "update jobqueue set cmds=\"0\" where id=\"${JOBID}\";"`
- kill -s CONT ${mencoder_pid} ;;
- # JOB_STOP
- 4) update_status 5
- `${SQLCMD} "update jobqueue set cmds=\"0\" where id=\"${JOBID}\";"`
- kill -9 ${mencoder_pid} ${command_pid}
- clean_up_files
- echo "Encode Cancelled" >> ${LOGFILE}
- update_status 320
- exit ;;
- esac
-fi
-}
-
-get_mencoder_pid()
-{
-process_name=""
-i1=1
-while [ "$process_name" != "found" ]; do
- if [ "`ps ${mencoder_pid} | grep mencoder | sed 's_.*\(mencoder\).*_\1_'`" = "mencoder" ]; then
- process_name="found"
- else
- mencoder_pid=`expr ${mencoder_pid} + 1`
- fi
- i1=`expr $i1 + 1`
- if [ $i1 -gt 20 ]; then
- break
- fi
-done
-}
-
-run_fuzemux()
-# Remux avi to fuze compatable avi
-{
-/usr/bin/nice -n19 /usr/bin/fuzemux ${TMPFILE} ${OUTPUTFILE} >> ${LOGFILE} || return 1
-}
-
-create_thumbnail()
-# Create a thumbnail image for the fuze
-{
-/usr/bin/nice -n19 /usr/bin/ffmpeg -y -v -1 -i ${OUTPUTFILE} -t 1 -ss 3 \
--s 224x176 -f image2 ${OUTPUTFILE%.*}.thm >> ${LOGFILE}
-}
-
-clean_up_files()
-# clean up left over files
-{
-unlink ${TMPFILE} 2> /dev/null
-unlink ${TMPCUTFILE} 2> /dev/null
-unlink ${TMPCUTFILE}.map 2> /dev/null
-unlink ${TWOPASSFILE} 2> /dev/null
-unlink ${TWOPASSFILE}.tmp 2> /dev/null
-unlink ${STATUSFILE} 2> /dev/null
-unlink ${MENCODER_RETURN_CODE} 2> /dev/null
-unlink ${MENCODER_RETURN_CODE_2} 2> /dev/null
-}
-
-#-------MAIN SCRIPT------------
-
-# check if %JOBID% is passed from command line
-JOBID=${6}
-if [ -z ${JOBID} ]; then
- NO_JOBID=1
-else
- NO_JOBID=0
-fi
-
-# log file location
-LOGFILE=/var/log/mythtv/myth2fuze.log
-CDate="`date`"
-echo "" >> ${LOGFILE}
-echo ${CDate} >> ${LOGFILE}
-echo "File to encode: ${MENINPUTFILE} Name: ${2} - ${3}" >> ${LOGFILE}
-
-# start timer
-beforetime="$(date +%s)"
-
-check_myth_jobcmds
-
-# check if using cutlist
-if [ ${USECUTLIST} = Y ]; then
- MYTHCOMMFRAMES=$( mythcommflag --getcutlist -f ${MENINPUTFILE} | grep 'Cutlist:' | cut -d \ -f 2 )
- if [ -n "$MYTHCOMMFRAMES" ]; then
- echo "Extracting Cutlist..." >> ${LOGFILE}
- update_comment "Extracting Cutlist"
- /usr/bin/nice -n19 /usr/bin/mythtranscode --chanid ${4} --starttime ${5} --outfile ${TMPCUTFILE} --mpeg2 --honorcutlist
- MENINPUTFILE=${TMPCUTFILE}
- fi
-fi
-
-# run mencoder in background to do 1st pass conversion
-echo "Encoding 1st Pass for the Fuze..." >> ${LOGFILE}
-( /usr/bin/nice -n19 /usr/bin/mencoder ${MENINPUTFILE} -passlogfile \
-${TWOPASSFILE} -ffourcc DX50 -ofps 20 \
--vf pp=li,expand=:::::224/176,scale=224:176,harddup -ovc lavc \
--lavcopts vcodec=mpeg4:vbitrate=683:vmax_b_frames=0:keyint=15:turbo:vpass=1 \
--nosound -o /dev/null > ${STATUSFILE} 2>&1 ; echo $? > \
-${MENCODER_RETURN_CODE} ) &
-mencoder_pid=$!
-command_pid=${mencoder_pid}
-get_mencoder_pid
-
-check_background_progress "2"
-
-if [ `cat ${MENCODER_RETURN_CODE}` -ne 0 ]; then
- echo "Mencoder pass #1 exited with error ${MENCODER_RETURN_CODE}. Encoding failed!"
- update_status 304
- update_comment "ERROR: Mencoder pass #1 exited with error ${MENCODER_RETURN_CODE}"
- clean_up_files
- exit 1
-fi
-
-# run mencoder in background to do 2nd pass conversion
-echo "Encoding 2nd Pass for the Fuze..." >> ${LOGFILE}
-( /usr/bin/nice -n19 /usr/bin/mencoder ${MENINPUTFILE} -passlogfile \
-${TWOPASSFILE} -ffourcc DX50 -ofps 20 \
--vf pp=li,expand=:::::224/176,scale=224:176,harddup -ovc lavc \
--lavcopts vcodec=mpeg4:vbitrate=683:vmax_b_frames=0:keyint=15:vpass=2 \
--srate 44100 -af resample=44100:0:1,format=s16le -oac mp3lame \
--lameopts cbr:br=128 -o ${TMPFILE} > ${STATUSFILE} 2>&1 ; echo $? \
-> ${MENCODER_RETURN_CODE_2} ) &
-mencoder_pid=$!
-command_pid=${mencoder_pid}
-get_mencoder_pid
-
-check_background_progress "2 + 50"
-
-if [ `cat ${MENCODER_RETURN_CODE_2}` -ne 0 ]; then
- echo "Mencoder pass #1 exited with error ${MENCODER_RETURN_CODE}. Encoding failed!"
- update_status 304
- update_comment "ERROR: Mencoder pass #1 exited with error ${MENCODER_RETURN_CODE_2}"
- clean_up_files
- exit 1
-fi
-
-# make output filename unique, remove punctuation and "special" characters,
-# replace spaces with underscores and force lowercase names
-OAD=$( echo ${5} | cut -b 1-8 )
-FILENAME=$( echo "${2} ${OAD} ${3}" | tr -d '[:punct:]' \
- | tr -s '[:blank:]' '[_]' | tr '[:upper:]' '[:lower:]' )_fuze.avi
-
-OUTPUTFILE=${OUT_DIR}/${FILENAME}
-ERROR=$?
-
-if [ ${ERROR} -ne 0 ]; then
- echo "Setting output file name exited with error ${ERROR}" >> ${LOGFILE}
- update_status 304
- update_comment "ERROR: Setting output file name exited with error ${ERROR} Job failed!"
- clean_up_files
- exit 1
-fi
-
-run_fuzemux
-ERROR=$?
-
-if [ ${ERROR} -ne 0 ]; then
- echo "Fuzemux exited with error ${ERROR}" >> ${LOGFILE}
- update_status 304
- update_comment "ERROR: Fuzemux exited with error ${ERROR} Job Failed!"
- clean_up_files
- exit 1
-fi
-
-# ensure mythtv owns the final avi
-chown mythtv ${OUTPUTFILE}
-ERROR=$?
-
-if [ ${ERROR} -ne 0 ]; then
- echo "Changing ownership of avi to mythtv exited with error ${ERROR}"
- update_status 304
- update_comment "ERROR: Changing ownership of avi to mythtv exited with error ${ERROR} Job failed!"
- clean_up_files
- exit 1
-fi
-
-create_thumbnail
-
-# ensure mythtv owns the thumbnail
-chown mythtv ${OUTPUTFILE%.*}.thm
-ERROR=$?
-
-if [ ${ERROR} -ne 0 ]; then
- echo "Changing ownership of thumbnail to mythtv exited with error ${ERROR}"
- update_status 304
- update_comment "ERROR: Changing ownership of thumbnail to mythtv exited with error ${ERROR} Job failed!"
- clean_up_files
- exit 1
-fi
-
-# stop timer
-aftertime="$(date +%s)"
-seconds="$(expr $aftertime - $beforetime)"
- echo "File Encoded Successfully: ${OUTPUTFILE}" >> ${LOGFILE}
- hours=$((seconds / 3600))
- seconds=$((seconds % 3600))
- minutes=$((seconds / 60))
- seconds=$((seconds % 60))
- echo "Encoding took $hours hour(s) $minutes minute(s) $seconds second(s) @ $current_FPS fps." >> ${LOGFILE}
- update_status 272
- update_comment "Encode Successful. Encoding Time: $hours hour(s) $minutes minute(s) $seconds second(s)"
-
-clean_up_files
diff --git a/abs/core-testing/linhes-scripts/myth2mp3 b/abs/core-testing/linhes-scripts/myth2mp3
deleted file mode 100755
index 89181c1..0000000
--- a/abs/core-testing/linhes-scripts/myth2mp3
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-# convert recordings to as mp3 audio only
-# version 0.9
-
-# usage:
-# first parameter must be %DIR%/%FILE% of the recording
-# second parameter must be the desired base name of the output
-# third parameter must be %CHANID% if you set USECUTLIST=Y
-# fourth parameter must be %STARTTIME% if you set USECUTLIST=Y
-# In the mythtv setup screen invoke this script like this:
-# MYTHTV User Job Command:
-# /usr/LH/bin/myth2mp3 "%DIR%/%FILE%" "%TITLE% - %SUBTITLE%" "%CHANID%" "%STARTTIME%"
-
-# options:
-BITRATE=256k #ie. 128k, 160k, 192k, 224k, 256k
-USECUTLIST=Y #Y or N
-
-# where the converted audio is stored
-OUT_DIR=/myth/music
-
-# create temp filename so multiple instances won't conflict
-TMPNAME=toMP3-$$
-TMPFILE=/myth/tmp/$TMPNAME.mp3
-TMPCUTFILE=/myth/tmp/$TMPNAME.mpg
-FFINPUTFILE=$1
-
-# log file location
-LOGFILE=/var/log/mythtv/myth2mp3.log
-CDate="`date`"
-echo "" >> $LOGFILE
-echo $CDate >> $LOGFILE
-echo "File to encode: $1 Name: $2" >> $LOGFILE
-
-# start timer
-beforetime="$(date +%s)"
-
-# check if using cutlist
-if [ $USECUTLIST = Y ];then
- MYTHCOMMFRAMES=`mythcommflag --getcutlist -f "$FFINPUTFILE" | grep 'Cutlist:' | cut -d \ -f 2`
- if [ -n "$MYTHCOMMFRAMES" ]; then
- echo "Extracting Cutlist..." >> $LOGFILE
- /usr/bin/nice -n19 /usr/bin/mythtranscode --chanid "$3" --starttime "$4" --outfile "$TMPCUTFILE" --mpeg2 --honorcutlist
- FFINPUTFILE=$TMPCUTFILE
- fi
-fi
-
-# run ffmpeg to do conversion
-echo "Encoding..." >> $LOGFILE
-/usr/bin/nice -n19 /usr/bin/ffmpeg -i "$FFINPUTFILE" -vn -acodec libmp3lame -ab $BITRATE -ar 44100 -ac 2 "$TMPFILE"
-ERROR=$?
-
-# make output filename unique
-OUTPUTFILE=$OUT_DIR/$2.mp3
-i=1
-while [ -e "$OUTPUTFILE" ]
-do
- OUTPUTFILE=$OUT_DIR/$2-$i.mp3
- i=`expr $i + 1`
-done
-
-# move temp file to output location
-chown mythtv "$TMPFILE" && mv "$TMPFILE" "$OUTPUTFILE"
-
-# stop timer
-aftertime="$(date +%s)"
-seconds="$(expr $aftertime - $beforetime)"
-
-if [ $ERROR -eq 0 ]; then
- echo "File Encoded Sucessfully: $OUTPUTFILE" >> $LOGFILE
- hours=$((seconds / 3600))
- seconds=$((seconds % 3600))
- minutes=$((seconds / 60))
- seconds=$((seconds % 60))
- echo "Encoding Time: $hours hour(s) $minutes minute(s) $seconds second(s)" >> $LOGFILE
-else
- echo "ERROR: $ERROR" >> $LOGFILE
-fi
-
-# clean up left over files
-unlink $TMPFILE 2> /dev/null
-unlink $TMPCUTFILE 2> /dev/null
-unlink $TMPCUTFILE.map 2> /dev/null
diff --git a/abs/core-testing/linhes-scripts/myth2x264 b/abs/core-testing/linhes-scripts/myth2x264
deleted file mode 100755
index 014fcbe..0000000
--- a/abs/core-testing/linhes-scripts/myth2x264
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/bin/sh
-# convert recording to x264 encoded avi
-# version 0.6
-
-# usage:
-# first parameter must be %DIR%/%FILE% of the recording
-# second parameter must be the desired base name of the output
-# third parameter must be %CHANID% if you set USECUTLIST=Y
-# fourth parameter must be %STARTTIME% if you set USECUTLIST=Y
-# fifth parameter must be %JOBID% for the User Job status to be updated in MythTV
-# in the mythtv setup screen invoke this script like this:
-# MYTHTV User Job Command:
-# /usr/LH/bin/myth2x264 "%DIR%/%FILE%" "%TITLE% - %SUBTITLE%" "%CHANID%" "%STARTTIME%" "%JOBID%"
-
-# options:
-RESOLUTION=960:544 # to keep the source resolution use -1 or to scale down use xxx:xxx (ie 960:544)
-BITRATE=2500 # use negative bitrate to set output file size in KB (ie. -700000)
-USECUTLIST=Y # Y or N
-
-# where the converted video is stored
-OUT_DIR=/myth/video
-
-# database settings
-BACKEND_HOSTNAME=${BACKEND_HOSTNAME:-"localhost"}
-DBUSERNAME=${DBUSERNAME:-"mythtv"}
-DBPASSWORD=${DBPASSWORD:-"mythtv"}
-SQLCMD="mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e"
-
-#------FUNCTIONS---------------
-update_comment()
-# Arg_1 = COMMENT
-{
-if [ $NO_JOBID = 0 ]; then
- `$SQLCMD "update jobqueue set comment=\"$1\" where id=\"$JOBID\";"`
-fi
-}
-
-update_status()
-# Arg_1 = status code
-{
-if [ $NO_JOBID = 0 ]; then
- `$SQLCMD "update jobqueue set status=\"$1\" where id=\"$JOBID\";"`
-fi
-}
-
-check_background_progress()
-# check mencoder progress in background
-# Arg_1 = PROGRESS CALCULATION
-{
-while [ `tail -1 $STATUSFILE | grep -c "^x264 \[info\]: kb/s:"` = 0 ]
-do
- sleep 10
- check_myth_jobcmds
- current_status=`tail -1 $STATUSFILE | grep "([ 0-9]\{1,\}%)"`
- prog_percent=`echo "$current_status" | sed 's_.*(\([ 0-9][ 0-9]\)%).*_\1_'`
- current_FPS=`echo "$current_status" | sed 's_.*\([ 0-9][ 0-9].[ 0-9][ 0-9]\)fps.*_\1_'`
- if [ -n "$prog_percent" ]; then
- prog_percent=`expr $prog_percent / $1`
- echo "$prog_percent% Completed @ $current_FPS fps"
- update_comment "$prog_percent% Completed @ $current_FPS fps"
- fi
- sleep 10
-done
-}
-
-check_myth_jobcmds()
-# check the myth database for stop pause or resume commands
-{
-if [ $NO_JOBID = 0 ]; then
- CURRENT_CMD=`$SQLCMD "select cmds from jobqueue where id=\"$JOBID\";" | sed '/[0-9]/!d'`
- case "$CURRENT_CMD" in
- # JOB_RUN
- 0) ;;
- # JOB_PAUSE
- 1) update_status 6
- kill -s STOP $mencoder_pid ;;
- # JOB_RESUME
- 2) update_status 4
- `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
- kill -s CONT $mencoder_pid ;;
- # JOB_STOP
- 4) update_status 5
- `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
- kill -9 $mencoder_pid $command_pid
- clean_up_files
- echo "Encode Cancelled" >> $LOGFILE
- update_status 320
- exit ;;
- esac
-fi
-}
-
-get_mencoder_pid()
-{
-process_name=""
-i1=1
-while [ "$process_name" != "found" ]; do
- if [ "`ps $mencoder_pid | grep mencoder | sed 's_.*\(mencoder\).*_\1_'`" = "mencoder" ]; then
- process_name="found"
- else
- mencoder_pid=`expr $mencoder_pid + 1`
- fi
- i1=`expr $i1 + 1`
- if [ $i1 -gt 20 ]; then
- break
- fi
-done
-}
-
-clean_up_files()
-# clean up left over files
-{
-unlink $TMPFILE 2> /dev/null
-unlink $TMPCUTFILE 2> /dev/null
-unlink $TMPCUTFILE.map 2> /dev/null
-unlink $TWOPASSFILE 2> /dev/null
-unlink $TWOPASSFILE.tmp 2> /dev/null
-unlink $STATUSFILE 2> /dev/null
-unlink $MENCODER_RETURN_CODE 2> /dev/null
-unlink $MENCODER_RETURN_CODE_2 2> /dev/null
-}
-
-#-------MAIN SCRIPT------------
-
-# check if %JOBID% is passed from command line
-JOBID=$5
-if [ -z "$JOBID" ]; then
- NO_JOBID=1
-else
- NO_JOBID=0
-fi
-
-# create temp filename so multiple instances won't conflict
-TMPNAME=toX264-$$
-TMPFILE=/myth/tmp/$TMPNAME.avi
-TMPCUTFILE=/myth/tmp/$TMPNAME.mpg
-MENINPUTFILE=$1
-TWOPASSFILE=/myth/tmp/$TMPNAME-2pass.log
-STATUSFILE=/myth/tmp/$TMPNAME-status.log
-MENCODER_RETURN_CODE=/myth/tmp/$TMPNAME-mencoder_return_code
-MENCODER_RETURN_CODE_2=/myth/tmp/$TMPNAME-mencoder_return_code_2
-
-# log file location
-LOGFILE=/var/log/mythtv/myth2x264.log
-CDate="`date`"
-echo "" >> $LOGFILE
-echo $CDate >> $LOGFILE
-echo "File to encode: $MENINPUTFILE Name: $2" >> $LOGFILE
-
-# start timer
-beforetime="$(date +%s)"
-
-check_myth_jobcmds
-
-# check if using cutlist
-if [ $USECUTLIST = Y ]; then
- MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $MENINPUTFILE | grep 'Cutlist:' | cut -d \ -f 2`
- if [ -n "$MYTHCOMMFRAMES" ]; then
- echo "Extracting Cutlist..." >> $LOGFILE
- update_comment "Extracting Cutlist"
- /usr/bin/nice -n19 /usr/bin/mythtranscode --chanid "$3" --starttime "$4" --outfile "$TMPCUTFILE" --mpeg2 --honorcutlist
- MENINPUTFILE=$TMPCUTFILE
- fi
-fi
-
-# run mencoder in background to do 1st pass conversion
-echo "Encoding 1st Pass at $RESOLUTION..." >> $LOGFILE
-( /usr/bin/nice -n19 /usr/bin/mencoder $MENINPUTFILE -passlogfile $TWOPASSFILE \
--oac copy -ovc x264 -vf lavcdeint,scale=$RESOLUTION \
--x264encopts threads=auto:pass=1:turbo=1:subq=1:frameref=1:bframes=3:bitrate=$BITRATE \
--o /dev/null > $STATUSFILE 2>&1 ; echo $? > $MENCODER_RETURN_CODE ) &
-mencoder_pid=$!
-command_pid=$mencoder_pid
-get_mencoder_pid
-
-check_background_progress "2"
-
-# run mencoder in background to do 2nd pass conversion
-echo "Encoding 2nd Pass at $RESOLUTION..." >> $LOGFILE
-( /usr/bin/nice -n19 /usr/bin/mencoder $MENINPUTFILE -passlogfile $TWOPASSFILE \
--oac copy -ovc x264 -vf lavcdeint,scale=$RESOLUTION \
--x264encopts threads=auto:pass=2:subq=5:8x8dct:frameref=3:bframes=3:b_pyramid:weight_b:bitrate=$BITRATE \
--o "$TMPFILE" > $STATUSFILE 2>&1 ; echo $? > $MENCODER_RETURN_CODE_2 ) &
-mencoder_pid=$!
-command_pid=$mencoder_pid
-get_mencoder_pid
-
-check_background_progress "2 + 50"
-
-ERROR=$?
-
-# make output filename unique
-OUTPUTFILE=$OUT_DIR/$2.avi
-i=1
-while [ -e "$OUTPUTFILE" ]
-do
- OUTPUTFILE=$OUT_DIR/$2-$i.avi
- i=`expr $i + 1`
-done
-
-# move temp file to output location
-chown mythtv "$TMPFILE" && mv "$TMPFILE" "$OUTPUTFILE"
-
-# stop timer
-aftertime="$(date +%s)"
-seconds="$(expr $aftertime - $beforetime)"
-
-if [ $ERROR -eq 0 ]; then
- echo "File Encoded Successfully: $OUTPUTFILE" >> $LOGFILE
- hours=$((seconds / 3600))
- seconds=$((seconds % 3600))
- minutes=$((seconds / 60))
- seconds=$((seconds % 60))
- echo "Encoding took $hours hour(s) $minutes minute(s) $seconds second(s) @ $current_FPS fps." >> $LOGFILE
- update_status 272
- update_comment "Encode Successful. Encoding Time: $hours hour(s) $minutes minute(s) $seconds second(s)"
-else
- update_status 304
- update_comment "Encode Failed. Exit status: $ERROR"
- echo "ERROR: $ERROR" >> $LOGFILE
-fi
-
-clean_up_files
diff --git a/abs/core-testing/linhes-scripts/myth2xvid b/abs/core-testing/linhes-scripts/myth2xvid
deleted file mode 100755
index d0fcb42..0000000
--- a/abs/core-testing/linhes-scripts/myth2xvid
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/bin/sh
-# convert recording to xvid encoded avi
-# version 1.3
-
-# usage:
-# first parameter must be %DIR%/%FILE% of the recording
-# second parameter must be the desired base name of the output
-# third parameter must be %CHANID% if you set USECUTLIST=Y
-# fourth parameter must be %STARTTIME% if you set USECUTLIST=Y
-# fifth parameter must be %JOBID% for the User Job status to be updated in MythTV
-# in the mythtv setup screen invoke this script like this:
-# MYTHTV User Job Command:
-# /usr/LH/bin/myth2xvid "%DIR%/%FILE%" "%TITLE% - %SUBTITLE%" "%CHANID%" "%STARTTIME%" "%JOBID%"
-
-# options:
-RESOLUTION=960:544 # to keep the source resolution use -1 or to scale down use xxx:xxx (ie 960:544)
-BITRATE=2500 # use negative bitrate to set output file size in KB (ie. -700000)
-USECUTLIST=Y # Y or N
-
-# where the converted video is stored
-OUT_DIR=/myth/video
-
-# database settings
-BACKEND_HOSTNAME=${BACKEND_HOSTNAME:-"localhost"}
-DBUSERNAME=${DBUSERNAME:-"mythtv"}
-DBPASSWORD=${DBPASSWORD:-"mythtv"}
-SQLCMD="mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e"
-
-#------FUNCTIONS---------------
-update_comment()
-# Arg_1 = COMMENT
-{
-if [ $NO_JOBID = 0 ]; then
- `$SQLCMD "update jobqueue set comment=\"$1\" where id=\"$JOBID\";"`
-fi
-}
-
-update_status()
-# Arg_1 = status code
-{
-if [ $NO_JOBID = 0 ]; then
- `$SQLCMD "update jobqueue set status=\"$1\" where id=\"$JOBID\";"`
-fi
-}
-
-check_background_progress()
-# check mencoder progress in background
-# Arg_1 = PROGRESS CALCULATION
-{
-while [ `tail -1 $STATUSFILE | grep -c "^Audio stream:"` = 0 ]
-do
- sleep 10
- check_myth_jobcmds
- current_status=`tail -1 $STATUSFILE | grep "([ 0-9]\{1,\}%)"`
- prog_percent=`echo "$current_status" | sed 's_.*(\([ 0-9][ 0-9]\)%).*_\1_'`
- current_FPS=`echo "$current_status" | sed 's_.*\([ 0-9][ 0-9].[ 0-9][ 0-9]\)fps.*_\1_'`
- if [ -n "$prog_percent" ]; then
- prog_percent=`expr $prog_percent / $1`
- echo "$prog_percent% Completed @ $current_FPS fps"
- update_comment "$prog_percent% Completed @ $current_FPS fps"
- fi
- sleep 10
-done
-}
-
-check_myth_jobcmds()
-# check the myth database for stop pause or resume commands
-{
-if [ $NO_JOBID = 0 ]; then
- CURRENT_CMD=`$SQLCMD "select cmds from jobqueue where id=\"$JOBID\";" | sed '/[0-9]/!d'`
- case "$CURRENT_CMD" in
- # JOB_RUN
- 0) ;;
- # JOB_PAUSE
- 1) update_status 6
- kill -s STOP $mencoder_pid ;;
- # JOB_RESUME
- 2) update_status 4
- `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
- kill -s CONT $mencoder_pid ;;
- # JOB_STOP
- 4) update_status 5
- `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
- kill -9 $mencoder_pid $command_pid
- clean_up_files
- echo "Encode Cancelled" >> $LOGFILE
- update_status 320
- exit ;;
- esac
-fi
-}
-
-get_mencoder_pid()
-{
-process_name=""
-i1=1
-while [ "$process_name" != "found" ]; do
- if [ "`ps $mencoder_pid | grep mencoder | sed 's_.*\(mencoder\).*_\1_'`" = "mencoder" ]; then
- process_name="found"
- else
- mencoder_pid=`expr $mencoder_pid + 1`
- fi
- i1=`expr $i1 + 1`
- if [ $i1 -gt 20 ]; then
- break
- fi
-done
-}
-
-clean_up_files()
-# clean up left over files
-{
-unlink $TMPFILE 2> /dev/null
-unlink $TMPCUTFILE 2> /dev/null
-unlink $TMPCUTFILE.map 2> /dev/null
-unlink $TWOPASSFILE 2> /dev/null
-unlink $TWOPASSFILE.tmp 2> /dev/null
-unlink $STATUSFILE 2> /dev/null
-unlink $MENCODER_RETURN_CODE 2> /dev/null
-unlink $MENCODER_RETURN_CODE_2 2> /dev/null
-}
-
-#-------MAIN SCRIPT------------
-
-# check if %JOBID% is passed from command line
-JOBID=$5
-if [ -z "$JOBID" ]; then
- NO_JOBID=1
-else
- NO_JOBID=0
-fi
-
-# create temp filename so multiple instances won't conflict
-TMPNAME=toXVID-$$
-TMPFILE=/myth/tmp/$TMPNAME.avi
-TMPCUTFILE=/myth/tmp/$TMPNAME.mpg
-MENINPUTFILE=$1
-TWOPASSFILE=/myth/tmp/$TMPNAME-2pass.log
-STATUSFILE=/myth/tmp/$TMPNAME-status.log
-MENCODER_RETURN_CODE=/myth/tmp/$TMPNAME-mencoder_return_code
-MENCODER_RETURN_CODE_2=/myth/tmp/$TMPNAME-mencoder_return_code_2
-
-# log file location
-LOGFILE=/var/log/mythtv/myth2xvid.log
-CDate="`date`"
-echo "" >> $LOGFILE
-echo $CDate >> $LOGFILE
-echo "File to encode: $MENINPUTFILE Name: $2" >> $LOGFILE
-
-# start timer
-beforetime="$(date +%s)"
-
-check_myth_jobcmds
-
-# check if using cutlist
-if [ $USECUTLIST = Y ]; then
- MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $MENINPUTFILE | grep 'Cutlist:' | cut -d \ -f 2`
- if [ -n "$MYTHCOMMFRAMES" ]; then
- echo "Extracting Cutlist..." >> $LOGFILE
- update_comment "Extracting Cutlist"
- /usr/bin/nice -n19 /usr/bin/mythtranscode --chanid "$3" --starttime "$4" --outfile "$TMPCUTFILE" --mpeg2 --honorcutlist
- MENINPUTFILE=$TMPCUTFILE
- fi
-fi
-
-# run mencoder in background to do 1st pass conversion
-echo "Encoding 1st Pass at $RESOLUTION..." >> $LOGFILE
-( /usr/bin/nice -n19 /usr/bin/mencoder $MENINPUTFILE -passlogfile $TWOPASSFILE \
--oac copy -ovc xvid -vf lavcdeint,scale=$RESOLUTION \
--xvidencopts pass=1:vhq=0:turbo:me_quality=5:quant_type=mpeg:max_bframes=0:bitrate=$BITRATE \
--o /dev/null > $STATUSFILE 2>&1 ; echo $? > $MENCODER_RETURN_CODE ) &
-mencoder_pid=$!
-command_pid=$mencoder_pid
-get_mencoder_pid
-
-check_background_progress "2"
-
-# run mencoder in background to do 2nd pass conversion
-echo "Encoding 2nd Pass at $RESOLUTION..." >> $LOGFILE
-( /usr/bin/nice -n19 /usr/bin/mencoder $MENINPUTFILE -passlogfile $TWOPASSFILE \
--oac copy -ovc xvid -vf lavcdeint,scale=$RESOLUTION \
--xvidencopts pass=2:vhq=0:bvhq=1:me_quality=5:quant_type=mpeg:max_bframes=0:bitrate=$BITRATE \
--o "$TMPFILE" > $STATUSFILE 2>&1 ; echo $? > $MENCODER_RETURN_CODE_2 ) &
-mencoder_pid=$!
-command_pid=$mencoder_pid
-get_mencoder_pid
-
-check_background_progress "2 + 50"
-
-ERROR=$?
-
-# make output filename unique
-OUTPUTFILE=$OUT_DIR/$2.avi
-i=1
-while [ -e "$OUTPUTFILE" ]
-do
- OUTPUTFILE=$OUT_DIR/$2-$i.avi
- i=`expr $i + 1`
-done
-
-# move temp file to output location
-chown mythtv "$TMPFILE" && mv "$TMPFILE" "$OUTPUTFILE"
-
-# stop timer
-aftertime="$(date +%s)"
-seconds="$(expr $aftertime - $beforetime)"
-
-if [ $ERROR -eq 0 ]; then
- echo "File Encoded Successfully: $OUTPUTFILE" >> $LOGFILE
- hours=$((seconds / 3600))
- seconds=$((seconds % 3600))
- minutes=$((seconds / 60))
- seconds=$((seconds % 60))
- echo "Encoding took $hours hour(s) $minutes minute(s) $seconds second(s) @ $current_FPS fps." >> $LOGFILE
- update_status 272
- update_comment "Encode Successful. Encoding Time: $hours hour(s) $minutes minute(s) $seconds second(s)"
-else
- update_status 304
- update_comment "Encode Failed. Exit status: $ERROR"
- echo "ERROR: $ERROR" >> $LOGFILE
-fi
-
-clean_up_files \ No newline at end of file
diff --git a/abs/core-testing/linhes-scripts/mythwelcome-config.py b/abs/core-testing/linhes-scripts/mythwelcome-config.py
deleted file mode 100755
index c7bf10b..0000000
--- a/abs/core-testing/linhes-scripts/mythwelcome-config.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-
-# This script will configure the myth db to allow MythWelcome to wake and shutdown the system.
-
-from socket import gethostname
-from MythTV import MythDB
-mythdb = MythDB()
-localhostname = gethostname()
-
-# mythwelcome --setup
-mythdb.settings[localhostname].MythShutdownNvramCmd = u'sudo sh -c \"/usr/LH/bin/mythwelcome-set-alarm.sh $time\"'
-mythdb.settings[localhostname].MythShutdownWakeupTimeFmt = u'time_t'
-mythdb.settings[localhostname].MythShutdownNvramRestartCmd = u''
-mythdb.settings[localhostname].MythShutdownReboot = u'sudo /sbin/reboot'
-mythdb.settings[localhostname].MythShutdownPowerOff = u'sudo /sbin/poweroff'
-mythdb.settings[localhostname].MythShutdownXTermCmd = u'xterm'
-mythdb.settings[localhostname].MythWelcomeStartFECmd = u'/usr/LH/bin/mythfrontend-start'
-
-
-# mythtv-setup Shutdown/Wakeup options
-if mythdb.settings[localhostname].idleTimeoutSecs == u'0':
- mythdb.settings[localhostname].idleTimeoutSecs = u'40'
-
-mythdb.settings.NULL.WakeupTimeFormat = u'yyyy-MM-ddThh:mm:ss'
-mythdb.settings.NULL.SetWakeuptimeCommand = u'/usr/bin/mythshutdown --setwakeup $time'
-mythdb.settings.NULL.ServerHaltCommand = u'/usr/bin/mythshutdown --shutdown'
-mythdb.settings.NULL.preSDWUCheckCommand = u'/usr/bin/mythshutdown --check'
diff --git a/abs/core-testing/linhes-scripts/mythwelcome-set-alarm.sh b/abs/core-testing/linhes-scripts/mythwelcome-set-alarm.sh
deleted file mode 100755
index 990adf7..0000000
--- a/abs/core-testing/linhes-scripts/mythwelcome-set-alarm.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#$1 is the first argument to the script. It is the time in seconds since 1970
-#This is defined in mythwelcome with the time_t argument
-
-# Configure mythwelcome --setup page:
-# Command to Set Wakeup Time: sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh $time"
-# Wakeup Time Format: time_t
-# nvram-wakeup Restart Command: Leave this blank
-# Command to reboot: sudo /sbin/reboot
-# Command to shutdown: sudo /sbin/poweroff
-# Command to run Xterm: xterm
-# Command to start the Frontend: /usr/bin/mythfrontend -l /var/log/mythtv/mythfrontend.log
-
-# Configure mythtv-setup Shutdown/Wakeup Options page:
-# Idletimeout (secs): any value greater that 0
-# Wakeup time format: yyyy-MM-ddThh:mm:ss
-# Set wakeup time command: /usr/bin/mythshutdown --setwakeup $time
-# Server Halt command: /usr/bin/mythshutdown --shutdown
-# Pre shutdown check command: /usr/bin/mythshutdown --check
-
-echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm
-echo $1 > /sys/class/rtc/rtc0/wakealarm #this writes your alarm
-cat /proc/driver/rtc > /var/log/wake_alarm
diff --git a/abs/core-testing/linhes-scripts/mythwelcome-test-wakeup.sh b/abs/core-testing/linhes-scripts/mythwelcome-test-wakeup.sh
deleted file mode 100755
index 4aadf6d..0000000
--- a/abs/core-testing/linhes-scripts/mythwelcome-test-wakeup.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm" #this clears your alarm
-sudo sh -c "echo `date '+%s' -d '+ 4 minutes'` > /sys/class/rtc/rtc0/wakealarm" #this writes your alarm
-cat /proc/driver/rtc
-cat /proc/driver/rtc > /var/log/wake_alarm
-echo "Your computer is set to start up in 4 minutes using ACPI."
-echo -n "Do you want to shutdown the computer now? (y/n): "
-read -n 1 shutdown
-if [ "$shutdown" == "y" ]; then
- echo -e "\nShutting down now..."
- sudo shutdown -t 5 -h now
-else
- echo -e "\nTo shutdown execute the following:"
- echo " sudo shutdown -t 5 -h now"
-fi
diff --git a/abs/core-testing/linhes-scripts/pause-mythcommflag.sh b/abs/core-testing/linhes-scripts/pause-mythcommflag.sh
deleted file mode 100755
index 4da808b..0000000
--- a/abs/core-testing/linhes-scripts/pause-mythcommflag.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-# pause-mythcommflag.sh v0.2 05/21/09
-# Utility to automatically pause & unpause mythcommflag if CPU usage is above a certain level
-# Free for any use.
-# Installation:
-# cp pause-mythcommflag.sh /usr/LH/bin
-# chmod +x /usr/LH/bin/pause-mythcommflag.sh
-# Usage: Executed from sv start pause-mythcommflag
-
-# Threshold for when mythcommflag will be paused
-CPUTHRESHOLD=75
-
-# Second Threshold for when mythcommflag is already paused
-PAUSEDCPUTHRESHOLD=45
-
-# Log file to write (change to /dev/null for no log)
-LOG=/var/log/mythtv/pause-mythcommflag.log
-
-# Number of seconds to wait between checking for mythcommflag process
-SLEEP=5
-
-#sleep $SLEEP
-
-touch $LOG
-
-COMMFLAGSTATE=1
-
-while true; do
- PROCCOMMFLAG=`pidof mythcommflag`
- if [ -n "${PROCCOMMFLAG}" ]
- then
- FRONTENDCPU=`top -bn1u mythtv | grep mythfrontend | awk '{ print $9 }'`
- if [ $COMMFLAGSTATE -eq 1 ]
- then
- CPUTHRESHOLD1=$CPUTHRESHOLD
- else
- CPUTHRESHOLD1=$PAUSEDCPUTHRESHOLD
- fi
- if [ "$FRONTENDCPU" -ge "$CPUTHRESHOLD1" ]
- then
-# echo "$(date) FE CPU $FRONTENDCPU% is greater than $CPUTHRESHOLD1%, PAUSE Commflagging" >> $LOG
- kill -s STOP $PROCCOMMFLAG
- COMMFLAGSTATE=0
- else
-# echo "$(date) FE CPU $FRONTENDCPU% is less than $CPUTHRESHOLD1%, CONTINUE Commflagging" >> $LOG
- kill -s CONT $PROCCOMMFLAG
- COMMFLAGSTATE=1
- fi
-# else
-# echo "No COMMFLAG Process Active" >> $LOG
- fi
- sleep $SLEEP
-done
diff --git a/abs/core-testing/linhes-scripts/pause_mythcommflag b/abs/core-testing/linhes-scripts/pause_mythcommflag
deleted file mode 100755
index c20f9b0..0000000
--- a/abs/core-testing/linhes-scripts/pause_mythcommflag
+++ /dev/null
@@ -1,8 +0,0 @@
-/var/log/mythtv/pause-mythcommflag.log {
- daily
- rotate 7
- notifempty
- copytruncate
- compress
- missingok
-}
diff --git a/abs/core-testing/linhes-scripts/qip7100-cc.sh b/abs/core-testing/linhes-scripts/qip7100-cc.sh
deleted file mode 100755
index 029e25c..0000000
--- a/abs/core-testing/linhes-scripts/qip7100-cc.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-#Script to control DCT 700/2524 on emitter #1 of CommandIR
-irsend set_transmitters 2
-sleep .5
-#REMOTE_NAME=DCT2524
-REMOTE_NAME=Motorola_QIP6200-2
-cmd="$1"
-
-case $cmd in
- [0-9]*)
- for digit in $(echo $1 | sed -e 's/./& /g'); do
- irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME $digit
- sleep .4
- # If things work OK with sleep 1, try this for faster channel changes:
- sleep 0.3
- done
- irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME ok
-sleep .3
- irsend -d /dev/lircd SEND_ONCE $REMOTE_NAME exit
- ;;
-
- *)
- irsend SEND_ONCE $REMOTE_NAME $cmd
- ;;
-esac
diff --git a/abs/core-testing/linhes-scripts/remove_php_mythvideo.sh b/abs/core-testing/linhes-scripts/remove_php_mythvideo.sh
deleted file mode 100644
index d9d53a0..0000000
--- a/abs/core-testing/linhes-scripts/remove_php_mythvideo.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-. /etc/systemconfig
-
-if [ $SystemType != Frontend_only ] && [ $SystemType != Slave_backend ] ; then
-
-mysql mythconverg <<EOF
-delete from videotypes where extension='php';
-insert into videotypes(extension,f_ignore) values('php','1');
-EOF
-
-else
- exit 0
-fi
diff --git a/abs/core-testing/linhes-scripts/removecommercials.sh b/abs/core-testing/linhes-scripts/removecommercials.sh
deleted file mode 100755
index 0497dd5..0000000
--- a/abs/core-testing/linhes-scripts/removecommercials.sh
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/sh
-# remove commercials from recordings using the user generated cutlist or
-# optionally using the mythcommflag generated cutlist.
-# version 0.3 9/1/2010
-
-# usage:
-# first parameter must be %DIR% of the recording
-# second parameter must be %FILE% of the recording
-# third parameter must be %CHANID%
-# fourth parameter must be %STARTTIME%
-# fifth parameter must be %JOBID% for the User Job status to be updated in MythTV
-# in the mythtv setup screen invoke this script like this:
-# MYTHTV User Job Command:
-# /usr/LH/bin/removecommercials.sh "%DIR%" "%FILE%" "%CHANID%" "%STARTTIME%" "%JOBID%"
-
-#-------OPTIONS----------------
-# If no cutlist is found USE_MYTHCOMMFLAG_CUTLIST=YES will use mythcommflag
-# to generate a cutlist.
-# WARNING: Using this option could result in part of the recording being cut if
-# mythcommflag incorrectly flagged the commercial.
-# The USE_MYTHCOMMFLAG_CUTLIST option is saved in ~/.removecommercials.cfg and will
-# not be overwritten by updates to this script. The ~/.removecommercials.cfg
-# will be created by this script if it doesn't exist.
-# To enable set USE_MYTHCOMMFLAG_CUTLIST=YES in ~/.removecommercials.cfg
-
-[[ ! -f ~/.removecommercials.cfg ]] && printf "# If no cutlist is found USE_MYTHCOMMFLAG_CUTLIST=YES will use mythcommflag\n# to generate a cutlist.\n# WARNING: Using this option could result in part of the recording being cut if\n# mythcommflag incorrectly flagged the commercial.\nUSE_MYTHCOMMFLAG_CUTLIST=NO" > ~/.removecommercials.cfg
-. ~/.removecommercials.cfg
-
-# Auguments passed from command line
-VIDEODIR=$1
-FILENAME=$2
-CHANID=$3
-STARTTIME=$4
-JOBID=$5
-
-# database settings
-BACKEND_HOSTNAME=${BACKEND_HOSTNAME:-"localhost"}
-DBUSERNAME=${DBUSERNAME:-"mythtv"}
-DBPASSWORD=${DBPASSWORD:-"mythtv"}
-SQLCMD="mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e"
-
-LOG="/dev/null"
-#LOG="/var/log/mythtv/removecommercials.log"
-
-#------FUNCTIONS---------------
-update_comment()
-# Arg_1 = COMMENT
-{
-if [ $NO_JOBID = 0 ]; then
- `$SQLCMD "update jobqueue set comment=\"$1\" where id=\"$JOBID\";"`
-fi
-}
-
-update_status()
-# Arg_1 = status code
-{
-if [ $NO_JOBID = 0 ]; then
- `$SQLCMD "update jobqueue set status=\"$1\" where id=\"$JOBID\";"`
-fi
-}
-
-check_myth_jobcmds()
-# check the myth database for stop pause or resume commands
-{
-if [ $NO_JOBID = 0 ]; then
- CURRENT_CMD=`$SQLCMD "select cmds from jobqueue where id=\"$JOBID\";" | sed '/[0-9]/!d'`
- case "$CURRENT_CMD" in
- # JOB_RUN
- 0) ;;
- # JOB_PAUSE
- 1) update_status 6
- kill -s STOP $TPID ;;
- # JOB_RESUME
- 2) update_status 4
- `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
- kill -s CONT $TPID ;;
- # JOB_STOP
- 4) update_status 5
- `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
- kill -9 $TPID
- clean_up_files
- echo "Cancelled"
- update_status 320
- exit ;;
- esac
-fi
-}
-
-check_background_progress()
-#check progress in background
-{
-while [ `tail -1 $STATUSFILE | grep -c "Done"` = 0 ]
-do
- sleep 5
- check_myth_jobcmds
- current_status=`tail -1 $STATUSFILE`
- if [ `expr match "$current_status" '.*\complete'` -ne 0 ]; then
- prog_percent=`echo "$current_status" | awk '{print $3}'`
- if [ -n "$prog_percent" ]; then
- echo "Removing Commercials - $prog_percent Completed"
- update_comment "Removing Commercials - $prog_percent Completed"
- fi
- fi
-done
-}
-
-get_pid()
-{
-process_name=""
-i1=1
-while [ "$process_name" != "found" ]; do
- if [ "`ps $TPID | grep mythtranscode | sed 's_.*\(mythtranscode\).*_\1_'`" = "mythtranscode" ]; then
- process_name="found"
- else
- TPID=`expr $TPID + 1`
- fi
- i1=`expr $i1 + 1`
- if [ $i1 -gt 20 ]; then
- break
- fi
-done
-}
-
-clean_up_files()
-# clean up left over files
-{
-unlink $TMPFILE 2> /dev/null
-unlink $TMPFILE.map 2> /dev/null
-unlink $STATUSFILE 2> /dev/null
-unlink $VIDEODIR/$FILENAME.tmp 2> /dev/null
-}
-
-#-------MAIN SCRIPT------------
-# check if %JOBID% is passed from command line
-JOBID=$5
-if [ -z "$JOBID" ]; then
- NO_JOBID=1
-else
- NO_JOBID=0
-fi
-# check if file is a .mpg
-if [ `expr match "$FILENAME" '.*\.mpg'` -ne 0 ]; then
- MPEG="--mpeg2"
-else
- MPEG=""
-fi
-
-# create temp filename so multiple instances won't conflict
-TMPNAME=rmvCOMMS-$$
-TMPFILE=$VIDEODIR/$FILENAME-$$
-STATUSFILE=/myth/tmp/$TMPNAME-status.log
-
-touch $STATUSFILE
-
-update_status 4
-
-check_myth_jobcmds
-
-echo "" >> $LOG
-date >> $LOG
-$VIDEODIR/$FILENAME >> $LOG
-
-# check for cutlist
-MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $VIDEODIR/$FILENAME | grep 'Cutlist:' | cut -d \ -f 2`
-
-if [ $USE_MYTHCOMMFLAG_CUTLIST=YES ] && [ -z "$MYTHCOMMFRAMES" ]; then
- echo "Generating cutlist..." >> $LOG
- update_comment "Generating cutlist..."
- /usr/bin/nice -n19 /usr/bin/mythcommflag --gencutlist -f $VIDEODIR/$FILENAME
- MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $VIDEODIR/$FILENAME | grep 'Cutlist:' | cut -d \ -f 2`
-fi
-
-if [ -n "$MYTHCOMMFRAMES" ]; then
- echo "Removing Commercials..." >> $LOG
- update_comment "Removing Commercials..."
- ( /usr/bin/nice -n19 /usr/bin/mythtranscode -c $CHANID -s $STARTTIME -o $TMPFILE $MPEG --honorcutlist --showprogress > $STATUSFILE 2>&1 ; echo "Done" >> $STATUSFILE ) &
- TPID=$!
- get_pid
- check_background_progress
- ERROR=$?
- if [ $ERROR -ne 0 ]; then
- echo "Transcoding failed for ${FILENAME} with error $ERROR" >> $LOG
- exit $ERROR
- fi
-
- check_myth_jobcmds
- # move temp file to output location
- echo "Moving file..." >> $LOG
- update_comment "Moving file..."
- if [ `$SQLCMD "select data from settings where value='SaveTranscoding';" | sed '/[0-9]/!d'` = 1 ]; then
- echo "DB is set to save transcoding" >> $LOG
- mv $VIDEODIR/$FILENAME $VIDEODIR/$FILENAME.old
- fi
- mv $TMPFILE $VIDEODIR/$FILENAME
-
- # file has changed, rebuild index
- echo "Rebuilding index..." >> $LOG
- update_comment "Rebuilding index..."
- mythcommflag -c $CHANID -s $STARTTIME --rebuild
- ERROR=$?
- if [ $ERROR -ne 0 ]; then
- echo "Rebuilding seek list failed for ${FILENAME} with error $ERROR" >> $LOG
- exit $ERROR
- fi
-
- # remove old cutlist
- echo "Removing old cutlist..." >> $LOG
- update_comment "Removing old cutlist..."
- mythcommflag -c $CHANID -s $STARTTIME --clearcutlist
- ERROR=$?
- if [ $ERROR -eq 0 ]; then
- # Fix the database entry for the file
- echo "Fixing database entry..." >> $LOG
- `$SQLCMD "UPDATE recorded SET cutlist = 0, filesize = $(ls -l $VIDEODIR/$FILENAME | awk '{print $5}') WHERE basename = '$FILENAME';"` > /dev/null
- else
- echo "Clearing cutlist failed for ${FILENAME} with error $ERROR" >> $LOG
- clean_up_files
- update_status 272
- update_comment "Error: Clearing cutlist failed."
- exit $ERROR
- fi
-
- # clear autoskip list
- echo "Clearing autoskip list..." >> $LOG
- `$SQLCMD "DELETE FROM recordedmarkup WHERE CONCAT( chanid, starttime ) IN (SELECT CONCAT( chanid, starttime ) FROM recorded WHERE basename = '$FILENAME');"` > /dev/null
-
- clean_up_files
- echo "Commercials Removed" >> $LOG
- update_status 272
- update_comment "Sucessfully Completed."
-else
- echo "No cutlist found." >> $LOG
-fi
diff --git a/abs/core-testing/linhes-scripts/run-limit-mythcommflag b/abs/core-testing/linhes-scripts/run-limit-mythcommflag
deleted file mode 100755
index 38ca45f..0000000
--- a/abs/core-testing/linhes-scripts/run-limit-mythcommflag
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/nice -19 /usr/LH/bin/limit-mythcommflag.sh
diff --git a/abs/core-testing/linhes-scripts/run-pause-mythcommflag b/abs/core-testing/linhes-scripts/run-pause-mythcommflag
deleted file mode 100755
index 8bd25ac..0000000
--- a/abs/core-testing/linhes-scripts/run-pause-mythcommflag
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/nice -19 /usr/LH/bin/pause-mythcommflag.sh
diff --git a/abs/core-testing/linhes-scripts/screenshooter.sh b/abs/core-testing/linhes-scripts/screenshooter.sh
deleted file mode 100755
index 3bacac1..0000000
--- a/abs/core-testing/linhes-scripts/screenshooter.sh
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/bin/bash
-
-# Written by Bob Igo from the MythTV Store at http://MythiC.TV
-# with contributions from TJC and Sarah Hayes
-# Email: bob@stormlogic.com
-#
-# If you run into problems with this script, please send me email
-
-# This is alpha code to auto-generate thumbnails for previews in MythVideo.
-# It won't currently work on some filenames that have spaces in them.
-# It's surely just a matter of escaping or quoting, but I have yet to find
-# the right incantation.
-
-# example usage:
-# find -L /myth/video -wholename '*.covers' -prune -o -name '*.resume' -o -type f -exec screenshooter.sh -v {} \;
-
-# limitations:
-# --
-# In an MBE/SBE/FE setup this might get the settings for the wrong machine...
-# The script has no AI to know if a grabbed frame is useful to identify the video, only that it was able to grab it.
-# Doesn't clean up after itself if videos are deleted, though MythTV may do this on its own.
-# Minimum theoretical compatible video length is 4 seconds. Shorter videos will not work with this version.
-# Surely more limitations I can't think of because it's my baby :)
-
-Usage() {
- echo "USAGE:"
- echo `basename $0` "-v PATHNAME [-s SECONDS] [-c] [-b HOSTNAME] [-u USERNAME] [-p PASSWORD] [-o]"
- echo "-v: pathname to Video"
- echo "-s: number of Seconds to skip before capturing (270 by default)"
- echo "-c: Clobber any previous screenshot found for this video (off by default)"
- echo "-b: mysql server (Backend) hostname (localhost by default)"
- echo "-u: mysql Username (mythtv by default)"
- echo "-p: mysql Password (mythtv by default)"
- echo "-o: verbOse mode (off by default)"
- echo "-x: check for valid video eXtension (off by default)"
- echo
- echo "EXAMPLE: $0 -v /myth/video/HDTV/shuttle.mpg -c -s 30"
- exit 3
-}
-
-if [ -z $1 ]; then
- Usage
-fi
-
-V_MISSING=1
-
-while getopts "v:sbupochx" FLAG ; do
- case "$FLAG" in
- v) VIDEO_PATHNAME="$OPTARG"
- V_MISSING=0;;
- s) SKIPAHEAD="$OPTARG";;
- c) CLOBBER=1;;
- b) BACKEND_HOSTNAME="$OPTARG";;
- u) DBUSERNAME="$OPTARG";;
- p) DBPASSWORD="$OPTARG";;
- o) VERBOSE=1;;
- x) EXTENSION_CHECK=1;;
- *) Usage;;
- esac
-done
-
-if [ $V_MISSING == 1 ]; then
- Usage
-fi
-
-# Declaring Variables here and assigning sensible defaults.
-
-# SKIPAHEAD is the number of seconds to skip ahead before starting the frame capture.
-# Set it to an arbitrary value if none is specified.
-SKIPAHEAD=${SKIPAHEAD:-"270"}
-BACKEND_HOSTNAME=${BACKEND_HOSTNAME:-"localhost"}
-DBUSERNAME=${DBUSERNAME:-"mythtv"}
-DBPASSWORD=${DBPASSWORD:-"mythtv"}
-# Defaults to quiet.
-VERBOSE=${VERBOSE:-0}
-# Unless otherwise told, do not clobber existing cover files.
-CLOBBER=${CLOBBER:-0}
-# Unless otherwise told, do not check the file extension against
-# MythTV's list of registered video file types.
-EXTENSION_CHECK=${EXTENSION_CHECK:-0}
-
-VIDEO_CAPTURE_HOME=$(mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -sNBe "select data from settings where value='VideoArtworkDir' limit 1")
-if [ ! -d "$VIDEO_CAPTURE_HOME" ] ; then
- echo "Directory $VIDEO_CAPTURE_HOME does not exist, nowhere to put the screen shot!"
- echo "Have you configured MythVideo yet?"
- exit 1
-fi
-
-VIDEO_HOME=$(mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -sNBe "select data from settings where value='VideoStartupDir' limit 1")
-VIDEO_HOME=(${VIDEO_HOME//:/ });
-VIDEO_HOME_COUNT=${#VIDEO_HOME[@]}
-for (( i=0; i<${VIDEO_HOME_COUNT}; i++ ));
-do
- if [ ! -d "${VIDEO_HOME[${i}]}" ] ; then
- echo "Directory ${VIDEO_HOME[${i}]} does not exist, nowhere to put the screen shot!"
- echo "Have you configured MythVideo yet?"
- exit 1
- fi
-done
-
-VIDEO_FILENAME=$(basename "$VIDEO_PATHNAME")
-VIDEO_EXTENSION=${VIDEO_FILENAME##*.}
-# Since we cron'd lets first make sure the validity of the file
-if [ "$EXTENSION_CHECK" == "1" ]; then
- EXCHECK=$(mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -sNBe "select f_ignore from videotypes where extension=\"$VIDEO_EXTENSION\";")
- #excheck returns blank, it found nothing.
- if [ "$EXCHECK" == "" ]; then
- if [ "$VERBOSE" == "1" ]; then
- echo "$VIDEO_EXTENSION does not appear to be a valid media file, skipping."
- fi
- exit 1
- else
- # It is valid, but should we ignore it. If so then excheck will equal 1.
- if [ "EXCHECK" == "1" ]; then
- if [ "$VERBOSE" == "1" ]; then
- echo "$VIDEO_EXTENSION is set to ignore."
- fi
- exit 1
- fi
- # It is valid, it's not set to ignore.
- if [ "$VERBOSE" == "1" ]; then
- echo "$VIDEO_EXTENSION appears in the Database, checking further."
- fi
- EXCHECK=$(mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -sNBe "select title from videometadata where filename=\"$VIDEO_PATHNAME\";")
- #Right, the file is supposed to be playable. Has it been imported to the Db yet?
- if [ "$EXCHECK" == "" ] ; then
- if [ "$VERBOSE" == "1" ]; then
- echo "$VIDEO_FILENAME does not exist in the database."
- fi
- exit 1
- # If you decide you want the system to 'auto import' the video then comment out
- # the exit line and uncomment the rest of it. Bewarned, this is sucky SQL at
- # the best but will give sensible defaults.
- #
- # if [ "$VERBOSE" == "1" ]; then
- # echo "Importing $VIDEO_FILENAME in to database."
- # fi
- # mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -sNBe "insert into videometadata (intid, title, director, plot, rating, inetref, year, userrating, length, showlevel, filename, coverfile, childid, browse, playcommand, category) values (' ', '$VIDEO_FILENAME', 'Unknown', 'Unknown', 'NR', '00000000', 1895, 0.0, 0, 1, '$VIDEO_PATHNAME', '', -1, 1, ' ', 0);"
- fi
- fi
-fi
-
-if [ "$CLOBBER" -eq 0 ]; then
- # Since we're not clobbering, first check to see if this video already has a coverfile entry in MySQL:
- SQL_CMD="select coverfile from videometadata where filename=\"$VIDEO_PATHNAME\";"
- CURRENT_COVERFILE=`mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -B -e "$SQL_CMD" | tail -1`
-
- if [[ "$CURRENT_COVERFILE" != "" ]] && [[ "$CURRENT_COVERFILE" != "" ]]; then
- # there's already a cover file for this video
- if [ "$VERBOSE" == "1" ]; then
- echo "$VIDEO_FILENAME has cover file, skipping."
- fi
- exit 2
- fi
-fi
-
-
-# Swap the video file extension for png. Should work assuming the extension only appears ONCE!
-VIDEO_CAPTURE_PATHNAME="$VIDEO_CAPTURE_HOME/$VIDEO_FILENAME.png"
-
-# How many frames of video to capture. We'll grab the last frame as our screenshot.
-if [ "$VIDEO_EXTENSION" == "m4v" ]; then
- FRAMES_TO_CAPTURE="90"
- SHOTFILE="000000"$FRAMES_TO_CAPTURE".png"
-else
- FRAMES_TO_CAPTURE="05"
-fi
-
-SHOTFILE="000000"$FRAMES_TO_CAPTURE".png"
-VIDEO_STATS="/tmp/screenshooter_video_stats.txt"
-
-cd /tmp
-
-# The video we're processing may be shorter than SKIPAHEAD seconds.
-# Keep trying to capture until we find a SKIPAHEAD value within the length of the video.
-# Give up if we reach 0 seconds.
-while [ ! -f "$SHOTFILE" ]; do
- /usr/bin/mplayer -ss $SKIPAHEAD -vf scale=640:-2 -ao null -vo png -quiet -frames $FRAMES_TO_CAPTURE -identify "$VIDEO_PATHNAME" &> $VIDEO_STATS &
- TIMEOUT=9
-
- # Some video formats will play audio only. This loop gives the above command 20 seconds to
- # finish, otherwise it gets killed.
- while [ -n "`ps -p $! --no-heading`" ]; do
- TIMEOUT=$(expr $TIMEOUT - 1)
- if [ "$TIMEOUT" -le 0 ]; then
- kill -9 $!
- break
- fi
- sleep 1
- done
-
- SKIPAHEAD=$(expr $SKIPAHEAD / 2)
- if [ "$SKIPAHEAD" -le 0 ]; then
- break
- fi
-done
-
-if [ -f "$SHOTFILE" ]; then
- # Now, the video_capture is taken, and the name of the shot is in $SHOTFILE
- # Rename it and move it to the place where video_captures live.
- /bin/mv -f "$SHOTFILE" "$VIDEO_CAPTURE_PATHNAME"
- /bin/rm -f 000000*png
- chown mythtv: "$VIDEO_CAPTURE_PATHNAME"
-
- # We've got the shotfile nailed, now calculate video run length.
- VIDEO_LENGTH_IN_SECONDS=`grep ID_LENGTH $VIDEO_STATS | awk -F'=' '{print $2}'`
- VIDEO_LENGTH_IN_INTEGER_SECONDS=${VIDEO_LENGTH_IN_SECONDS/%.*/}
- if [ $VIDEO_LENGTH_IN_INTEGER_SECONDS -lt 60 ]; then
- VIDEO_LENGTH_IN_MINUTES="1"
- else
- VIDEO_LENGTH_IN_MINUTES=$(expr $VIDEO_LENGTH_IN_INTEGER_SECONDS / 60)
- fi
-
- SQL_CMD="update videometadata set length=\"$MIN_LENGTH\" where filename=\"$VIDEO_PATHNAME\";"
- mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e "$SQL_CMD"
-
-
- # put the screenshot pathname and any runlength info into videometadatatable
-
- # Pre-escape any single or double quotes for the SQL command.
-
- VIDEO_CAPTURE_PATHNAME=`echo $VIDEO_CAPTURE_PATHNAME | sed -e "s/'/\\\'/g" -e 's/"/\\\"/g' `
- VIDEO_PATHNAME=`echo $VIDEO_PATHNAME | sed -e "s/'/\\\'/g" -e 's/"/\\\"/g' `
- SQL_CMD="update videometadata set coverfile=\"$VIDEO_CAPTURE_PATHNAME\", length=\"$VIDEO_LENGTH_IN_MINUTES\" where filename=\"$VIDEO_PATHNAME\";"
-
- mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e "$SQL_CMD"
-else
- echo "No image could be captured from $VIDEO_PATHNAME"
- exit 1
-fi
diff --git a/abs/core-testing/linhes-scripts/shootscreens-mythtv.sh b/abs/core-testing/linhes-scripts/shootscreens-mythtv.sh
deleted file mode 100755
index 111b980..0000000
--- a/abs/core-testing/linhes-scripts/shootscreens-mythtv.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/bash
-
-. /etc/osd_cat.cfg || {
- color=yellow
- outline=2
- outlinecolour=black
- shadow=0
- shadowcolour=black
- font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
-}
-
-echo "This could take several minutes," > /tmp/screens
-echo "depending on your hardware and the" >> /tmp/screens
-echo "number and type of videos you have." >> /tmp/screens
-echo "It will only work on videos scanned" >> /tmp/screens
-echo "with Video Manager." >> /tmp/screens
-cat /tmp/screens | osd_cat --pos=middle --align=center --delay=0 --offset=200 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font &
-shootscreens.sh 1
-/bin/rm -f /tmp/screens \ No newline at end of file
diff --git a/abs/core-testing/linhes-scripts/shootscreens.sh b/abs/core-testing/linhes-scripts/shootscreens.sh
deleted file mode 100755
index bb45252..0000000
--- a/abs/core-testing/linhes-scripts/shootscreens.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/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
- . /etc/osd_cat.cfg || {
- color=yellow
- outline=2
- outlinecolour=black
- shadow=0
- shadowcolour=black
- font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
- }
-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 --text="Generating Video Thumbnails..." --delay=0 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font &
- 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 --text="Video Thumbnails Generated!" --delay=3 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font &
- fi
-} \ No newline at end of file
diff --git a/abs/core-testing/linhes-scripts/system-cleanup.sh b/abs/core-testing/linhes-scripts/system-cleanup.sh
deleted file mode 100755
index 59a4ebb..0000000
--- a/abs/core-testing/linhes-scripts/system-cleanup.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-# This script cleans up some SVN stuff that the build process leaves
-# in /usr/share/mythtv, along with ownership and file permsisions on the
-# themes and the mythstream stuff. There are bunch of files which are
-# left executable for no good reason, although I can think of several
-# potentially bad reasons for it.
-
-find /usr/share/mythtv -name .svn -print0 | xargs -0 rm -rf
-find /usr/share/mythtv -name CVS -print0 | xargs -0 rm -rf
-
-THEMES=/usr/share/mythtv/themes
-
-chown -R root:root $THEMES
-chmod -R +r $THEMES
-find $THEMES -type f -print0 | xargs -0 chmod a-x
-
-
-chown -R mythtv:users /myth
-chown -R root:root /myth/backup/
-chown -R root:root /etc/sv
-
-chown -R http:users /data/srv/httpd/
-
-# None of thes files should be executable.
-for ext in gif png jpg xml htm html php ; do
- find / -type f -name "*.$ext" -print0 | xargs -0 chmod a-x
-done
-
-# These files should be owned by root and not writable to anybody else
-
-#chown root:root /usr/share/mythtv/*.xml /usr/share/mythtv/*.ttf
-chown root:root /usr/share/mythtv/*.ttf
-
-chown -R root:root \
- /usr/share/mythtv/i18n \
- /usr/share/mythtv/mytharchive \
- /usr/share/mythtv/mythflix \
- /usr/share/mythtv/mythnews \
- /usr/share/mythtv/mythvideo \
- /usr/share/mythtv/mythweather \
- /usr/LH
-
-
-
-# Report any remaining orphans...
-find / /myth -xdev \( -nouser -o -nogroup \) -ls
diff --git a/abs/core-testing/linhes-scripts/update_schema_021_to_022.sh b/abs/core-testing/linhes-scripts/update_schema_021_to_022.sh
deleted file mode 100644
index 4157fb4..0000000
--- a/abs/core-testing/linhes-scripts/update_schema_021_to_022.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-mysql mythconverg <<EOF
-update gameplayers set commandline = '/usr/bin/sdlmame -rp /myth/games/xmame/roms %s' where commandline = '/usr/game/mame -rp /myth/games/xmame/roms %s';
-update settings set data = '/myth/video_stuff/coverart' where value = 'VideoArtworkDir';
-update settings set data = '/myth/video_stuff/fanart' where value = 'mythvideo.fanartDir';
-update settings set data = '/myth/video_stuff/screenshots' where value = 'mythvideo.screenshotDir';
-update settings set data = '/myth/video_stuff/banners' where value = 'mythvideo.bannerDir';
-update settings set data = '/myth/video_stuff/trailers' where value = 'mythvideo.TrailersDir';
-update settings set data = '1' where value = 'mythvideo.TrailersRandomEnabled';
-update settings set data = '1' where value = 'mythvideo.EnableAlternatePlayer';
-update settings set data = '/myth/video_stuff/screenshots' where value = 'ScreenShotPath';
-update settings set data = '/myth/games/screenshots' where value = 'mythgame.screenshotdir';
-update settings set data = '/myth/games/fanart' where value = 'mythgame.fanartdir';
-update settings set data = '/myth/games/boxart' where value = 'mythgame.boxartdir';
-update settings set data = '3' where value = 'OverrideExitMenu';
-update settings set data = 'sudo sv start mythbackend' where value = 'BackendStartCommand';
-update settings set data = 'sudo sv stop mythbackend' where value = 'BackendStopCommand';
-update settings set data = '/usr/share/mythtv/mythvideo/scripts/tmdb.pl -M' where value = 'MovieListCommandLine';
-update settings set data = replace(data, 'imdb.pl', 'tmdb.pl');
-EOF
diff --git a/abs/core-testing/linhes-scripts/upgrade_linhes.sh b/abs/core-testing/linhes-scripts/upgrade_linhes.sh
deleted file mode 100755
index 91a46e6..0000000
--- a/abs/core-testing/linhes-scripts/upgrade_linhes.sh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/bin/bash
-#Script to facilitate easy upgrade to latest LinHES.
-clear
-if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root" 1>&2
- exit 1
-fi
-function pause(){
- read -p "$*"
-}
-echo "The script will guide you thru the process of upgrading to the latest LinHES."
-pause 'Press <ENTER> to continue...'
-echo
-echo "Sync'n with the repos..."
-echo
-pacman -Sy &>/dev/null
-pacman -Qu > /tmp/linhes_upgrade
-if [ ! -s /tmp/linhes_upgrade ]
-then
- echo "No upgrades found. This could mean the repository is busy."
- echo "Or your system is already up to date."
- echo "If you have not upgrade, please try again later."
- echo "Starting the backend."
- sv start mythbackend &>/dev/null
- exit 1
-fi
-if grep -E "Master|Stand" /etc/systemconfig &>/dev/null
- then
- echo "Stopping the backend."
- sv stop mythbackend &>/dev/null
-fi
-if pacman -Qs mythvodka &>/dev/null
- then
- echo "Removing MythVodka if installed as it is no longer compatible with MythTV."
- echo
- pacman -R mythvodka &>/dev/null
-fi
-echo
-echo "Backing up Online Streams listings."
-echo
-cp /usr/share/mythtv/is.xml /usr/share/mythtv/is.xml.021
-echo "Removing mythcontrol and mythphone if installed."
-echo
-if pacman -Qs mythcontrols &>/dev/null
- then
- pacman -R mythcontrols &>/dev/null
-fi
-if pacman -Qs mythphone &>/dev/null
- then
- pacman -R mythphone &>/dev/null
-fi
-if grep -q kernel26 /tmp/linhes_upgrade
-then
- echo "Upgrading the kernel."
- echo
- if pacman -Qs v4l-dvb &>/dev/null
- then
- pacman -Sf --noconfirm kernel26 &>/dev/null && pacman -Sf --noconfirm v4l-dvb
- else
- pacman -S kernel26 --noconfirm &>/dev/null
- fi
-fi
-if grep -q v4l-dvb /tmp/linhes_upgrade
-then
- pacman -Sf --noconfirm v4l-dvb &>/dev/null
-fi
-echo "Checking for VDPAU packages and upgrading if needed."
-echo
-if pacman -Qs vdpinfo-71xx &>/dev/null
- then
- pacman -Rd vdpinfo-71xx &>/dev/null
-fi
-if pacman -Qs vdpinfo-96xx &>/dev/null
- then
- pacman -Rd vdpinfo-96xx &>/dev/null
-fi
-if pacman -Qs vdpinfo &>/dev/null
- then
- pacman -Rd vdpinfo &>/dev/null && pacman -S --noconfirm nvidia &>/dev/null && pacman -S --noconfirm vdpauinfo &>/dev/null
-fi
-echo "Performing complete system upgrade."
-echo "This may take some time depending on your connection speed."
-echo "Server bandwidth utilization will also have an affect."
-echo "Please be patient."
-echo
-pacman -Suf --noconfirm &>/dev/null
-echo "Restoring Online Streams listings."
-echo
-cp /usr/share/mythtv/is.xml.021 /usr/share/mythtv/is.xml
-if grep -E "Master|Stand" /etc/systemconfig &>/dev/null
- then
- echo "Starting the backend. This will automatically update the schema."
- sv start mythbackend &>/dev/null
- echo "I'll launch an xterm so you watch output backend log."
- echo "Once the schema updates are complete, switch back to this xterm."
- echo -e "\033[1mWhen you see \"Upgrading to MythTV schema version 1254\"\033[0m"
- echo "You can switch back to this xterm."
- echo -e "\033[1mNote:After pressing <ENTER>, I'll be asleep for 30 secs...\033[0m"
- echo -e "\033[1mThis will give the schema time to upgrade.\033[0m"
- pause 'Press <ENTER> to continue...'
- xterm -fn *18* -e tail -f /var/log/mythtv/mythbackend.log &
- #Sleeping for 30 seconds to give the schema time to upgrade....
- sleep 30
- read -p "Press <ENTER> to continue once the schema upgrade is complete."
- echo
- echo -e "\033[1mNow, the frontend will launch to update the schema for any plugins.\033[0m"
- echo -e "\033[1mOnce the this is done, please exit the frontend.\033[0m"
- pause 'Press <ENTER> to continue...'
- xterm -e mythfrontend
- echo
- echo "Performing LinHES specific schema updates."
- echo
- /usr/LH/bin/update_schema_021_to_022.sh
- cat /data/database/dvd_transcode_r6.sql | mysql -u root mythconverg
- /usr/LH/bin/mythwelcome-config.py
-fi
-echo "All done!"
-echo -e "\033[5mThanks for choosing LinHES!\033[0m"
-if grep -q kernel26 /tmp/linhes_upgrade
-then
- echo "The kernel was upgraded, we need to reboot."
- pause "Press <ENTER> to reboot."
- reboot
-else
- if grep -q v4l-dvb /tmp/linhes_upgrade
- then
- echo "The V4L\DVB modules were upgraded."
- pause "Press <ENTER> to reboot."
- reboot
- else
- echo "Launching mythfrontend once again!"
- echo "Enjoy the latest version!"
- sleep 5
- mythfrontend
-fi
-fi
diff --git a/abs/core-testing/linhes-scripts/upgrade_to_0.22.sh b/abs/core-testing/linhes-scripts/upgrade_to_0.22.sh
deleted file mode 100644
index 8536a05..0000000
--- a/abs/core-testing/linhes-scripts/upgrade_to_0.22.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-#Script to facilitate easy upgrade to MythTV 0.22 in LinHES.
-if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root" 1>&2
- exit 1
-fi
-function pause(){
- read -p "$*"
-}
-clear
-echo "The script will guide you thru the process of upgrading LinHES to MythTV 0.22."
-pause 'Press <ENTER> to continue...'
-if grep -E "Master|Stand" /etc/systemconfig &>/dev/null
- then
- echo "Stopping the backend."
- sv stop mythbackend &>/dev/null
-fi
-echo "Sync'n with the repos..."
-pacman -Sy &>/dev/null
-echo "Removing MythVodka if installed as it is no longer compatible with MythTV."
-if pacman -Qs mythvodka &>/dev/null
- then
- pacman -R mythvodka &>/dev/null
-fi
-echo "Backing up Online Streams listings."
-cp /usr/share/mythtv/is.xml /usr/share/mythtv/is.xml.021
-echo "Removing mythcontrol, mythphone and mythsmolt if installed."
-if pacman -Qs mythcontrols &>/dev/null
- then
- pacman -R mythcontrols &>/dev/null
-fi
-if pacman -Qs mythphone &>/dev/null
- then
- pacman -R mythphone &>/dev/null
-fi
-if pacman -Qs mythsmolt &>/dev/null
- then
- pacman -R mythsmolt &>/dev/null
-fi
-echo "Upgrading the kernel."
-if pacman -Qs v4l-dvb &>/dev/null
- then
- pacman -Sf --noconfirm kernel26 &>/dev/null && pacman -Sf --noconfirm v4l-dvb
- else
- pacman -S kernel26 --noconfirm &>/dev/null
-fi
-echo "Checking for VDPAU packages and upgrading if needed."
-if pacman -Qs vdpinfo-71xx &>/dev/null
- then
- pacman -Rd vdpinfo-71xx &>/dev/null
-fi
-if pacman -Qs vdpinfo-96xx &>/dev/null
- then
- pacman -Rd vdpinfo-96xx &>/dev/null
-fi
-if pacman -Qs vdpinfo &>/dev/null
- then
- pacman -Rd vdpinfo &>/dev/null && pacman -S --noconfirm nvidia &>/dev/null && pacman -S --noconfirm vdpauinfo &>/dev/null
-fi
-echo "Performing complete system upgrade."
-echo "This may take some time depending on your connection speed."
-echo "Server bandwidth utilization will also have an affect."
-echo "Please be patient."
-pacman -Su --noconfirm &>/dev/null
-echo "Restoring Online Streams listings."
-cp /usr/share/mythtv/is.xml.021 /usr/share/mythtv/is.xml
-clear
-if grep -E "Master|Stand" /etc/systemconfig &>/dev/null
- then
- echo "Starting the backend. This will automatically update the schema."
- sv start mythbackend &>/dev/null
- echo "I'll launch an xterm so you watch output backend log."
- echo "Once the schema updates are complete, switch back to this xterm."
- echo -e "\033[1mWhen you see \"Upgrading to MythTV schema version 1244\"\033[0m"
- echo "You can switch back to this xterm."
- echo -e "\033[1mNote:After pressing <ENTER>, I'll be asleep for 30 secs...\033[0m"
- echo -e "\033[1mThis will give the schema time to upgrade.\033[0m"
- pause 'Press <ENTER> to continue...'
- xterm -fn *18* -e tail -f /var/log/mythtv/mythbackend.log &
- #Sleeping for 30 seconds to give the schema time to upgrade....
- sleep 30
- read -p "Press <ENTER> to continue once the schema upgrade is complete."
- echo -e "\033[1mNow, the frontend will launch to update the schema for any plugins.\033[0m"
- echo -e "\033[1mOnce the this is done, please exit the frontend.\033[0m"
- pause 'Press <ENTER> to continue...'
- xterm -e mythfrontend
- echo "Performing LinHES specific schema updates."
- /usr/LH/bin/update_schema_021_to_022.sh
- cat /data/database/dvd_transcode_r6.sql | mysql -u root mythconverg
-fi
-echo "All done!"
-echo -e "\033[5mThanks for choosing LinHES!\033[0m"
-pause "Press <ENTER> to reboot."
-reboot
diff --git a/abs/core-testing/linhes-scripts/vdpau-detector b/abs/core-testing/linhes-scripts/vdpau-detector
deleted file mode 100755
index c8cd155..0000000
--- a/abs/core-testing/linhes-scripts/vdpau-detector
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-
-# This script written by an anonymous author
-# Original page http://www.knoppmythwiki.org/index.php?page=HardwareAcceleratedVideo
-#
-# It's modded to allow vdpau switches commands to pass to a modded version of Bob Igo's
-# mplayer-resumer.pl wrapper for mplayer
-#
-# User can customize commandline for mplayer by editing the appropriate sections below
-# They include BASIC_OPTS, NOHD_OPTS, and LOW_OPTS
-
-IAM=$0
-FILE=$1
-
-#if no input display usage
-if [[ -z "$FILE" ]]; then
- echo usage: $0 /path/to/file
- exit
-fi
-
-MPLAYER="/usr/bin/mplayer"
-
-# For a complete list of options, see the mplayer DOCS
-# http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html
-#
-
-# Options for all videos: fullscreen, zoom, and use software eq
-BASIC_OPTS="-fs -zoom"
-
-# Options for non-HD videos: force aspect to 16x10 (to ensure video fills TV screen)
-# You'll need to modify the ratio if your res differs
-# Example: 1920x1080 = 1.778 = 16:9
-# Example: 1680x1050 = 1.600 = 16:10
-# Example: 1280x720 = 1.778 = 16:9
-
-NOHD_OPTS="-aspect 16:10"
-
-# Options for normal and lowres videos: use XV forcing 16x10
-LOW_OPTS="-aspect 16:10 -vo xv"
-
-VWIDTH=$($MPLAYER -identify -vo vdpau -frames 0 "$FILE" | grep ID_VIDEO_WIDTH | cut -c 16-25)
-VCODEC=$($MPLAYER -identify -vo vdpau -frames 0 "$FILE" | grep ID_VIDEO_CODEC | cut -c 16-25)
-
-# all following echo commands can be uncommented for debug info
-#echo .
-#echo " DEBUG info: video codec: $VCODEC"
-#echo " DEBUG info: video width: $VWIDTH"
-#echo " Debug info:
-
-
-# Test for codec, if it's supported by VDPAU, set options to use it. Then, check if the video is in HD,
-# and if it's not, set non-HD options.
-case $VCODEC in
-ffh264)
- #echo -e "Playing h.264 file $FILE:\n"
- MPLAYEROPTS="$BASIC_OPTS -vo vdpau -vc ffh264vdpau"
- if [ $VWIDTH -lt 1280 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$MPLAYEROPTS $NOHD_OPTS"
- fi
- if [ $VWIDTH -lt 700 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$BASIC_OPTS $LOW_OPTS"
- fi
- ;;
-ffmpeg2)
- #echo -e "Playing MPEG2 file $FILE:\n"
- MPLAYEROPTS="$BASIC_OPTS -vo vdpau -vc ffmpeg12vdpau"
- if [ $VWIDTH -lt 1280 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$MPLAYEROPTS $NOHD_OPTS"
- fi
- if [ $VWIDTH -lt 700 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$BASIC_OPTS $LOW_OPTS"
- fi
- ;;
-ffwmv3)
- #echo -e "Playing WMV3 file $FILE:\n"
- MPLAYEROPTS="$BASIC_OPTS -vo vdpau -vc ffwmv3vdpau"
- if [ $VWIDTH -lt 1280 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$MPLAYEROPTS $NOHD_OPTS"
- fi
- if [ $VWIDTH -lt 700 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$BASIC_OPTS $LOW_OPTS"
- fi
- ;;
-# VC-1 is largely unsupported by nvidia - uncomment this section if you're sure your card supports it.
-ffvc1)
- #echo -e "Playing VC-1 file $FILE:\n"
- MPLAYEROPTS="$BASIC_OPTS -vo vdpau -vc ffvc1vdpau"
- if [ $VWIDTH -lt 1280 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$MPLAYEROPTS $NOHD_OPTS"
- fi
- if [ $VWIDTH -lt 700 ] && [ $VWIDTH != 0 ]; then
- MPLAYEROPTS="$BASIC_OPTS $LOW_OPTS"
- fi
- ;;
-*)
- #echo -e "Playing normal file $FILE:\n"
- # Use XV and yadif filter with 'normal' (DiVX, XViD, old WMV, etc.) files, and force 16:9
- # -vf filters only seem to work with XV, or at least they don't work w/VDPAU
- MPLAYEROPTS="$BASIC_OPTS $LOW_OPTS"
- ;;
-esac
-
-echo $MPLAYEROPTS