From 4ac045673065b3f2d00304a4c89b893d12ae86d5 Mon Sep 17 00:00:00 2001 From: Bob Igo Date: Fri, 7 Aug 2009 12:13:53 -0400 Subject: hardframedrop and framedrop both seem to interfere with playback when forward skip is used a lot; removing framedrop settings from tweaker --- abs/core-testing/tweaker/PKGBUILD | 2 +- abs/core-testing/tweaker/bin/twk_cpu.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/abs/core-testing/tweaker/PKGBUILD b/abs/core-testing/tweaker/PKGBUILD index 453240c..443d71a 100644 --- a/abs/core-testing/tweaker/PKGBUILD +++ b/abs/core-testing/tweaker/PKGBUILD @@ -1,6 +1,6 @@ pkgname=tweaker pkgver=1 -pkgrel=52 +pkgrel=53 pkgdesc="applies tweaks to the baseline configuration and attempts to optimize settings for the hardware it finds" arch=('i686' 'x86_64') diff --git a/abs/core-testing/tweaker/bin/twk_cpu.pl b/abs/core-testing/tweaker/bin/twk_cpu.pl index 8bddbe3..8d5e563 100755 --- a/abs/core-testing/tweaker/bin/twk_cpu.pl +++ b/abs/core-testing/tweaker/bin/twk_cpu.pl @@ -136,7 +136,7 @@ sub implement_option { change_or_make_setting('OSDTheme', 'blootube-osd') || exit -1; change_or_make_setting('PlayBoxShading', '0') || exit -1; change_or_make_setting('PlaybackExitPrompt', '2') || exit -1; - edit_mplayer_conf(); + #edit_mplayer_conf(); # This was found to cause temporary picture freezing when skipping forward through playback, followed by out-of-sync audio and video } else { exit -1; } -- cgit v0.12 From b1d081edd3cbb7d29f18673ad01ecc427b43e841 Mon Sep 17 00:00:00 2001 From: Bob Igo Date: Fri, 7 Aug 2009 13:12:26 -0400 Subject: iterating toward working myth2ipod and myt2xvid3 packages --- abs/extra-testing/myt2xvid3/PKGBUILD | 9 ++++----- abs/extra-testing/myt2xvid3/myt2xvid3.install | 11 +++++++---- abs/extra-testing/myth2ipod/PKGBUILD | 7 +++---- abs/extra-testing/myth2ipod/myth2ipod.install | 13 +++++++------ 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/abs/extra-testing/myt2xvid3/PKGBUILD b/abs/extra-testing/myt2xvid3/PKGBUILD index 231d0b3..dd12733 100755 --- a/abs/extra-testing/myt2xvid3/PKGBUILD +++ b/abs/extra-testing/myt2xvid3/PKGBUILD @@ -1,6 +1,6 @@ pkgname=myt2xvid3 pkgver=0.1 -pkgrel=2 +pkgrel=3 arch=("i686") pkgdesc="A multimedia framework based on the MPEG-4 Systems standard" url="http://www.knoppmythwiki.org/index.php?page=XvidEncoding" @@ -12,8 +12,7 @@ source=( myt2xvid3 myt2xvid3-userjob.sh archive.php) build() { cd $startdir/src install -D -m 755 myt2xvid3 $startdir/pkg/usr/bin/myt2xvid3 - install -D -m 755 myt2xvid3-userjob.sh /$startdir/pkg/usr/bin/myt2xvid3-userjob.sh - install -D -m 755 archive.php /myth/video/archive/archive.php - - + install -D -m 755 myt2xvid3-userjob.sh $startdir/pkg/usr/bin/myt2xvid3-userjob.sh + mkdir -m755 -p $startdir/pkg/myth/video/archive/ + install -D -m 755 archive.php $startdir/pkg/myth/video/archive/ } diff --git a/abs/extra-testing/myt2xvid3/myt2xvid3.install b/abs/extra-testing/myt2xvid3/myt2xvid3.install index f363fa2..19d050d 100755 --- a/abs/extra-testing/myt2xvid3/myt2xvid3.install +++ b/abs/extra-testing/myt2xvid3/myt2xvid3.install @@ -1,6 +1,7 @@ pre_install() { - echo "" + mkdir -p /myth/video/archive + chown mythtv:http /myth/video/archive } pre_upgrade() { @@ -13,9 +14,8 @@ pre_remove() { post_install() { . /etc/systemconfig - mkdir /myth/video/archive - chown mythtv:users /myth/video/archive ln -s /myth/video/archive /data/srv/httpd/htdocs/archive + ln -s /myth/video/archive/archive.php /myth/video/archive/index.php mv /usr/bin/myt2xvid3 /tmp sed -e "s/REPLACEME/$HOSTNAME/g" /tmp/myt2xvid3 > /usr/bin/myt2xvid3 chown -R mythtv:http /myth/video/archive @@ -26,7 +26,10 @@ post_upgrade() { } post_remove() { - rm -fr /data/srv/http/htdocs/archive + rm -fr /data/srv/http/htdocs/archive + rm -rf /myth/video/archive/index.php + rm -rf /myth/video/archive/archive.php + # don't delete content that the user may still want, so leave /myth/video/archive } op=$1 diff --git a/abs/extra-testing/myth2ipod/PKGBUILD b/abs/extra-testing/myth2ipod/PKGBUILD index bfb7c91..8bc7811 100755 --- a/abs/extra-testing/myth2ipod/PKGBUILD +++ b/abs/extra-testing/myth2ipod/PKGBUILD @@ -1,6 +1,6 @@ pkgname=myth2ipod pkgver=0.2 -pkgrel=18 +pkgrel=24 arch=("i686") pkgdesc="A multimedia framework based on the MPEG-4 Systems standard" url="myth2ipod.com" @@ -14,7 +14,6 @@ build() { install -D -m 755 myth2ipod $startdir/pkg/usr/bin/myth2ipod install -D -m 755 myth2ipod-userjob.sh /$startdir/pkg/usr/bin/myth2ipod-userjob.sh install -D -m755 iPod.pm $startdir/pkg/usr/share/nuvexport/export/ffmpeg/iPod.pm - install -D -m755 m2iweb.php $startdir/pkg/myth/ipodfeed - - + mkdir -m755 -p $startdir/pkg/myth/ipodfeed + install -D -m755 m2iweb.php $startdir/pkg/myth/ipodfeed/ } diff --git a/abs/extra-testing/myth2ipod/myth2ipod.install b/abs/extra-testing/myth2ipod/myth2ipod.install index 4a7e046..9b9239a 100755 --- a/abs/extra-testing/myth2ipod/myth2ipod.install +++ b/abs/extra-testing/myth2ipod/myth2ipod.install @@ -1,6 +1,7 @@ pre_install() { - echo "" + mkdir -p /myth/ipodfeed + chown mythtv:http /myth/ipodfeed } pre_upgrade() { @@ -13,14 +14,11 @@ pre_remove() { post_install() { . /etc/systemconfig - mkdir /myth/ipodfeed - chown mythtv:users /myth/ipodfeed ln -s /myth/ipodfeed /data/srv/httpd/htdocs/ipodfeed + ln -s /myth/ipodfeed/m2iweb.php /myth/ipodfeed/index.php cp /usr/bin/myth2ipod /tmp sed -e "s/REPLACEME/$hostname/g" /tmp/myth2ipod > /usr/bin/myth2ipod chown -R mythtv:http /myth/ipodfeed - - } post_upgrade() { @@ -28,7 +26,10 @@ post_upgrade() { } post_remove() { - rm -fr /data/srv/httpd/htdocs/ipodfeed + rm -fr /data/srv/httpd/htdocs/ipodfeed + rm -rf /myth/ipodfeed/m2iweb.php + rm -rf /myth/ipodfeed/index.php + # don't delete content that the user may still want, so leave /myth/ipodfeed } op=$1 -- cgit v0.12 From 264d165b09baa4b102bf8f147f2822b23e37d5a4 Mon Sep 17 00:00:00 2001 From: Nathan Harris Date: Fri, 7 Aug 2009 13:24:13 -0400 Subject: mythtv-svn: updated to svn 21145 --- abs/core-testing/mythtv/trunk/morethemes/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mp_all.sh | 2 +- abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythflix/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythgame/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythnews/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/myththemes/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythtv/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythweather/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythweb/PKGBUILD | 2 +- abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD b/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD index 9bb5b16..f3f8e7c 100644 --- a/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD @@ -1,5 +1,5 @@ pkgname=morethemes-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Additional themes for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mp_all.sh b/abs/core-testing/mythtv/trunk/mp_all.sh index 37b13d9..d3de781 100755 --- a/abs/core-testing/mythtv/trunk/mp_all.sh +++ b/abs/core-testing/mythtv/trunk/mp_all.sh @@ -1,5 +1,5 @@ #!/bin/sh -pkgver=21136 +pkgver=21145 pkgrel=1 # NOTE: Make sure to build and install mythtv first BEFORE building anything else diff --git a/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD b/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD index c3349fb..9edf1fa 100644 --- a/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mytharchive-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="MythTV plugin that lets you create DVDs from or archive your recorded shows." url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD b/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD index 0933fbb..bc64b8d 100644 --- a/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythbrowser-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Mini web browser for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD b/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD index 14cfb1d..0215cf7 100644 --- a/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythflix-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Netflix access plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD b/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD index 4061623..e949ceb 100644 --- a/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythgallery-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Image gallery plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD b/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD index 72d51df..f7e0fe9 100644 --- a/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythgame-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Emulation plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD b/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD index 013ca2f..415c4e0 100644 --- a/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythmovies-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Displays information about movies playing in the area." url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD b/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD index 437f763..a9cef5a 100644 --- a/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythmusic-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Music playing plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD b/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD index e259072..688f3ee 100644 --- a/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythnews-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="News checking plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD b/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD index ce57e1b..409573c 100755 --- a/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD @@ -1,5 +1,5 @@ pkgname=myththemes-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Themes for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD b/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD index e728a7a..b30e205 100755 --- a/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythtv-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="A personal video recorder for Linux" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD b/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD index 1b99a3a..d9a587b 100644 --- a/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythvideo-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Video playback and browsing plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD b/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD index 271249b..8a56277 100644 --- a/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythweather-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Weather checking plugin for MythTV" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD b/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD index 933aa5c..bd97ea0 100644 --- a/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythweb-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Web interface for MythTV's backend" url="http://www.mythtv.org" diff --git a/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD b/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD index 6952c4c..052fa65 100644 --- a/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD +++ b/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythzoneminder-svn -pkgver=21136 +pkgver=21145 pkgrel=1 pkgdesc="Integrates ZoneMinder into MythTV" url="http://www.mythtv.org" -- cgit v0.12 From 40f3c3e25ca943a296220af7be72b583a8ecf3b0 Mon Sep 17 00:00:00 2001 From: Bob Igo Date: Fri, 7 Aug 2009 13:41:49 -0400 Subject: reference to alternate spelling of myt2xvid3's binary was fixed --- abs/extra-testing/myt2xvid3/PKGBUILD | 2 +- abs/extra-testing/myt2xvid3/myt2xvid3.install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/abs/extra-testing/myt2xvid3/PKGBUILD b/abs/extra-testing/myt2xvid3/PKGBUILD index dd12733..396b5f0 100755 --- a/abs/extra-testing/myt2xvid3/PKGBUILD +++ b/abs/extra-testing/myt2xvid3/PKGBUILD @@ -1,6 +1,6 @@ pkgname=myt2xvid3 pkgver=0.1 -pkgrel=3 +pkgrel=4 arch=("i686") pkgdesc="A multimedia framework based on the MPEG-4 Systems standard" url="http://www.knoppmythwiki.org/index.php?page=XvidEncoding" diff --git a/abs/extra-testing/myt2xvid3/myt2xvid3.install b/abs/extra-testing/myt2xvid3/myt2xvid3.install index 19d050d..8afb390 100755 --- a/abs/extra-testing/myt2xvid3/myt2xvid3.install +++ b/abs/extra-testing/myt2xvid3/myt2xvid3.install @@ -22,7 +22,7 @@ post_install() { } post_upgrade() { - /usr/bin/myth2xvid -rebuild + /usr/bin/myt2xvid3 -rebuild } post_remove() { -- cgit v0.12 From b4a3df0fd4505b0bcd4c8ae0e571fe02d2b2874c Mon Sep 17 00:00:00 2001 From: Bob Igo Date: Fri, 7 Aug 2009 16:33:22 -0400 Subject: Indented for readability; fixed typos --- abs/extra-testing/myt2xvid3/PKGBUILD | 2 +- abs/extra-testing/myt2xvid3/myt2xvid3 | 398 +++++++++++++++++----------------- abs/extra-testing/myth2ipod/PKGBUILD | 2 +- abs/extra-testing/myth2ipod/myth2ipod | 398 +++++++++++++++++----------------- 4 files changed, 400 insertions(+), 400 deletions(-) diff --git a/abs/extra-testing/myt2xvid3/PKGBUILD b/abs/extra-testing/myt2xvid3/PKGBUILD index 396b5f0..e5b3af9 100755 --- a/abs/extra-testing/myt2xvid3/PKGBUILD +++ b/abs/extra-testing/myt2xvid3/PKGBUILD @@ -1,6 +1,6 @@ pkgname=myt2xvid3 pkgver=0.1 -pkgrel=4 +pkgrel=5 arch=("i686") pkgdesc="A multimedia framework based on the MPEG-4 Systems standard" url="http://www.knoppmythwiki.org/index.php?page=XvidEncoding" diff --git a/abs/extra-testing/myt2xvid3/myt2xvid3 b/abs/extra-testing/myt2xvid3/myt2xvid3 index cad5278..af65188 100755 --- a/abs/extra-testing/myt2xvid3/myt2xvid3 +++ b/abs/extra-testing/myt2xvid3/myt2xvid3 @@ -6,174 +6,174 @@ # modified to use nuvexport by starv at juniks dot org # Includes - use DBI; - use Getopt::Long; - use File::Path; - +use DBI; +use Getopt::Long; +use File::Path; + # User variables - my $portable = "XviD"; - my $feedfile = "/myth/video/archive/feed.php"; - my $feedpath = "/myth/video/archive/"; - my $wwwloc = "/data/srv/httpd/htdocs"; - my $feedurl = "http://REPLACEME/archive/"; - my $nuvoptions ="--mode=XviD --nice=19 --cutlist --nodenoise --nodeinterlace --crop --multipass"; - +my $portable = "XviD"; +my $feedfile = "/myth/video/archive/feed.php"; +my $feedpath = "/myth/video/archive/"; +my $wwwloc = "/data/srv/httpd/htdocs"; +my $feedurl = "http://REPLACEME/archive/"; +my $nuvoptions ="--mode=XviD --nice=19 --cutlist --nodenoise --nodeinterlace --crop --multipass"; + # Some variables - our ($dest, $format, $usage); - our ($db_host, $db_user, $db_name, $db_pass, $video_dir); - our ($hostname, $db_handle, $sql, $statement, $row_ref); - our ($chanid, $start, $nuvfile, @nuvarray); - my $rebuild = '0'; - my $encode = '0'; - my $debug = '0'; - my $setup = '0'; - my $cut = '0'; - my( $rightnow ) = `date`; +our ($dest, $format, $usage); +our ($db_host, $db_user, $db_name, $db_pass, $video_dir); +our ($hostname, $db_handle, $sql, $statement, $row_ref); +our ($chanid, $start, $nuvfile, @nuvarray); +my $rebuild = '0'; +my $encode = '0'; +my $debug = '0'; +my $setup = '0'; +my $cut = '0'; +my( $rightnow ) = `date`; GetOptions ("rebuild" => \$rebuild, - "encode" => \$encode, - "debug" => \$debug, - "setup" => \$setup, - "cut" => \$cut); + "encode" => \$encode, + "debug" => \$debug, + "setup" => \$setup, + "cut" => \$cut); if ($setup == 1){ - system("clear"); - print "Setup will do everything needed to run this script.\n"; - print "This has only been tested on KnoppMyth R5A22.\n"; - print "make sure you have edited the variables for your conguration.\n"; - my $cksetup = &promptUser("\nAre you sure you want to procceed?","n"); - if ($cksetup =~ "y") { - DoSetup(); - exit; - } - print "Setup exited. Nothing done.\n"; - exit; + system("clear"); + print "Setup will do everything needed to run this script.\n"; + print "This has only been tested on KnoppMyth R5A22.\n"; + print "make sure you have edited the variables for your conguration.\n"; + my $cksetup = &promptUser("\nAre you sure you want to procceed?","n"); + if ($cksetup =~ "y") { + DoSetup(); + exit; + } + print "Setup exited. Nothing done.\n"; + exit; } elsif ($rebuild == 1){ - GenerateRSSFeed(); - print "Rebuilding of RSS feed is complete.\n"; - exit; + GenerateRSSFeed(); + print "Rebuilding of RSS feed is complete.\n"; + exit; } else { - Encode4Portable(); - print "$title is ready for your $portable\n"; - - # Check to see if the feed file exists; if not, create it. - if (! -e $feedfile) { - print "No feed file found. I will make one for you.\n"; - GenerateRSSFeed(); - print "All done.\n"; - } + Encode4Portable(); + print "$title is ready for your $portable\n"; + + # Check to see if the feed file exists; if not, create it. + if (! -e $feedfile) { + print "No feed file found. I will make one for you.\n"; + GenerateRSSFeed(); + print "All done.\n"; + } } sub Encode4Portable{ - if ($#ARGV != 1) { - print "Encoding requires options.\nusage: myth2ipod DIRECTORY FILE\n"; - exit; - } - - # Get the show information - $directory = $ARGV[0]; - $file = $ARGV[1]; - @file = split(/_/, $file); - $chanid = $file[0]; - $start = substr $file[1],0,14; - if($debug == 1){ print "$chanid\n$start\n"}; - if (! -e $directory."/".$file){ - print "Opps, the file ".$directory.$file." does not exist.\n"; - exit; - } - - # Connect to the database - PrepSQLRead(); - $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass) + if ($#ARGV != 1) { + print "Encoding requires options.\nusage: myth2ipod DIRECTORY FILE\n"; + exit; + } + + # Get the show information + $directory = $ARGV[0]; + $file = $ARGV[1]; + @file = split(/_/, $file); + $chanid = $file[0]; + $start = substr $file[1],0,14; + if($debug == 1){ print "$chanid\n$start\n"}; + if (! -e $directory."/".$file){ + print "Oops, the file ".$directory.$file." does not exist.\n"; + exit; + } + + # Connect to the database + PrepSQLRead(); + $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass) or die "Cannot connect to database: $!\n\n"; - $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start"; + $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start"; - $statement = $db_handle->prepare($sql) - or die "Couldn't prepare query '$sql': $DBI::errstr\n"; - - $statement->execute() - or die "Couldn't execute query '$sql': $DBI::errstr\n"; - $row_ref = $statement->fetchrow_hashref(); - if($debug == 1){ print "$row_ref->{starttime}\n"}; - $title = $row_ref->{title}; - $subtitle = $row_ref->{subtitle}; - $recorddate = $row_ref->{starttime}; - $description = $row_ref->{description}; - $category = $row_ref->{category}; - $filename = $title."-".$subtitle."-".substr $start, 0, 8; - $filename =~ s/ /_/g; - $filename =~ s/&/+/g; - $filename =~ s/\047//g; + $statement = $db_handle->prepare($sql) + or die "Couldn't prepare query '$sql': $DBI::errstr\n"; + + $statement->execute() + or die "Couldn't execute query '$sql': $DBI::errstr\n"; + $row_ref = $statement->fetchrow_hashref(); + if($debug == 1){ print "$row_ref->{starttime}\n"}; + $title = $row_ref->{title}; + $subtitle = $row_ref->{subtitle}; + $recorddate = $row_ref->{starttime}; + $description = $row_ref->{description}; + $category = $row_ref->{category}; + $filename = $title."-".$subtitle."-".substr $start, 0, 8; + $filename =~ s/ /_/g; + $filename =~ s/&/+/g; + $filename =~ s/\047//g; $filename =~ s/[^+0-9a-zA-Z_-]+/_/g; $filename =~ s/_$//g; - - printf("Starting nuvexport...\n"); - EncodeIt(); - printf("Nuvexport completed, starting xml generation...\n"); - CreateItemXML(); - printf("XML file created for \"$filename\" : Yipeee\n"); - printf("Cleaning up temporary files\n"); - $cmd = "rm -f $feedpath$chanid\_$start.temp.mp4"; - print $cmd."\n"; - if(system($cmd)) { print "Removing nuvexport temp file failed\n"; } - - # remove the cutlist incase we added it. - if ($cut == 1){ - printf("Generating cutlist\n"); - $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --clearcutlist"; - print $cmd."\n"; - if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; } - } - return 0; + + printf("Starting nuvexport...\n"); + EncodeIt(); + printf("Nuvexport completed, starting xml generation...\n"); + CreateItemXML(); + printf("XML file created for \"$filename\" : Yipeee\n"); + printf("Cleaning up temporary files\n"); + $cmd = "rm -f $feedpath$chanid\_$start.temp.mp4"; + print $cmd."\n"; + if(system($cmd)) { print "Removing nuvexport temp file failed\n"; } + + # remove the cutlist incase we added it. + if ($cut == 1){ + printf("Generating cutlist\n"); + $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --clearcutlist"; + print $cmd."\n"; + if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; } + } + return 0; } # # Encode for Portable # sub EncodeIt { - # Create cutlist from commercial flagging if -cut was passed to the script - if ($cut == 1){ + # Create cutlist from commercial flagging if -cut was passed to the script + if ($cut == 1){ printf("Generating cutlist\n"); $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --gencutlist"; print $cmd."\n"; if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; } - } - - # Use nuvexport to do the work - $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start $nuvoptions --filename=$chanid\_$start.$portable --path=$feedpath"; - print $cmd."\n"; - if(system($cmd)) { print "Nuvexport encoding seems to have failed\n"; } - - # Now clean up the output so iPods with firmware 1.1 and above can use it - #$cmd = "/usr/local/bin/MP4Box -add $feedpath$chanid\_$start.temp.mp4 $feedpath$chanid\_$start.$portable.mp4"; - #print $cmd."\n"; - #if(system($cmd)) { print "MP4Box cleanup seems to have failed\n"; } - return 0; + } + + # Use nuvexport to do the work + $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start $nuvoptions --filename=$chanid\_$start.$portable --path=$feedpath"; + print $cmd."\n"; + if(system($cmd)) { print "Nuvexport encoding seems to have failed\n"; } + + # Now clean up the output so iPods with firmware 1.1 and above can use it + #$cmd = "/usr/local/bin/MP4Box -add $feedpath$chanid\_$start.temp.mp4 $feedpath$chanid\_$start.$portable.mp4"; + #print $cmd."\n"; + #if(system($cmd)) { print "MP4Box cleanup seems to have failed\n"; } + return 0; } # # Create XML with tag for this video file # sub CreateItemXML { - open(ITEM, ">$feedpath$chanid\_$start.$portable.xml"); - print ITEM "\n"; - print ITEM "".&encodeForXML($title." - ".$subtitle)."\n"; - print ITEM "MythTV\n"; - print ITEM "MythTV\n"; - print ITEM "\n"; - print ITEM "".&encodeForXML($file)."\n"; - print ITEM "".&encodeForXML($description)."\n"; - print ITEM "".$recorddate."\n"; - print ITEM "\n"; - print ITEM "\n"; - print ITEM "".&encodeForXML($title." - ".$subtitle." - ".$category)."\n"; - print ITEM "".&encodeForXML($category)."\n"; - print ITEM "\n"; - print "\"$filename\" has been added to the feed.\n"; - close(ITEM); - return 0; + open(ITEM, ">$feedpath$chanid\_$start.$portable.xml"); + print ITEM "\n"; + print ITEM "".&encodeForXML($title." - ".$subtitle)."\n"; + print ITEM "MythTV\n"; + print ITEM "MythTV\n"; + print ITEM "\n"; + print ITEM "".&encodeForXML($file)."\n"; + print ITEM "".&encodeForXML($description)."\n"; + print ITEM "".$recorddate."\n"; + print ITEM "\n"; + print ITEM "\n"; + print ITEM "".&encodeForXML($title." - ".$subtitle." - ".$category)."\n"; + print ITEM "".&encodeForXML($category)."\n"; + print ITEM "\n"; + print "\"$filename\" has been added to the feed.\n"; + close(ITEM); + return 0; } # @@ -181,55 +181,55 @@ sub CreateItemXML { # sub GenerateRSSFeed { - open(RSS, ">$feedfile"); - print RSS "\"; ?>\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "MythTV - <? if (\$_GET['title'] == \"\") { \$title = \"*\"; echo \"Recorded Programs\"; }\n"; - print RSS "else { \$title = \$_GET['title']; echo str_replace(\"_\",\" \",\$_GET['title']); } ?> \n"; - print RSS "MythTV - myth2ipod\n"; - print RSS "".&encodeForXML($feedurl)."\n"; - print RSS "Transcoded recording for your iPod Video.\n"; - print RSS "Myth TV Recorded Programs for the iPod v.1\n"; - print RSS "Myth TV Recorded Programs for the iPod v.1\n"; - print RSS "\n"; - print RSS "MythTV\n"; - print RSS "mythtv\@localhost\n"; - print RSS "\n"; - print RSS "No\n"; - print RSS "en-us\n"; - print RSS "Copyright 2005.\n"; - print RSS "mythtv\@localhost\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "TV Shows\n"; - print RSS ""; - print RSS ""; - print RSS "http://myth2ipod.com/mythipod_200.jpg\n"; - print RSS "MythTV 2 iPod\n"; - print RSS "".&encodeForXML($feedurl)."\n"; - print RSS "200\n"; - print RSS "200\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "\n"; - close(RSS); - if($debug == 1){ print "I created a feed file, was I supposed to?\n"}; + open(RSS, ">$feedfile"); + print RSS "\"; ?>\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "MythTV - <? if (\$_GET['title'] == \"\") { \$title = \"*\"; echo \"Recorded Programs\"; }\n"; + print RSS "else { \$title = \$_GET['title']; echo str_replace(\"_\",\" \",\$_GET['title']); } ?> \n"; + print RSS "MythTV - myth2ipod\n"; + print RSS "".&encodeForXML($feedurl)."\n"; + print RSS "Transcoded recording for your iPod Video.\n"; + print RSS "Myth TV Recorded Programs for the iPod v.1\n"; + print RSS "Myth TV Recorded Programs for the iPod v.1\n"; + print RSS "\n"; + print RSS "MythTV\n"; + print RSS "mythtv\@localhost\n"; + print RSS "\n"; + print RSS "No\n"; + print RSS "en-us\n"; + print RSS "Copyright 2005.\n"; + print RSS "mythtv\@localhost\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "TV Shows\n"; + print RSS ""; + print RSS ""; + print RSS "http://myth2ipod.com/mythipod_200.jpg\n"; + print RSS "MythTV 2 iPod\n"; + print RSS "".&encodeForXML($feedurl)."\n"; + print RSS "200\n"; + print RSS "200\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "\n"; + close(RSS); + if($debug == 1){ print "I created a feed file, was I supposed to?\n"}; - return 0; + return 0; } # substitute for XML entities sub encodeForXML { - local $result; - $result = $_[0]; - $result =~ s/&/&/g; - $result =~ s//>/g; - $result; + local $result; + $result = $_[0]; + $result =~ s/&/&/g; + $result =~ s//>/g; + $result; } @@ -250,17 +250,17 @@ sub PrepSQLRead{ '/usr/local/etc/mythtv/mysql.txt', "$ENV{HOME}/.mythtv/mysql.txt", 'mysql.txt' - ); + ); foreach my $file (@mysql) { next unless (-e $file); $found = 1; open(CONF, $file) or die "Unable to open $file: $!\n\n"; while (my $line = ) { - # Cleanup + # Cleanup next if ($line =~ /^\s*#/); $line =~ s/^str //; chomp($line); - # Split off the var=val pairs + # Split off the var=val pairs my ($var, $val) = split(/\=/, $line, 2); next unless ($var && $var =~ /\w/); if ($var eq 'DBHostName') { @@ -275,7 +275,7 @@ sub PrepSQLRead{ elsif ($var eq 'DBPassword') { $db_pass = $val; } - # Hostname override + # Hostname override elsif ($var eq 'LocalHostName') { $hostname = $val; } @@ -287,24 +287,24 @@ sub PrepSQLRead{ } sub promptUser { - local($promptString,$defaultValue) = @_; - if ($defaultValue) { - print $promptString, "[", $defaultValue, "]: "; - } else { - print $promptString, ": "; - } + local($promptString,$defaultValue) = @_; + if ($defaultValue) { + print $promptString, "[", $defaultValue, "]: "; + } else { + print $promptString, ": "; + } - $| = 1; # force a flush after our print - $_ = ; # get the input from STDIN (presumably the keyboard) - chomp; - if ("$defaultValue") { - return $_ ? $_ : $defaultValue; # return $_ if it has a value - } else { - return $_; - } + $| = 1; # force a flush after our print + $_ = ; # get the input from STDIN (presumably the keyboard) + chomp; + if ("$defaultValue") { + return $_ ? $_ : $defaultValue; # return $_ if it has a value + } else { + return $_; + } } sub DoSetup { - print "\nNot ready yet. How do you send the cd command from perl?\n"; - return 0; + print "\nNot ready yet. How do you send the cd command from perl?\n"; + return 0; } diff --git a/abs/extra-testing/myth2ipod/PKGBUILD b/abs/extra-testing/myth2ipod/PKGBUILD index 8bc7811..9c62b22 100755 --- a/abs/extra-testing/myth2ipod/PKGBUILD +++ b/abs/extra-testing/myth2ipod/PKGBUILD @@ -1,6 +1,6 @@ pkgname=myth2ipod pkgver=0.2 -pkgrel=24 +pkgrel=25 arch=("i686") pkgdesc="A multimedia framework based on the MPEG-4 Systems standard" url="myth2ipod.com" diff --git a/abs/extra-testing/myth2ipod/myth2ipod b/abs/extra-testing/myth2ipod/myth2ipod index 84a3ac0..268a522 100755 --- a/abs/extra-testing/myth2ipod/myth2ipod +++ b/abs/extra-testing/myth2ipod/myth2ipod @@ -6,174 +6,174 @@ # modified to use nuvexport by starv at juniks dot org # Includes - use DBI; - use Getopt::Long; - use File::Path; - +use DBI; +use Getopt::Long; +use File::Path; + # User variables - my $portable = "ipod"; - my $feedfile = "/myth/ipodfeed/feed.php"; - my $feedpath = "/myth/ipodfeed/"; - my $wwwloc = "/data/srv/httpd/htdocs"; - my $feedurl = "http://REPLACEME/ipodfeed/"; - my $nuvoptions ="--mode=iPod --nice=19 --cutlist --nodenoise --nodeinterlace --nomultipass"; - +my $portable = "ipod"; +my $feedfile = "/myth/ipodfeed/feed.php"; +my $feedpath = "/myth/ipodfeed/"; +my $wwwloc = "/data/srv/httpd/htdocs"; +my $feedurl = "http://REPLACEME/ipodfeed/"; +my $nuvoptions ="--mode=iPod --nice=19 --cutlist --nodenoise --nodeinterlace --nomultipass"; + # Some variables - our ($dest, $format, $usage); - our ($db_host, $db_user, $db_name, $db_pass, $video_dir); - our ($hostname, $db_handle, $sql, $statement, $row_ref); - our ($chanid, $start, $nuvfile, @nuvarray); - my $rebuild = '0'; - my $encode = '0'; - my $debug = '0'; - my $setup = '0'; - my $cut = '0'; - my( $rightnow ) = `date`; +our ($dest, $format, $usage); +our ($db_host, $db_user, $db_name, $db_pass, $video_dir); +our ($hostname, $db_handle, $sql, $statement, $row_ref); +our ($chanid, $start, $nuvfile, @nuvarray); +my $rebuild = '0'; +my $encode = '0'; +my $debug = '0'; +my $setup = '0'; +my $cut = '0'; +my( $rightnow ) = `date`; GetOptions ("rebuild" => \$rebuild, - "encode" => \$encode, - "debug" => \$debug, - "setup" => \$setup, - "cut" => \$cut); + "encode" => \$encode, + "debug" => \$debug, + "setup" => \$setup, + "cut" => \$cut); if ($setup == 1){ - system("clear"); - print "Setup will do everything needed to run this script.\n"; - print "This has only been tested on KnoppMyth R5A22.\n"; - print "make sure you have edited the variables for your conguration.\n"; - my $cksetup = &promptUser("\nAre you sure you want to procceed?","n"); - if ($cksetup =~ "y") { - DoSetup(); - exit; - } - print "Setup exited. Nothing done.\n"; - exit; + system("clear"); + print "Setup will do everything needed to run this script.\n"; + print "This has only been tested on KnoppMyth R5A22.\n"; + print "make sure you have edited the variables for your conguration.\n"; + my $cksetup = &promptUser("\nAre you sure you want to procceed?","n"); + if ($cksetup =~ "y") { + DoSetup(); + exit; + } + print "Setup exited. Nothing done.\n"; + exit; } elsif ($rebuild == 1){ - GenerateRSSFeed(); - print "Rebuilding of RSS feed is complete.\n"; - exit; + GenerateRSSFeed(); + print "Rebuilding of RSS feed is complete.\n"; + exit; } else { - Encode4Portable(); - print "$title is ready for your $portable\n"; - - # Check to see if the feed file exists; if not, create it. - if (! -e $feedfile) { - print "No feed file found. I will make one for you.\n"; - GenerateRSSFeed(); - print "All done.\n"; - } + Encode4Portable(); + print "$title is ready for your $portable\n"; + + # Check to see if the feed file exists; if not, create it. + if (! -e $feedfile) { + print "No feed file found. I will make one for you.\n"; + GenerateRSSFeed(); + print "All done.\n"; + } } sub Encode4Portable{ - if ($#ARGV != 1) { - print "Encoding requires options.\nusage: myth2ipod DIRECTORY FILE\n"; - exit; - } - - # Get the show information - $directory = $ARGV[0]; - $file = $ARGV[1]; - @file = split(/_/, $file); - $chanid = $file[0]; - $start = substr $file[1],0,14; - if($debug == 1){ print "$chanid\n$start\n"}; - if (! -e $directory."/".$file){ - print "Opps, the file ".$directory.$file." does not exist.\n"; - exit; - } - - # Connect to the database - PrepSQLRead(); - $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass) + if ($#ARGV != 1) { + print "Encoding requires options.\nusage: myth2ipod DIRECTORY FILE\n"; + exit; + } + + # Get the show information + $directory = $ARGV[0]; + $file = $ARGV[1]; + @file = split(/_/, $file); + $chanid = $file[0]; + $start = substr $file[1],0,14; + if($debug == 1){ print "$chanid\n$start\n"}; + if (! -e $directory."/".$file){ + print "Oops, the file ".$directory.$file." does not exist.\n"; + exit; + } + + # Connect to the database + PrepSQLRead(); + $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass) or die "Cannot connect to database: $!\n\n"; - $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start"; + $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start"; - $statement = $db_handle->prepare($sql) - or die "Couldn't prepare query '$sql': $DBI::errstr\n"; - - $statement->execute() - or die "Couldn't execute query '$sql': $DBI::errstr\n"; - $row_ref = $statement->fetchrow_hashref(); - if($debug == 1){ print "$row_ref->{starttime}\n"}; - $title = $row_ref->{title}; - $subtitle = $row_ref->{subtitle}; - $recorddate = $row_ref->{starttime}; - $description = $row_ref->{description}; - $category = $row_ref->{category}; - $filename = $title."-".$subtitle."-".substr $start, 0, 8; - $filename =~ s/ /_/g; - $filename =~ s/&/+/g; - $filename =~ s/\047//g; + $statement = $db_handle->prepare($sql) + or die "Couldn't prepare query '$sql': $DBI::errstr\n"; + + $statement->execute() + or die "Couldn't execute query '$sql': $DBI::errstr\n"; + $row_ref = $statement->fetchrow_hashref(); + if($debug == 1){ print "$row_ref->{starttime}\n"}; + $title = $row_ref->{title}; + $subtitle = $row_ref->{subtitle}; + $recorddate = $row_ref->{starttime}; + $description = $row_ref->{description}; + $category = $row_ref->{category}; + $filename = $title."-".$subtitle."-".substr $start, 0, 8; + $filename =~ s/ /_/g; + $filename =~ s/&/+/g; + $filename =~ s/\047//g; $filename =~ s/[^+0-9a-zA-Z_-]+/_/g; $filename =~ s/_$//g; - - printf("Starting nuvexport...\n"); - EncodeIt(); - printf("Nuvexport completed, starting xml generation...\n"); - CreateItemXML(); - printf("XML file created for \"$filename\" : Yipeee\n"); - printf("Cleaning up temporary files\n"); - $cmd = "rm -f $feedpath$chanid\_$start.temp.mp4"; - print $cmd."\n"; - if(system($cmd)) { print "Removing nuvexport temp file failed\n"; } - - # remove the cutlist incase we added it. - if ($cut == 1){ - printf("Generating cutlist\n"); - $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --clearcutlist"; - print $cmd."\n"; - if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; } - } - return 0; + + printf("Starting nuvexport...\n"); + EncodeIt(); + printf("Nuvexport completed, starting xml generation...\n"); + CreateItemXML(); + printf("XML file created for \"$filename\" : Yipeee\n"); + printf("Cleaning up temporary files\n"); + $cmd = "rm -f $feedpath$chanid\_$start.temp.mp4"; + print $cmd."\n"; + if(system($cmd)) { print "Removing nuvexport temp file failed\n"; } + + # remove the cutlist incase we added it. + if ($cut == 1){ + printf("Generating cutlist\n"); + $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --clearcutlist"; + print $cmd."\n"; + if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; } + } + return 0; } # # Encode for Portable # sub EncodeIt { - # Create cutlist from commercial flagging if -cut was passed to the script - if ($cut == 1){ + # Create cutlist from commercial flagging if -cut was passed to the script + if ($cut == 1){ printf("Generating cutlist\n"); $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --gencutlist"; print $cmd."\n"; if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; } - } - - # Use nuvexport to do the work - $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start $nuvoptions --filename=$chanid\_$start.temp --path=$feedpath"; - print $cmd."\n"; - if(system($cmd)) { print "Nuvexport encoding seems to have failed\n"; } - - # Now clean up the output so iPods with firmware 1.1 and above can use it - $cmd = "/usr/bin/MP4Box -add $feedpath$chanid\_$start.temp.mp4 $feedpath$chanid\_$start.$portable.mp4"; - print $cmd."\n"; - if(system($cmd)) { print "MP4Box cleanup seems to have failed\n"; } - return 0; + } + + # Use nuvexport to do the work + $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start $nuvoptions --filename=$chanid\_$start.temp --path=$feedpath"; + print $cmd."\n"; + if(system($cmd)) { print "Nuvexport encoding seems to have failed\n"; } + + # Now clean up the output so iPods with firmware 1.1 and above can use it + $cmd = "/usr/bin/MP4Box -add $feedpath$chanid\_$start.temp.mp4 $feedpath$chanid\_$start.$portable.mp4"; + print $cmd."\n"; + if(system($cmd)) { print "MP4Box cleanup seems to have failed\n"; } + return 0; } # # Create XML with tag for this video file # sub CreateItemXML { - open(ITEM, ">$feedpath$chanid\_$start.$portable.xml"); - print ITEM "\n"; - print ITEM "".&encodeForXML($title." - ".$subtitle)."\n"; - print ITEM "MythTV\n"; - print ITEM "MythTV\n"; - print ITEM "\n"; - print ITEM "".&encodeForXML($file)."\n"; - print ITEM "".&encodeForXML($description)."\n"; - print ITEM "".$recorddate."\n"; - print ITEM "\n"; - print ITEM "\n"; - print ITEM "".&encodeForXML($title." - ".$subtitle." - ".$category)."\n"; - print ITEM "".&encodeForXML($category)."\n"; - print ITEM "\n"; - print "\"$filename\" has been added to the feed.\n"; - close(ITEM); - return 0; + open(ITEM, ">$feedpath$chanid\_$start.$portable.xml"); + print ITEM "\n"; + print ITEM "".&encodeForXML($title." - ".$subtitle)."\n"; + print ITEM "MythTV\n"; + print ITEM "MythTV\n"; + print ITEM "\n"; + print ITEM "".&encodeForXML($file)."\n"; + print ITEM "".&encodeForXML($description)."\n"; + print ITEM "".$recorddate."\n"; + print ITEM "\n"; + print ITEM "\n"; + print ITEM "".&encodeForXML($title." - ".$subtitle." - ".$category)."\n"; + print ITEM "".&encodeForXML($category)."\n"; + print ITEM "\n"; + print "\"$filename\" has been added to the feed.\n"; + close(ITEM); + return 0; } # @@ -181,55 +181,55 @@ sub CreateItemXML { # sub GenerateRSSFeed { - open(RSS, ">$feedfile"); - print RSS "\"; ?>\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "MythTV - <? if (\$_GET['title'] == \"\") { \$title = \"*\"; echo \"Recorded Programs\"; }\n"; - print RSS "else { \$title = \$_GET['title']; echo str_replace(\"_\",\" \",\$_GET['title']); } ?> \n"; - print RSS "MythTV - myth2ipod\n"; - print RSS "".&encodeForXML($feedurl)."\n"; - print RSS "Transcoded recording for your iPod Video.\n"; - print RSS "Myth TV Recorded Programs for the iPod v.1\n"; - print RSS "Myth TV Recorded Programs for the iPod v.1\n"; - print RSS "\n"; - print RSS "MythTV\n"; - print RSS "mythtv\@localhost\n"; - print RSS "\n"; - print RSS "No\n"; - print RSS "en-us\n"; - print RSS "Copyright 2005.\n"; - print RSS "mythtv\@localhost\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "TV Shows\n"; - print RSS ""; - print RSS ""; - print RSS "http://myth2ipod.com/mythipod_200.jpg\n"; - print RSS "MythTV 2 iPod\n"; - print RSS "".&encodeForXML($feedurl)."\n"; - print RSS "200\n"; - print RSS "200\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "\n"; - print RSS "\n"; - close(RSS); - if($debug == 1){ print "I created a feed file, was I supposed to?\n"}; + open(RSS, ">$feedfile"); + print RSS "\"; ?>\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "MythTV - <? if (\$_GET['title'] == \"\") { \$title = \"*\"; echo \"Recorded Programs\"; }\n"; + print RSS "else { \$title = \$_GET['title']; echo str_replace(\"_\",\" \",\$_GET['title']); } ?> \n"; + print RSS "MythTV - myth2ipod\n"; + print RSS "".&encodeForXML($feedurl)."\n"; + print RSS "Transcoded recording for your iPod Video.\n"; + print RSS "Myth TV Recorded Programs for the iPod v.1\n"; + print RSS "Myth TV Recorded Programs for the iPod v.1\n"; + print RSS "\n"; + print RSS "MythTV\n"; + print RSS "mythtv\@localhost\n"; + print RSS "\n"; + print RSS "No\n"; + print RSS "en-us\n"; + print RSS "Copyright 2005.\n"; + print RSS "mythtv\@localhost\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "TV Shows\n"; + print RSS ""; + print RSS ""; + print RSS "http://myth2ipod.com/mythipod_200.jpg\n"; + print RSS "MythTV 2 iPod\n"; + print RSS "".&encodeForXML($feedurl)."\n"; + print RSS "200\n"; + print RSS "200\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "\n"; + print RSS "\n"; + close(RSS); + if($debug == 1){ print "I created a feed file, was I supposed to?\n"}; - return 0; + return 0; } # substitute for XML entities sub encodeForXML { - local $result; - $result = $_[0]; - $result =~ s/&/&/g; - $result =~ s//>/g; - $result; + local $result; + $result = $_[0]; + $result =~ s/&/&/g; + $result =~ s//>/g; + $result; } @@ -250,17 +250,17 @@ sub PrepSQLRead{ '/usr/local/etc/mythtv/mysql.txt', "$ENV{HOME}/.mythtv/mysql.txt", 'mysql.txt' - ); + ); foreach my $file (@mysql) { next unless (-e $file); $found = 1; open(CONF, $file) or die "Unable to open $file: $!\n\n"; while (my $line = ) { - # Cleanup + # Cleanup next if ($line =~ /^\s*#/); $line =~ s/^str //; chomp($line); - # Split off the var=val pairs + # Split off the var=val pairs my ($var, $val) = split(/\=/, $line, 2); next unless ($var && $var =~ /\w/); if ($var eq 'DBHostName') { @@ -275,7 +275,7 @@ sub PrepSQLRead{ elsif ($var eq 'DBPassword') { $db_pass = $val; } - # Hostname override + # Hostname override elsif ($var eq 'LocalHostName') { $hostname = $val; } @@ -287,24 +287,24 @@ sub PrepSQLRead{ } sub promptUser { - local($promptString,$defaultValue) = @_; - if ($defaultValue) { - print $promptString, "[", $defaultValue, "]: "; - } else { - print $promptString, ": "; - } + local($promptString,$defaultValue) = @_; + if ($defaultValue) { + print $promptString, "[", $defaultValue, "]: "; + } else { + print $promptString, ": "; + } - $| = 1; # force a flush after our print - $_ = ; # get the input from STDIN (presumably the keyboard) - chomp; - if ("$defaultValue") { - return $_ ? $_ : $defaultValue; # return $_ if it has a value - } else { - return $_; - } + $| = 1; # force a flush after our print + $_ = ; # get the input from STDIN (presumably the keyboard) + chomp; + if ("$defaultValue") { + return $_ ? $_ : $defaultValue; # return $_ if it has a value + } else { + return $_; + } } sub DoSetup { - print "\nNot ready yet. How do you send the cd command from perl?\n"; - return 0; + print "\nNot ready yet. How do you send the cd command from perl?\n"; + return 0; } -- cgit v0.12 From 04641b54e2aaab6f0cff7145af0be518bfee49cd Mon Sep 17 00:00:00 2001 From: Bob Igo Date: Fri, 7 Aug 2009 16:33:31 -0400 Subject: Fixed twk_general.pl to work with myth2ipod and myt2xvid3 commands. --- abs/core-testing/tweaker/PKGBUILD | 2 +- abs/core-testing/tweaker/bin/twk_general.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/abs/core-testing/tweaker/PKGBUILD b/abs/core-testing/tweaker/PKGBUILD index 443d71a..3259e81 100644 --- a/abs/core-testing/tweaker/PKGBUILD +++ b/abs/core-testing/tweaker/PKGBUILD @@ -1,6 +1,6 @@ pkgname=tweaker pkgver=1 -pkgrel=53 +pkgrel=54 pkgdesc="applies tweaks to the baseline configuration and attempts to optimize settings for the hardware it finds" arch=('i686' 'x86_64') diff --git a/abs/core-testing/tweaker/bin/twk_general.pl b/abs/core-testing/tweaker/bin/twk_general.pl index 4a18f1e..7b0f1c7 100755 --- a/abs/core-testing/tweaker/bin/twk_general.pl +++ b/abs/core-testing/tweaker/bin/twk_general.pl @@ -407,8 +407,8 @@ sub implement_option { change_or_make_setting('StartupSecsBeforeRecording', '120'); change_or_make_setting('TruncateDeletesSlowly', '1'); change_or_make_setting('UseOutputPictureControls', '1'); - change_or_make_setting('UserJob1', 'myth2ipod \"%DIR%/%FILE%\" \"%TITLE% - %SUBTITLE%\" \"%CHANID%\" \"%STARTTIME%\" \"%JOBID%\"'); - change_or_make_setting('UserJob2', 'myt2xvid3 \"%DIR%/%FILE%\" \"%TITLE% - %SUBTITLE%\" \"%CHANID%\" \"%STARTTIME%\" \"%JOBID%\"'); + change_or_make_setting('UserJob1', 'myth2ipod \"%DIR%\" \"%FILE%\"'); + change_or_make_setting('UserJob2', 'myt2xvid3 \"%DIR%\" \"%FILE%\"'); change_or_make_setting('UserJob3', 'myth2x264 \"%DIR%/%FILE%\" \"%TITLE% - %SUBTITLE%\" \"%CHANID%\" \"%STARTTIME%\" \"%JOBID%\"'); change_or_make_setting('UserJob4', 'removecommercials \"%DIR%\" \"%FILE%\" \"%CHANID%\" \"%STARTTIME%\" \"%JOBID%\"'); change_or_make_setting('UserJobDesc1', 'Transcode for iPod'); -- cgit v0.12