summaryrefslogtreecommitdiffstats
path: root/abs/extra/mythappletrailers/gen_trailer_menu.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-23 19:14:54 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-23 19:14:54 (GMT)
commitc96cd6fab2342335a4f64b7eb2c843cd576eb610 (patch)
tree551793d94c47f1e4d88ed5309d5224435762bf1e /abs/extra/mythappletrailers/gen_trailer_menu.sh
parent048e83695f2b4cb9ddc118e128a7d08f7d48e651 (diff)
parentcafd1e5f46d61c3175d4a3347c65ae79c476c61a (diff)
downloadlinhes_pkgbuild-c96cd6fab2342335a4f64b7eb2c843cd576eb610.zip
linhes_pkgbuild-c96cd6fab2342335a4f64b7eb2c843cd576eb610.tar.gz
linhes_pkgbuild-c96cd6fab2342335a4f64b7eb2c843cd576eb610.tar.bz2
Merge remote-tracking branch 'origin/testing' into testing
# By Cecil (6) and Britney Fransen (2) # Via Britney Fransen (1) and Cecil (1) * origin/testing: LinHES-system: myth_status.py: fix conflicted recordings mythtv: bump to latest fixes to get python bindings fix pyxis:Initial inclusion. Needed for pyxis to close #63/4). python-distribute:Needed for python-beautifulsoup (to close #63/4). python-beautifulsoup4:Needed for pyxis (to close #63/4). python-libconcord:Moved to core with rest of python modules. gdb:Recompile against Python 2.6. Closes 850. mythappletrailers:Closes 849. Adds Play All, Shuffle and Play Random trailer to the menu. Conflicts were set to 64 bit versions, except for appletrailers Conflicts: abs/core/LinHES-system/PKGBUILD abs/core/gdb/PKGBUILD abs/core/gdb/__changelog abs/core/mythtv/stable-0.25/mythtv/PKGBUILD abs/core/python_modules/python-distribute/PKGBUILD abs/core/python_modules/python-distribute/__changelog abs/extra/mythappletrailers/PKGBUILD
Diffstat (limited to 'abs/extra/mythappletrailers/gen_trailer_menu.sh')
-rw-r--r--abs/extra/mythappletrailers/gen_trailer_menu.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/extra/mythappletrailers/gen_trailer_menu.sh b/abs/extra/mythappletrailers/gen_trailer_menu.sh
new file mode 100644
index 0000000..43b2fae
--- /dev/null
+++ b/abs/extra/mythappletrailers/gen_trailer_menu.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+cp /home/mythtv/appletrailer.xml /tmp
+sed -n -e 's/.*<action>\(.*\)<\/action>.*/\1/p' /tmp/appletrailer.xml > /tmp/a.log
+awk < /tmp/a.log '{ print $NF }' > /tmp/b.log
+sort -R /tmp/b.log > /tmp/c.log
+echo "<mythmenu name=\"TRAILERS\">" > /tmp/appletrailer.2.xml
+echo " <button>" >> /tmp/appletrailer.2.xml
+echo " <type>VIDEO_BROWSER</type>" >> /tmp/appletrailer.2.xml
+echo " <text>Play All Trailers</text>" >> /tmp/appletrailer.2.xml
+echo " <action>EXEC /usr/bin/play_trailer.sh /home/mythtv/all_trailers</action>" >> /tmp/appletrailer.2.xml
+echo " </button>" >> /tmp/appletrailer.2.xml
+echo "" >> /tmp/appletrailer.2.xml
+echo " <button>" >> /tmp/appletrailer.2.xml
+echo " <type>VIDEO_BROWSER</type>" >> /tmp/appletrailer.2.xml
+echo " <text>Shuffle Play Trailers</text>" >> /tmp/appletrailer.2.xml
+echo " <action>EXEC /usr/bin/play_trailer.sh /home/mythtv/shuffle_trailers</action>" >> /tmp/appletrailer.2.xml
+echo " </button>" >> /tmp/appletrailer.2.xml
+echo "" >> /tmp/appletrailer.2.xml
+echo " <button>" >> /tmp/appletrailer.2.xml
+echo " <type>VIDEO_BROWSER</type>" >> /tmp/appletrailer.2.xml
+echo " <text>Play Random Trailer</text>" >> /tmp/appletrailer.2.xml
+echo " <action>EXEC loading.sh &amp;&amp; mplayer -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 \$(sort -R /home/mythtv/all_trailers | tail -1)</action>" >> /tmp/appletrailer.2.xml
+echo " </button>" >> /tmp/appletrailer.2.xml
+echo "" >> /tmp/appletrailer.2.xml
+
+grep -v TRAILERS /tmp/appletrailer.xml >> /tmp/appletrailer.2.xml
+mv /tmp/b.log /home/mythtv/all_trailers
+mv /tmp/c.log /home/mythtv/shuffle_trailers
+mv /tmp/appletrailer.2.xml /home/mythtv/appletrailer.xml