diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
commit | 7b29169fff9e7c624890c5edffe85def8a293136 (patch) | |
tree | 47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra/mythappletrailers | |
parent | c491dea779dac29afff3578bf8245943817c2339 (diff) | |
download | linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2 |
LinHES 6.01.00
Diffstat (limited to 'abs/extra/mythappletrailers')
-rw-r--r-- | abs/extra/mythappletrailers/PKGBUILD | 30 | ||||
-rw-r--r-- | abs/extra/mythappletrailers/appletrailer.xml | 722 | ||||
-rw-r--r-- | abs/extra/mythappletrailers/fix_aple_url.sh | 3 | ||||
-rwxr-xr-x | abs/extra/mythappletrailers/loading.sh | 2 | ||||
-rwxr-xr-x | abs/extra/mythappletrailers/myth_trailers_grabber | 214 | ||||
-rw-r--r-- | abs/extra/mythappletrailers/mythappletrailers.install | 37 | ||||
-rwxr-xr-x | abs/extra/mythappletrailers/trailers | 2 |
7 files changed, 1010 insertions, 0 deletions
diff --git a/abs/extra/mythappletrailers/PKGBUILD b/abs/extra/mythappletrailers/PKGBUILD new file mode 100644 index 0000000..9c12971 --- /dev/null +++ b/abs/extra/mythappletrailers/PKGBUILD @@ -0,0 +1,30 @@ +# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $ +# Maintainer: Cecil Watson<knoppmyth@gmail.com> + +pkgname=mythappletrailers +pkgver=0.04.3 +pkgrel=35 +pkgdesc="Unofficial Add-on for MythTV to get Apple.com Movie Trailers." +arch=('i686' 'x86_64') +license=('GPL2') +url="http://www.mythtv.org/wiki/index.php/Myth_Apple_Trailers" +depends=('php' 'mythtv' 'mplayer-wrapper') +install=mythappletrailers.install +source=('myth_trailers_grabber' 'appletrailer.xml' +'trailers' 'loading.sh' 'fix_aple_url.sh') + +build() { + mkdir -p $startdir/pkg/usr/bin + mkdir -p $startdir/pkg/etc/cron.daily + mkdir -p $startdir/pkg/home/mythtv/ + mkdir -p $startdir/pkg/usr/share/mythtv/ + cp appletrailer.xml $startdir/pkg/home/mythtv/appletrailer.xml + chown 1000:1000 $startdir/pkg/home/mythtv/appletrailer.xml + chmod 755 trailers + chmod 755 myth_trailers_grabber + chmod 755 loading.sh + cp myth_trailers_grabber $startdir/pkg/usr/bin/ + cp loading.sh $startdir/pkg/usr/bin/ + cp trailers $startdir/pkg/etc/cron.daily/ + install -m755 $srcdir/fix_aple_url.sh $pkgdir/usr/bin +} diff --git a/abs/extra/mythappletrailers/appletrailer.xml b/abs/extra/mythappletrailers/appletrailer.xml new file mode 100644 index 0000000..dc0c938 --- /dev/null +++ b/abs/extra/mythappletrailers/appletrailer.xml @@ -0,0 +1,722 @@ +<mythmenu name="TRAILERS"> + <button> + <type>VIDEO_BROWSER</type> + <text>2012</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/2012/2012-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>500 Days of Summer</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/500daysofsummer/500daysofsummer-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>9</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/focus_features/9/9-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Adam</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/adam/adam-tlra_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Alice In Wonderland</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/aliceinwonderland/aliceinwonderland-tsr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Aliens In the Attic</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/aliensintheattic/aliensintheattic-tlrg_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>All About Steve</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/allaboutsteve/allaboutsteve-tlrc_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Alvin and the Chipmunks: the Squeakquel</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/alvinandthechipmunks2/alvinsqueekquel-tlrd_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Amelia</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/amelia/amelia-tlra_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Amreeka</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/amreeka/amreeka_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Answer Man</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/theanswerman/theanswerman_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Armored</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/armored/armored-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Astro Boy</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/astroboy/astroboy-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Avatar</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/avatar/avatar2009aug0820a-tsr_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Bandslam</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/bandslam/bandslam-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Beyond a Reasonable Doubt</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/beyondareasonabledoubt/beyondareasonabledoubt_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Big Fan</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/bigfan/bigfan_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Blind Side</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/theblindside/theblindside-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Blue Tooth Virgin</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/thebluetoothvirgin/thebluetoothvirgin_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Book of Eli</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/thebookofeli/thebookofeli-tlr1a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Box</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/thebox/thebox-tlr1a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Bright Star</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/brightstar/brightstar_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Brothers</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/brothers/brothers-tlr1a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Burning Plain</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/theburningplain/theburningplain_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Capitalism: a Love Story</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/capitalismalovestory/capitalismalovestory-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Carriers</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount_vantage/carriers/carriers-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Casi Divas</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/casidivas/casidivas_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Cloudy With a Chance of Meatballs</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/cloudywithachanceofmeatballs/cloudywithachance-tlr3_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Coco Before Chanel</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/cocobeforechanel/cocobeforechanel_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Cold Souls</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/samuel_goldwyn/coldsouls/coldsouls_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Collector</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/thecollector/thecollector_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Couples Retreat</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/couplesretreat/couplesretreat-tlr_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Cove</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/thecove/thecove_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Damned United</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/thedamnedunited/thedamnedunited_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Daybreakers</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/daybreakers/daybreakers-tlr1c_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Despicable Me</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/despicableme/despicableme-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>District 9</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/district9/district9-tlr4_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>An Education</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/aneducation/aneducation_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Extract</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/miramax/extract/extract-inttlr_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Fame</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/mgm/fame/fame-tlr2r_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Fantastic Mr. Fox</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/fantasticmrfox/fantasticmrfox-tlra_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Final Destination</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/newline/thefinaldestination/thefinaldestination-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Five Minutes of Heaven</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/fiveminutesofheaven/fiveminutesofheaven_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Funny People</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/funnypeople/funnypeople-tlr1r_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>G-Force</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/gforce/gforce-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>G.I. Joe: Rise of Cobra</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/gijoe/gijoetheriseofcobra-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Gamer</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/gamer/gamer-tlr2a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Gentlemen Broncos</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/gentlemenbroncos/gentlemenbroncos_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Grace</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/grace/grace_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Halloween 2</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/halloween2/halloweenii-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Hangover</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/thehangover/thehangover-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Hurt Locker</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/thehurtlocker/thehurtlocker_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>I Can Do Bad All by Myself</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/icandobadallbymyself/icandobadallbymyself-tlr2a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>I Sell the Dead</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/isellthedead/isellthedead_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Ice Age: Dawn of the Dinosaurs</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/ice_age_iii/iceage3-tlrn_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>In the Loop</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/intheloop/intheloop_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Informant!</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/theinformant/theinformant-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Inglourious Basterds</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/inglouriousbasterds/inglouriousbasterds-tlr4_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Invention of Lying</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/theinventionoflying/theinventionoflying-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>It Might Get Loud</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/itmightgetloud/itmightgetloud_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>It’s Complicated</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/itscomplicated/itscomplicated_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Jennifer’s Body</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/jennifersbody/jennifersbody-tlrc_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Julie Julia</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/julieandjulia/julieandjulia-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Last Airbender</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/thelastairbender/thelastairbender-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Law Abiding Citizen</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/lawabidingcitizen/lawabidingcitizen_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Legion</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/legion/legion-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Live Music</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/livemusic/livemusic_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Lorna’s Silence</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/lornassilence/lornassilence_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Love Happens</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/lovehappens/lovehappens-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Lovely Bones</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/thelovelybones/thelovelybones_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Men Who Stare At Goats</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/overture/themenwhostareatgoats/themenwhostareatgoats_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>More Than a Game</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/morethanagame/morethanagame-tlr1a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>My One and Only</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/myoneandonly/myoneandonly_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>New York, I Love You</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/newyorkiloveyou/newyorkiloveyou_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Night At the Museum: Battle of the Smithsonian</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/nightatthemuseum2/nightatthemuseum2-tlro_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Nine</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/nine/nine-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Ninja Assassin</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/ninjaassassin/ninjaassassin-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Oceans</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/oceans/oceans-tsr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Old Dogs</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/olddogs/olddogs_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Ong Bak 2</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/ongbak2/ongbak2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Orphan</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/orphan/orphan-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Other Man</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/theotherman/theotherman_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Pandorum</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/pandorum/pandorum-tl1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Paper Heart</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/paperheart/paperheart_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Paris</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/paris/paris_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>A Perfect Getaway</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/aperfectgetaway/aperfectgetaway_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Planet 51</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/planet51/planet51-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Play the Game</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/playthegame/playthegame_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Ponyo</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/ponyo/ponyo_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Post Grad</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/postgrad/postgrad-tlra_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Precious</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/precious/precious-tlr2a_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Princess and the Frog</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/princessandthefrog/princessandthefrog-tsr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Proposal</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/touchstone/theproposal/theproposal-tlr3_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Road</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/theroad/theroad_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Saw VI</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/saw6/sawvi_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The September Issue</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/theseptemberissue/theseptemberissue_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Sherlock Holmes</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/sherlockholmes/sherlockholmes-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Shorts</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/shorts/shorts-tlr3_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Shrink</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/shrink/shrink-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Shutter Island</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/shutterisland/shutterisland-tlr1r2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Sorority Row</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/sororityrow/sororityrow-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Spread</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/spread/spread_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>St. Trinian’s</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/sttrinians/sttrinians_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Stepfather</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/thestepfather/thestepfather_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Surrogates</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/touchstone/surrogates/surrogates-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Surviving Crooked Lake</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/survivingcrookedlake/survivingcrookedlake_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Taking Woodstock</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/focus_features/takingwoodstock/takingwoodstock-tlr_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Time Traveler’s Wife</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/newline/timetravelerswife/timetravelerswife-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Toy Story 3</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/toystory3/toystory3-tsr_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Transformers: Revenge of the Fallen</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/transformers2/transformersrevengeofthefallen-tlr2r_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Twilight Saga: New Moon</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/newmoon/newmoon-tsr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>The Ugly Truth</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/theuglytruth/theuglytruth-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Walt El Grupo</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/waltandelgrupo/waltandelgrupo_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Where the Wild Things Are</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/wherethewildthingsare/wtwta-tlr2_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Whip It</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/whipit/whipit_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>White On Rice</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/whiteonrice/whiteonrice_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Whiteout</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/whiteout/whiteout-tlr1_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>World’s Greatest Dad</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/worldsgreatestdad/worldsgreatestdad_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>X Games 3D: the Movie</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/xgames3d/xgames3d_h640w.mov</action> + </button> + + <button> + <type>VIDEO_BROWSER</type> + <text>Zombieland</text> + <action>EXEC loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/zombieland/zombieland-tlr1_h640w.mov</action> + </button> + +</mythmenu> diff --git a/abs/extra/mythappletrailers/fix_aple_url.sh b/abs/extra/mythappletrailers/fix_aple_url.sh new file mode 100644 index 0000000..a08be65 --- /dev/null +++ b/abs/extra/mythappletrailers/fix_aple_url.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cat /home/mythtv/appletrailer.xml | sed -e 's|http:/\/\movies.apple|http:\/\/apple|g' > /tmp/appletrailer.xml +mv /tmp/appletrailer.xml /home/mythtv diff --git a/abs/extra/mythappletrailers/loading.sh b/abs/extra/mythappletrailers/loading.sh new file mode 100755 index 0000000..d1ef680 --- /dev/null +++ b/abs/extra/mythappletrailers/loading.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo -e "Loading . . . " | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 10 -A centre diff --git a/abs/extra/mythappletrailers/myth_trailers_grabber b/abs/extra/mythappletrailers/myth_trailers_grabber new file mode 100755 index 0000000..ae32e75 --- /dev/null +++ b/abs/extra/mythappletrailers/myth_trailers_grabber @@ -0,0 +1,214 @@ +<?php +/** + * Copyright (C) 2007 Ben Leto <undertoe@chemlab.org> + * + * Description: Apple Trailer Grabber for mythtv + * + * Version 0.4.3 + * + * Apple Trailer Grabber is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Apple Trailer Grabber is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Usage: read the INSTALL file + * Setup as a cron script to run as frequently as you want + * + * + */ + +/************************************************************************/ +// CONFIGURATION + +// command to use when streaming content from the internet - cache 50% before displaying and use 32MB of memory +$STREAMING_EXEC_CMD = 'loading.sh && mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000'; +$APPLE_FEED = 'http://www.apple.com/trailers/home/xml/current.xml'; +/************************************************************************/ +// Shouldn't Need To modify anything beyond here + + +define("PLAYERCMD", $STREAMING_EXEC_CMD); +define("XMLFEED", $APPLE_FEED); + +/************************************************************************/ + +init_main(); + +// Function: returns null | init_main () +// Description: Outputs Apple Trailer XML feed to watchable movie urls in MythTV menu XML format +function init_main() +{ + + print "<mythmenu name=\"TRAILERS\">\n"; + + if(valid_url(XMLFEED)){ + + // Gather Array of Current Movie Trailers + //XML Data + $xml_data = url_to_string(XMLFEED); + //Creating Instance of the Class + $xmlObj = new XmlToArray($xml_data); + $arrayData = $xmlObj->createArray(); + + foreach($arrayData['records']['movieinfo'] as $Row){ + + $MovieTitle = $Row['info'][0]['title']; + $MovieLink = $Row['preview'][0]['large']; + $VideoPlayCMD = PLAYERCMD . ' ' . $MovieLink; + + if(!valid_url($MovieLink)){ + $MovieTitle = $MovieTitle . '*VIDEO ERROR*'; + $VideoPlayCMD = ''; + } + + print "\t<button>\n"; + print "\t\t<type>VIDEO_BROWSER</type>\n"; + $MovieTitle = preg_replace('/ & /', ' & ', $MovieTitle); + print "\t\t<text>$MovieTitle</text>\n"; + print "\t\t<action>EXEC $VideoPlayCMD</action>\n"; + print "\t</button>\n\n"; + + } + }else{ + print "\t<button>\n"; + print "\t\t<type>VIDEO_BROWSER</type>\n"; + print "\t\t<text>Error Grabbing XML Feed</text>\n"; + print "\t\t<action></action>\n"; + print "\t</button>\n\n"; + } + + print "</mythmenu>\n"; + + + +} + + +// Function: returns boolean | valid_url ( var | url to check) +// Description: Checks to see if a url is a valid page +function valid_url($str) +{ + if(@fopen($str, "r")) { + return true; + } else { + return false; + } +} + +// Function: returns string | all elements of XML ( var | url to feed) +// Description: Converts each element in an XML feed to single line string +// Notes: must have 'allow_url_fopen = On' in php.ini +function url_to_string($url){ + $lines = file($url); + foreach ($lines as $line) { + $lineR = trim($line); + } + $lineR = eregi_replace("<" . "large" . "[^>]*>", "<large>", $lineR); //hack for apple goofy xml + return $lineR; +} + +// Class: returns (~) x array | elements of XML ( var | XML in string) +// Description: Converts each element in an XML feed to an Array +class XmlToArray +{ + + var $xml=''; + + /** + * Default Constructor + * @param $xml = xml data + * @return none + */ + + function XmlToArray($xml) + { + $this->xml = $xml; + } + + /** + * _struct_to_array($values, &$i) + * + * This is adds the contents of the return xml into the array for easier processing. + * Recursive, Static + * + * @access private + * @param array $values this is the xml data in an array + * @param int $i this is the current location in the array + * @return Array + */ + + function _struct_to_array($values, &$i) + { + $child = array(); + if (isset($values[$i]['value'])) array_push($child, $values[$i]['value']); + + while ($i++ < count($values)) { + switch ($values[$i]['type']) { + case 'cdata': + array_push($child, $values[$i]['value']); + break; + + case 'complete': + $name = $values[$i]['tag']; + if(!empty($name)){ + $child[$name]= ($values[$i]['value'])?($values[$i]['value']):''; + if(isset($values[$i]['attributes'])) { + $child[$name] = $values[$i]['attributes']; + } + } + break; + + case 'open': + $name = $values[$i]['tag']; + $size = isset($child[$name]) ? sizeof($child[$name]) : 0; + $child[$name][$size] = $this->_struct_to_array($values, $i); + break; + + case 'close': + return $child; + break; + } + } + return $child; + }//_struct_to_array + + /** + * createArray($data) + * + * This is adds the contents of the return xml into the array for easier processing. + * + * @access public + * @param string $data this is the string of the xml data + * @return Array + */ + function createArray() + { + $xml = $this->xml; + $values = array(); + $index = array(); + $array = array(); + $parser = xml_parser_create(); + xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); + xml_parse_into_struct($parser, $xml, $values, $index); + xml_parser_free($parser); + $i = 0; + $name = $values[$i]['tag']; + $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : ''; + $array[$name] = $this->_struct_to_array($values, $i); + return $array; + } + + +} + +?> diff --git a/abs/extra/mythappletrailers/mythappletrailers.install b/abs/extra/mythappletrailers/mythappletrailers.install new file mode 100644 index 0000000..0f6d8fa --- /dev/null +++ b/abs/extra/mythappletrailers/mythappletrailers.install @@ -0,0 +1,37 @@ +# arg 1: the new package version +post_install() { + ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml + mv /usr/share/mythtv/is.xml /tmp + grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp + echo "<!--#MythAppleTrailers-->" >> /tmp/is.xml.tmp + echo " <button>" >> /tmp/is.xml.tmp + echo " <type>STREAM</type>" >> /tmp/is.xml.tmp + echo " <text>Apple Trailers</text>" >> /tmp/is.xml.tmp + echo " <action>MENU appletrailer.xml</action>" >> /tmp/is.xml.tmp + echo " </button>" >> /tmp/is.xml.tmp + echo "<!--#MythAppleTrailers-->" >> /tmp/is.xml.tmp + echo "" >> /tmp/is.xml.tmp + echo "</mythmenu>" >> /tmp/is.xml.tmp + mv /tmp/is.xml.tmp /usr/share/mythtv/is.xml +} +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + if [ -e /usr/share/mythtv/appletrailer.xml ] + then + exit + else + ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml + fi +} + +# arg 1: the old package version +post_remove() { + rm -fr /usr/share/mythtv/appletrailer.xml + mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp + sed -e '/\#MythAp/,/\#MythAp/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml +} + +op=$1 +shift +$op $* diff --git a/abs/extra/mythappletrailers/trailers b/abs/extra/mythappletrailers/trailers new file mode 100755 index 0000000..241a60a --- /dev/null +++ b/abs/extra/mythappletrailers/trailers @@ -0,0 +1,2 @@ +#!/bin/sh +su mythtv -c '/usr/bin/php -q /usr/bin/myth_trailers_grabber > /home/mythtv/appletrailer.xml && /usr/bin/fix_aple_url.sh' 2>/dev/null |