Difference between revisions of "Schedule-ui.xml"

From MythTV Official Wiki
Jump to: navigation, search
(The "channelrecpriority" window: Clarify)
(The "progdetails" window: Added documentation for the HTML files)
Line 820: Line 820:
 
|}
 
|}
  
 +
The browser renders two HTML pages stored with the theme: htmls/progdetails_page1.html and htmls/progdetails_page2.html. Placeholder strings may be placed in the HTML, and they will be replaced by corresponding attributes of the selected program.
 +
 +
The placeholder string for an attribute consists of the attribute's name surrounded by percent signs. For example, the placeholder string for the TITLE attribute is %TITLE%. Each attribute also supports a placeholder string for the attribute's label. The placeholder string for the TITLE attribute's label is %TITLE_LABEL%.
 +
 +
A few rules govern the placement of the placeholder strings within the HTML files:
 +
 +
* The attribute's placeholder and the attribute label's placeholder must appear together on the same line. This works:
 +
 +
<pre>
 +
<div><h1>%TITLE_LABEL%</h1><p>%TITLE%</p></div>
 +
</pre>
 +
 +
But this doesn't:
 +
 +
<pre>
 +
<div>
 +
  <h1>%TITLE_LABEL%</h1>
 +
  <p>%TITLE%</p>
 +
</div>
 +
</pre>
 +
 +
In this example, only the %TITLE% placeholder will be populated. %TITLE_LABEL% won't be populated, so it will appear on the screen as "%TITLE_LABEL%".
 +
 +
* If a line contains a placeholder, but the associated attribute isn't defined for the program, then that line is removed from the file before it is rendered by the browser. As a result, any HTML markup necessary to display the attribute and its label should appear on the same line as the placeholder strings. Otherwise, extraneous HTML markup will be rendered for undefined attributes. For example, suppose the TITLE_PRONOUNCE attribute is undefined. If this appears in the HTML:
 +
 +
<pre>
 +
<div>
 +
  <h1>%TITLE_PRONOUNCE_LABEL%</h1><p>%TITLE_PRONOUNCE%</p>
 +
</div>
 +
</pre>
 +
 +
Then MythTV will remove the middle line but leave the first and last lines defining the div, possibly affecting the format or layout of the rendered page.
 +
 +
* When searching for placeholders corresponding to undefined attributes, MythTV stops after it finds the first occurrence. Therefore, placeholders should not appear in the file more than once, even including inside comments.
 +
 +
The following attributes are available on the two details pages:
 +
 +
{| cellpadding="4" border="1"
 +
| TITLE
 +
| WRITER
 +
| WATCH_LIST_SCORE
 +
|-
 +
| TITLE_PRONOUNCE
 +
| GUEST_STAR
 +
| WATCH_LIST_STATUS
 +
|-
 +
| DESCRIPTION
 +
| HOST
 +
| SEARCH_PHRASE
 +
|-
 +
| CATEGORY
 +
| ADAPTER
 +
| FINDID
 +
|-
 +
| CATEGORY_TYPE
 +
| PRESENTER
 +
| RECORDING_HOST
 +
|-
 +
| EPISODE
 +
| COMMENTATOR
 +
| RECORDED_FILE_NAME
 +
|-
 +
| ORIGINAL_AIRDATE
 +
| GUEST
 +
| RECORDED_FILE_SIZE
 +
|-
 +
| PROGRAMID
 +
| MYTHTV_STATUS
 +
| RECORDING_PROFILE
 +
|-
 +
| ACTORS
 +
| RECORDING_RULE
 +
| RECORDING_GROUP
 +
|-
 +
| DIRECTOR
 +
| LAST_RECORDED
 +
| STORAGE_GROUP
 +
|-
 +
| PRODUCER
 +
| NEXT_RECORDING
 +
| PLAYBACK_GROUP
 +
|-
 +
| EXECUTIVE_PRODUCER
 +
| AVERAGE_TIME_SHIFT
 +
|
 +
|}
  
 
=== The "programfind" window ===
 
=== The "programfind" window ===

Revision as of 00:49, 2 February 2013

The schedule-ui.xml file governs the layout and behavior of the EPG, the Schedule Editor screens and associated screens. It consists of the following windows and named attributes:

Schedule UI Windows

Window Name Type Description
programguide Window The Non-LiveTV program guide.
programguide-video Window The LiveTV Program Guide.
manualschedule Window The Manual Schedule editor.
viewscheduled Window The Upcoming Recordings screen.
channelrecpriority Window The Channel Priority screen.
programrecpriority Window The Program Priority screen.
custompriority Window The Custom Priority screen.
phrasepopup Window Multiple screen template for screen using a text entry popup.
timepopup Window Template screen type for screens using a date and time buttonlist.
powersearchpopup Window The Power Search popup.
editpowersearchpopup Window The Edit Power Search popup.
programlist Window The Program List screen.
progdetails Window The Program Details screen.
progfind Window The Program Finder screen.
scheduleeditor Window The Schedule Editor screen.
scheduleoptionseditor Window The Schedule Options screen.
storageoptionseditor Window The Storage Options screen.
postproceditor Window The Post Processing screen.


Generic Attributes Used in most windows

Important.png Note: The following widgets can be used in almost any of the schedule-ui.xml and recordings-ui.xml views. In addition, all textual elements can be combined however the themer likes using the <template> element. To combine the title, year, and description into a single textarea, the theme author might use a template like:

<template>%TITLE% (%YEAR%) - %DESCRIPTION%</template>
Widget Name Widget Type Description Required?
title textarea The title of the item. N
subtitle textarea The subtitle of the item. N
titlesubtitle textarea The title and subtitle of the item. N
description textarea The description/plot of the item. N
category textarea The category of the item. N
callsign textarea The callsign of the item's channel. N
commfree textarea The commercial free status of the item's channel. N
outputfilters textarea The playback output filters of the item's channel. N
starttime textarea The start time of the item in the user-specified format. N
startdate textarea The start date of the item in the user-specified format. N
endtime textarea The end time of the item in the user-specified format. N
enddate textarea The end date of the item in the user-specified format. N
recstarttime textarea The recording start time of the item in the user-specified format. N
recstartdate textarea The recording end date of the item in the user-specified format. N
recendtime textarea The recording end time of the item in the user-specified format. N
recenddate textarea The recording end date of the item in the user-specified format. N
lastmodifiedtime textarea The last modified time of the item in the user-specified format. N
lastmodifieddate textarea The last modified date of the item in the user-specified format. N
lastmodified textarea The last modified time and date of the item in the user-specified format. N
channum textarea The channel number on which the item was recorded. N
chanid textarea The internal myth channel ID on which the item was recorded. N
channel textarea The combined channel number/name string. N
longchannel textarea The full plain english channel name/number string. N
iconpath textarea The path to the icon file for the channel on which the item was recorded. N
filesize textarea The file size of the item in bytes. N
filesize_str textarea A "plain english" filesize of the item (in MB/GB/etc.) N
lenmins textarea The length of the item in minutes. N
lentime textarea The length of the item in hours. N
rectypechar textarea The recording type of the item, single character. N
rectype textarea The recording type of the item as a string. N
rectypestatus textarea A string value for the status of an upcoming recording. N
card textarea The card upon which an item will record. N
recpriority textarea The recording priority of an item. N
recgroup textarea The recording group of an item. N
playgroup textarea The playback group of an item. N
storagegroup textarea The storage group of an item. N
programflags textarea The program flags of an item. N
audioproperties textarea The audio properties of an item. N
videoproperties textarea The videoproperties of an item. N
subtitleType textarea The subtitling information of an item. N
timedate textarea The "date, starttime-endtime" of an item. N
shorttimedate textarea The short version of the "date, starttime-endtime" of an item. N
shortstarttimedate textarea The short "date starttime" of an item. N
recstatus textarea The recording status of an item. N
repeat textarea The short repeat status of an item. (Repeat) N
longrepeat textarea The long string repeat status of an item. (Repeat Sun July 17, 2010) N
seriesid textarea The grabber-assigned Series ID of an item. N
programid textarea The grabber assigned Program ID of an item. N
catType textarea The category Type of an item. N
year textarea The year of release of an item. N
stars textarea The stars value in text of an item. (4 Stars) N
yearstars textarea The year and star values of an item. (1996, 5 stars) N
originalairdate textarea The original air date of an item. N
shortoriginalairdate textarea The short original air date of an item. N

The "programguide" window

Widget Name Widget Type Description Required?
guidegrid guidegrid The EPG Guide Grid. Yes
timelist buttonlist A list of the timeslots visible in the EPG.
Mapped Text
starttime
endtime
Yes
channellist buttonlist A buttonlist of the channels visible in the EPG.
Mapped Text
channelnumber
callsign
name
channelgroupname
channelsourcename
channelvisible (Yes/No)
Yes
channelicon imagetype The selected channel's icon. No
channelgroup textarea The current channel group name (if groups are in use). No
datetext textarea The date of currently displayed EPG. No

The "programguide-video" window

Same as programguide above, with the following additions

Widget Name Widget Type Description Required?
video imagetype A video preview/playback of the currently playing program. Yes

The "manualschedule" window

Widget Name Widget Type Description Required?
channel buttonlist A list of the available channels Yes
startdate buttonlist The date to start the manual recording. Yes
starthour spinbox The hour to start the recording. Yes
startminute imagetype The minute to start the recording. Yes
duration spinbox The duration of the recording. Yes
cancel button The cancel button. No
next button The "Next" button. Yes


The "viewscheduled" window

Widget Name Widget Type Description Required?
schedules buttonlist A list of all scheduled programs. Yes
filter textarea The filter currently being applied to the schedule list. Yes
groups buttonlist A list of all recording groups. Yes
norecordings_info textarea The textarea to show when no recordings are scheduled. No


The "channelrecpriority" window

Widget Name Widget Type Description Required?
channels buttonlist A list of all channels. Yes
chanstr textarea The number of the selected channel. No
icon imagetype The selected channel icon. No
priority textarea The priority of the selected channel. (Only works from within the channels buttonlist.) No

The "programrecpriority" window

Widget Name Widget Type Description Required?
programs buttonlist A list of all scheduled programs.
Mapped Text
ProgamInfo Map
progpriority
finalpriority
lastrecorded
lastrecordeddate
lastrecordedtime
channel
channum
callsign
recordingprofile
Statetypes
status
Yes
scheduleinfo textarea The Schedule status of the selected item. Yes
recpriority buttonlist A recording priority for the selected item. Yes
finalpriority textarea The final recording priority of the selected item, after modifications. Yes

The "custompriority" window

Widget Name Widget Type Description Required?
rules buttonlist A list of all custom priority rules. Yes
priority spinbox A spinbox to modify the priority of the rule. Yes
clauses spinbox A spinbox of common clauses/rules. Yes
add button A button to add a new rule. Yes
description textedit A textedit to name the current rule. Yes
cancel button A "Cancel" button. Yes
delete button A button to delete the current rule. Yes
test button A button to test the current rule. Yes
install button A button to make the new rule active. Yes


The "phrasepopup" window

Widget Name Widget Type Description Required?
phrase_list buttonlist A list of phrases relevant to the current screen. Yes
phrase_edit textedit A textedit to edit the selected phrase. Yes
ok_button button An "OK" button. Yes
cancel_button button A "Cancel" button. Yes
delete_button button A button to delete the selecte phrase. Yes
record_button button A "Record" button. Yes
title_text textarea A textarea to display the title. Yes

The "timepopup" window

Widget Name Widget Type Description Required?
date_list buttonlist A list of dates. Yes
time_list buttonlist A list of times. Yes
ok_button button An "OK" button. Yes


The "powersearchpopup" window

Widget Name Widget Type Description Required?
phrase_list buttonlist A list of phrases. Yes
edit_button buttonlist A button to edit the selected search. Yes
delete_button button An button to delete the selected search. Yes
record_button buttonlist A "Record" button. Yes


The "editpowersearchpopup" window

Widget Name Widget Type Description Required?
title_edit textedit A editor for the name of the power search. Yes
subtitle_edit textedit An editor for the subtitle. Yes
desc_edit textedit A editor for the description of the power search. Yes
category_list buttonlist A buttonlist for the power search category. Yes
genre_list buttonlist A buttonlist for the power search genre. Yes
channel_list buttonlist A buttonlist for the power search channel. Yes
ok_button button An "OK" button. Yes


The "programlist" window

Widget Name Widget Type Description Required?
proglist buttonlist A list of programs. Yes
curview textarea The program lister is used to display the result of program searches. This textarea shows the current search criteria or search string. No
sched textarea The type of search being performed e.g. 'Title Search' or 'People search' No
position textarea Shows the number of search results and the current position in that list e.g. '34 of 289' No

The "progdetails" window

Widget Name Widget Type Description Required?
browser webbrowser An HTML viewer for the program details. Yes

The browser renders two HTML pages stored with the theme: htmls/progdetails_page1.html and htmls/progdetails_page2.html. Placeholder strings may be placed in the HTML, and they will be replaced by corresponding attributes of the selected program.

The placeholder string for an attribute consists of the attribute's name surrounded by percent signs. For example, the placeholder string for the TITLE attribute is %TITLE%. Each attribute also supports a placeholder string for the attribute's label. The placeholder string for the TITLE attribute's label is %TITLE_LABEL%.

A few rules govern the placement of the placeholder strings within the HTML files:

  • The attribute's placeholder and the attribute label's placeholder must appear together on the same line. This works:
<div><h1>%TITLE_LABEL%</h1><p>%TITLE%</p></div>

But this doesn't:

<div>
  <h1>%TITLE_LABEL%</h1>
  <p>%TITLE%</p>
</div>

In this example, only the %TITLE% placeholder will be populated. %TITLE_LABEL% won't be populated, so it will appear on the screen as "%TITLE_LABEL%".

  • If a line contains a placeholder, but the associated attribute isn't defined for the program, then that line is removed from the file before it is rendered by the browser. As a result, any HTML markup necessary to display the attribute and its label should appear on the same line as the placeholder strings. Otherwise, extraneous HTML markup will be rendered for undefined attributes. For example, suppose the TITLE_PRONOUNCE attribute is undefined. If this appears in the HTML:
<div>
  <h1>%TITLE_PRONOUNCE_LABEL%</h1><p>%TITLE_PRONOUNCE%</p>
</div>

Then MythTV will remove the middle line but leave the first and last lines defining the div, possibly affecting the format or layout of the rendered page.

  • When searching for placeholders corresponding to undefined attributes, MythTV stops after it finds the first occurrence. Therefore, placeholders should not appear in the file more than once, even including inside comments.

The following attributes are available on the two details pages:

TITLE WRITER WATCH_LIST_SCORE
TITLE_PRONOUNCE GUEST_STAR WATCH_LIST_STATUS
DESCRIPTION HOST SEARCH_PHRASE
CATEGORY ADAPTER FINDID
CATEGORY_TYPE PRESENTER RECORDING_HOST
EPISODE COMMENTATOR RECORDED_FILE_NAME
ORIGINAL_AIRDATE GUEST RECORDED_FILE_SIZE
PROGRAMID MYTHTV_STATUS RECORDING_PROFILE
ACTORS RECORDING_RULE RECORDING_GROUP
DIRECTOR LAST_RECORDED STORAGE_GROUP
PRODUCER NEXT_RECORDING PLAYBACK_GROUP
EXECUTIVE_PRODUCER AVERAGE_TIME_SHIFT

The "programfind" window

Widget Name Widget Type Description Required?
alphabet buttonlist A list of alphabet letters. Yes
shows buttonlist A list of the programs for the selected letter. Yes
times buttonlist A list of showings for the selected title. Yes
help1text textarea Help text field 1. No
help2text textarea Help text field 2. No


The "scheduleeditor" window

Widget Name Widget Type Description Required?
rules buttonlist A list of schedule rule types. Yes
schedoptions button A button to invoke the schedule options screen. Yes
storeoptions button A button to invoke the storage options screen. Yes
postprocessing button A button to invoke the post processing options screen. Yes
schedinfo button A button to invoke the schedule info screen. Yes
preview button A button to generate a preview of the schedule in effect. Yes
cancel button A "Cancel" button. Yes
save button A button to save the rule. Yes
metadata button A button to invoke the Metadata Options screen. No

The "scheduleoptionseditor" window

Widget Name Widget Type Description Required?
priority spinbox A spinbox to promote or demote the item's priority. Yes
input spinbox A spinbox to select preferred input. Yes
startoffset spinbox A spinbox to adjust the start early/late values. Yes
endoffset spinbox A spinbox to adjust the end early/late values.. Yes
dupmethod spinbox The duplicate checking method for the rule. Yes
dupscope spinbox The scope of the duplicate checking. Yes
ruleactive checkbox A checkbox to activate the rule. Yes
back button A button to return to the schedule editor. Yes

The "storageoptionseditor" window

Widget Name Widget Type Description Required?
recprofile buttonlist A list of available recording profiles. Yes
recgroup buttonlist A list of available recording groups. Yes
storagegroup buttonlist A list of available Storage Groups. Yes
playgroup buttonlist A list of available playback groups. Yes
maxepisodes spinbox Maximum number of episodes to keep. Yes
maxnewest buttonlist How to handle old recordings when the max has been reached. Yes
autoexpire checkbox Allow the item to autoexpire. Yes
back button A button to return to the schedule editor. Yes


The "postproceditor" window

Widget Name Widget Type Description Required?
metadatalookup checkbox A checkbox to automatically perform metadata lookup on recordings. Yes
autocommflag checkbox A checkbox to automatically commercial flag the recordings. Yes
autotranscode checkbox A checkbox to automatically transcode the recordings. Yes
transcodeprofile buttonlist Which transcode profile to use when automatically transcoding. Yes
userjob1 checkbox A checkbox to automatically run User Job #1. Yes
userjob1text textarea A textarea automatically updated for the name of the user job, ie "Run post-record twitter." Yes
userjob2 checkbox A checkbox to automatically run User Job #2. Yes
userjob2text textarea A textarea automatically updated for the name of the user job, ie "Run post-record twitter." Yes
userjob3 checkbox A checkbox to automatically run User Job #3. Yes
userjob3text textarea A textarea automatically updated for the name of the user job, ie "Run post-record twitter." Yes
userjob4 checkbox A checkbox to automatically run User Job #4. Yes
userjob4text textarea A textarea automatically updated for the name of the user job, ie "Run post-record twitter." Yes
back button A button to return to the schedule editor. Yes

The "metadataoptions" window

Widget Name Widget Type Description Required?
inetref_edit textedit A textedit to edit the inetref. Yes
season_spinbox spinbox A spinbox to set the season number. Yes
episode_spinbox spinbox A spinbox to set the episode number. Yes
query_button button A button to invoke a query for the values above. Yes
online_coverart_button button A button to search for online coverart with the inetref, season, and episode values. Yes
online_fanart_button button A button to search for online fanart with the inetref, season, and episode values. Yes
online_banner_button button A button to search for online banner with the inetref, season, and episode values. Yes
local_coverart_button button A button to browse local coverart. Yes
local_fanart_button button A button to browse local fanart. Yes
local_banner_button button A button to browse local banners. Yes
coverart imagetype Display the currently set coverart for a rule. No
fanart imagetype Display the currently set fanart for a rule. No
banner imagetype Display the currently set banner for a rule. No
coverart_text textarea Display the path for the currently set coverart for a rule. No
fanart_text textarea Display the path for the currently set fanart for a rule. No
banner_text textarea Display the path for the currently set banner for a rule. No
back button A button to return to the schedule editor. Yes