[mythtv] mytharchive - mythburn.patch and a new theme

Sergei Golubchik sergii at pisem.net
Sat Jan 31 18:29:50 UTC 2009


Hi.

Attached is a patch for mythburn.py and a new theme 1-G.A.N.T.

The patch adds support fo a <chaptermenu> element in theme's menu.  As
expected, it creates a button which jumps to the chapter menu of the
corresponding recording.

To show how it could be used here's a new theme.

1-G.A.N.T. theme is a clone of G.A.N.T. which is tuned for the case when
there's only one recording on a DVD, giving it a more DVD-ish look:
details page is moved to be a main menu, it got two buttons at the very
bottom "Play All" which, despite the name, plays the current recording
("All", a on your regular movie DVD, meaning "all chapters"), and
"Select a Chapter" which uses <chaptermenu> feature from above.

It also has "Prev/Next" buttons and can be used when there're manu
recordings per DVD.

Regards
Sergei

P.S. Install a theme with something like

    cp -r G.A.N.T 1-G.A.N.T.
    cd 1-G.A.N.T.
    mv details_preview.png mainmenu_preview.png
    cp mainmenu_preview.png preview.png

and copy over two attached files.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-GANT.xml
Type: application/xml
Size: 9123 bytes
Desc: not available
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20090131/82e2d303/attachment.xml>
-------------- next part --------------
--- /root/mythburn.py	2009-01-31 13:53:00.061799422 +0100
+++ /usr/share/mythtv/mytharchive/scripts/mythburn.py	2009-01-31 16:58:13.910687154 +0100
@@ -3148,6 +3148,12 @@
                    button.appendChild(dvddom.createTextNode("{g5=1; jump menu %s;}" % autoplaymenu))
                    endbuttons.append(button)
 
+                elif node.nodeName=="chaptermenu":
+                   button=dvddom.createElement("button")
+                   button.setAttribute("name","chaptermenu")
+                   button.appendChild(dvddom.createTextNode("{jump titleset %s menu;}" % itemnum))
+                   endbuttons.append(button)
+
             #On to the next item
             itemnum+=1
 
@@ -3586,6 +3592,27 @@
 
             write("Added playall button")
 
+        elif node.nodeName=="chaptermenu":
+            #Overlay chapter menu graphic button onto background
+
+            # draw background if required
+            paintBackground(bgimage, node)
+
+            paintButton(draw, bgimage, bgimagemask, node, infoDOM, itemnum,
+                        page, itemsonthispage, chapternumber, chapterlist)
+
+            button = spumuxdom.createElement("button")
+            button.setAttribute("name","chaptermenu")
+            button.setAttribute("x0","%s" % getScaledAttribute(node, "x"))
+            button.setAttribute("y0","%s" % getScaledAttribute(node, "y"))
+            button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + 
+                                             getScaledAttribute(node, "w")))
+            button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") +
+                                             getScaledAttribute(node, "h")))
+            spunode.appendChild(button)
+
+            write("Added chaptermenu button")
+
         elif node.nodeName == "titlemenu":
             if itemnum < numberofitems:
                 #Overlay next graphic button onto background
-------------- next part --------------
Has an intro and contains a main menu with 1 recording per page and a scene selection submenu with 8 chapters points. Shows a program details in the main menu - works best when DVD contains only one recording.


More information about the mythtv-dev mailing list