Opened 15 years ago
Closed 14 years ago
#5954 closed enhancement (wontfix)
Proposed patch to allow dynamic menus
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | trivial | Milestone: | unknown |
Component: | MythTV - General | Version: | head |
Severity: | low | Keywords: | dynamic menus |
Cc: | Ticket locked: | no |
Description
I'd like to propose a simple piece of functionality that allows to generate dynamic menus. I'm using it successfully to dynamically build menus for an online streaming service.
The idea is simple: if the <action> tag inside the menu <button> defines a MENU, but the parameter starts with the '`' character (same as bash shell command substitution), rather than treating this as a path to another menu file, we execute the external process, capture its standard output stream, and use the result to load the menu.
Example:
<button>
<type>TV_WATCH_TV</type> <text>9.90552641912621</text> <action>MENU `/home/mythtv/somemenuscript</action>
</button>
The script in /home/mythtv/somemenuscript is expected to generate output in mythtv menu format.
Attachments (5)
Change History (14)
Changed 15 years ago by
Attachment: | dynamic_menus.patch added |
---|
Changed 15 years ago by
Attachment: | dynamic_menus.2.patch added |
---|
Changed 15 years ago by
Attachment: | dynamic_menus_h.patch added |
---|
MENUEXEC part of the patch for the header file
comment:1 Changed 15 years ago by
The MENUEXEC version uses this syntax:
<action>MENUEXEC /path/to/script/file</action>
instead of the originally proposed MENU with '`' character.
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
I'd like to go on record now as saying this is a ugly hack and that the proper way to offer menus for an "online streaming service" would be to create a proper themable plugin.
Changed 15 years ago by
Attachment: | dynamic_menus-r19940.patch added |
---|
Tidyup, test script, against recent SVN
comment:4 Changed 15 years ago by
Tidier patch attached. Using it for a list of content is an ugly use, but having the ability to easily add a page of dynamic menus may be handy.
The challenge of writing a plugin - the semantic gap between MythUI C++ and a shell script - is huge. The ability to at least create buttons, if only for prototyping, is all many people need to start along the correct path?
comment:5 Changed 15 years ago by
Milestone: | 0.22 → unknown |
---|
comment:6 Changed 15 years ago by
Component: | mythtv → MythTV - General |
---|---|
Priority: | minor → trivial |
Severity: | medium → low |
comment:7 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please see http://www.mythtv.org/wiki/MythNetvision
for the supported implementation of this.
comment:8 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
The "supported implementation" does not do quite what this patch was intended to do (and still does). Specifically, it expects the script to return the XML containing "full" list of media URLs, even when tree structure is used. I think it's important do be able to generate branches and leafs of the tree structure as user makes choices, "drilling down" based on the selection made in higher tree levels.
Changed 14 years ago by
Attachment: | dynamic-menus-r24003.patch added |
---|
Current (Apr 2010) version of the patch
comment:9 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Patches against MythNetVision? would be preferred over sticking random playback stuff into the main menus. See http://svn.mythtv.org/trac/ticket/8300#comment:1
MENUEXEC version