[mythtv-theming] YEAR, STARS, YEARSTARS, and |

Yeechang Lee ylee at pobox.com
Fri Jan 29 14:33:12 UTC 2010


I've modified 0.22's Mythbuntu theme in order to display a few bits of
info (year and stars for movies; original air date for TV shows) that
it doesn't by default. A couple of questions:

1. The | modifier
The pre-MythUI syntax for optional text (text that only appears when a
variable is used) is something like

%ORIGINALAIRDATE|(|)%

with this, MythTV would display

(Wed 20 Jan 2010)

if there is an original air date, and



that is, nothing at all, if not. (This syntax is still used in 0.22
for theming the non-MythUIed OSD.) Since the | modifiers appear at the
end of the variable, each one can trigger/hide multiple characters, so

%SUBTITLE|"|" %

would display, if a subtitle is available, the following:

"This is a subtitle "

I see, in looking over the 0.22 themes, that the syntax has
changed. The | modifiers now appear where the optional text is to
appear and each one can only trigger/hide one character. It's trivial
to change

%ORIGINALAIRDATE|(|)% to %|(ORIGINALAIRDATE|)%

but can

%SUBTITLE|"|" %

be replicated in 0.22?

And, more broadly, is this syntax documented somewhere? I can't find
anything on the | modifier at
http://www.mythtv.org/wiki/MythUI_Theme_Development although it's
quite possible I haven't looked thoroughly enough.

2. %YEARSTARS%

The %YEARSTARS% variable (new in 0.22) does not quite behave as I'd
expect.

All movies, as far as I know (speaking as a North American
SchedulesDirect user), have a valid year, and most have stars, so
%YEARSTARS% typically returns something like:

(1960, 4 stars)

Unfortunately, for movies without stars, %YEARSTARS% returns a null
value when I'd rather get the year, at least:

(1960)

I see two choices here:

* Use some MythUI syntax I am not aware of to replicate the behavior
  I'd prefer using %YEAR% and %STARS%. (This is partly why I ask
  question #1.)

* Patch the source so %YEARSTARS% returns a valid year with or without
  stars.

Suggestions?

-- 
Frontend/backend:	P4 3.0GHz, 1.5TB software RAID 5 array
Backend:		Quad-core Xeon 1.6GHz, 6.6TB sw RAID 6
Video inputs:		Four high-definition over FireWire/OTA
Accessories:		47" 1080p LCD, 5.1 digital, and MX-600


More information about the mythtv-theming mailing list