[mythtv] Attention all OSD theme maintainers/authors concerning CVS modification.

Chris Pinkham cpinkham at bc2va.org
Tue Apr 22 22:37:11 EDT 2003

I have just committed a mod to cvs which will break the channel number
display on all OSD themes that are maintained outside of the Myth cvs tree.

This was done in to make the OSD textarea fields more flexible.  It is
only a 1-word change to bring the OSD field names in line with the database
field names.

In the "channel_number" container, the textarea for the channel number now
needs to be called "channum" instead of "channel_number".  The container
name stays the same.

The new code in cvs will make the OSD more flexible by supporting keywords
which are replaced at runtime by the corresponding piece of information.
An example is %DESCRIPTION% which gets replaced by the actual program

These keywords are used in new <value></value> tags in the osd.xml
<textarea> field definitions.  The <value> tag is going to replace the
older <statictext> tag which will be removed at some point, so please
convert your themes over to using <value> whenever you can.  Keywords
should be enclosed in percent signs so TITLE is actually %TITLE%.
An example of usage is:

        <textarea name="description">
            <value>%DESCRIPTION% (%STARTTIME%-%ENDTIME%)</value>

This would display something like this:

	Wheel Of Fortune (7:00 PM-7:30 PM)

depending on how the user's date/time formats were configured in setup.

The <value> tag will replace the <statictext> tag.  If a value tag does
not have any substitution keywords then it is copied directly.  All
<textarea> fields do not require <value> tags.  If a textarea field
called 'title' is left blank, then its value is assumed to be %TITLE%;
'subtitle' textarea field has assumed value of %SUBTITLE%, etc..  Keywords
must be in UPPERcase.

Here is a list of current keywords that can be used and what containers they
may be used in.  We have the ability to start adding more, but these are
enough to duplicate previous functionality and more.

	TITLE        - title
	SUBTITLE     - subtitle
	DESCRIPTION  - description
	CATEGORY     - category
	CALLSIGN     - station callsign
	STARTTIME    - start time in "TimeFormat" format
	STARTDATE    - start date in "ShortDateFormat" format
	ENDTIME      - end time in "TimeFormat" format
	ENDDATE      - end date in "ShortDateFormat" format
	CHANNUM      - channel number (channum field in channel table)
	LENTIME      - HH:MM length of program (ie, 1:30 is 1 hour, 30 minutes)
	LENMINS      - length in minutes (ie, '90' for an hour and a half long show)

	CHANNUM      - channel number (channum field in channel table)
	CALLSIGN     - station callsign

Only the program_info and channel_number OSD containers can use the new
keyword functionality at this moment, but changing the code to allow other
containers to use them will be fairly easy.


** Chris Pinkham                  Linux v2.2.18, Sane v1.0.4, Cajun v3.0-8 **
** cpinkham at bc2va.org                          http://www.bc2va.org/chris/ **

More information about the mythtv-dev mailing list