Archive:Skin migration PVR section for Helix release: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
m (Karellen moved page Skin migration PVR section for Helix release to Archive:Skin migration PVR section for Helix release without leaving a redirect: Outdated)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Introduction ==
This guide describes how to migrate the PVR section of your existing skin to the upcoming Helix release.
This guide describes how to migrate the PVR section of your existing skin to the upcoming Helix release.


Line 24: Line 23:
* added view support, button "View As" (ID: 2)
* added view support, button "View As" (ID: 2)
* added ability to sort the listings, "Sort by" button (ID: 3), "Sort direction" button (ID: 4)
* added ability to sort the listings, "Sort by" button (ID: 3), "Sort direction" button (ID: 4)
* added ability to group recordings by folder structure (in MyPVRRecordings.xml), radiobutton (ID: 5)


see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L74
see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L74


'''New static list ids'''
'''New static list ids'''
* ID: 10 -> guide EPG grip
* ID: 10 -> guide EPG grid
* ID: 11 -> guide view now
* ID: 11 -> guide view now
* ID: 12 -> guide view next
* ID: 12 -> guide view next
* ID: 13 -> guide view channel
* ID: 13 -> guide view channel


see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRGuide.xml#L5 and https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/ViewsPVRGuide.xml
see:<br />
https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRGuide.xml#L5<br />
https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/ViewsPVRGuide.xml


'''New properties'''
'''New properties'''
* new GUI info properties ''PVR.HasTVChannels'' and ''PVR.HasRadioChannels'' to determine if there are tv and radio channels
* new GUI info properties ''PVR.HasTVChannels'' and ''PVR.HasRadioChannels'' to determine if there are tv and radio channels
* new window property ''IsRadio'' to determine if you are the TV or Radio window (see https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L104)
* new window property ''IsRadio'' to determine if you are the TV or Radio window (see https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L104)
<br />
 


== Migrate your home menu entries ==
== Migrate your home menu entries ==


* Replace the existing calls to the built-in functions ''ActivateWindowAndFocus(MyPVR, 32,0, 11,0)'' with ''ActivateWindow(TVChannels)'' or ''ActivateWindow(RadioChannels)'' etc. (see the list of new window names)
* Replace the existing calls to the built-in functions ''ActivateWindowAndFocus(MyPVR, 32,0, 11,0)'' with ''ActivateWindow(TVChannels)'' or ''ActivateWindow(RadioChannels)'' etc. (see the list of new window names)
 
see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesHomeMenuItems.xml#L258


== Migrate the existing views to the new window XML files ==
== Migrate the existing views to the new window XML files ==
Line 52: Line 53:
* As we now support the view functionality like we do in the video window, you have to define a ''<views>'' element right after the ''<window>'' element (ex. ''<views>50</views>'').
* As we now support the view functionality like we do in the video window, you have to define a ''<views>'' element right after the ''<window>'' element (ex. ''<views>50</views>'').
* Now it's up to you if you want to replace the different id's used for each listing (11 = channel list, 13 = Recordings) with a single ID, for example 50. If not, please make sure your id's used in the ''<views>'' element match your control id's.
* Now it's up to you if you want to replace the different id's used for each listing (11 = channel list, 13 = Recordings) with a single ID, for example 50. If not, please make sure your id's used in the ''<views>'' element match your control id's.
* see https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRChannels.xml
 
see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRChannels.xml


=== Guide Window ===
=== Guide Window ===
'''IMPORTANT:''' In guide window (''MyPVRGuide.xml'') you have to use the static view id's (epg = 10, now = 11, next = 12, channel = 13) within the ''<view>'' element (''<views>10,11,12,13</views>'').


NOTE: In guide window (''MyPVRGuide.xml'') you have to use the static view id's (epg = 10, now = 11, next = 12, channel = 13) ''<views>10,11,12,13</views>'', but it's up to you which view you want to support. Remove each id, which you do want to be added (ex. ''<views>10</views>'' -> only EPG view).
* clone the view "now/next" as we split this view into now (ID: 11) and next (ID: 12)
* change the view id for the guide channel view from ID 15 to ID 13
* you have to add a ''<viewtype>'' to each control to define the name of the view (''<viewtype label="19032">list</viewtype>'').<br />Label ID's: 19032 = EPG, 19030 = Now, 19031 = Next, 19029 = Channel<br />


see https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRGuide.xml
see:
https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRGuide.xml
https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/ViewsPVRGuide.xml#L19
<br />
<br />


== Migrate the sideblade menu ==
== Migrate the sideblade menu ==
Line 66: Line 75:
* add the button "View as" to change the views of this window (ID: 2)
* add the button "View as" to change the views of this window (ID: 2)
* add the buttons "Sort by" (ID: 3) and "Sort direction" (ID: 4) to sort your listings
* add the buttons "Sort by" (ID: 3) and "Sort direction" (ID: 4) to sort your listings
* see https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L74
 
see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L74




== Migrate the section header (breadcrumb) ==
== Migrate the section header (breadcrumb) ==


* see https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L3
see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L3

Latest revision as of 02:31, 18 July 2020

This guide describes how to migrate the PVR section of your existing skin to the upcoming Helix release.

First we want to explain what's changed, before we start with the mirgration guide. We split up the existing TV window (MyPVR) and the underlaying views channels, guide etc. in its own windows and in its own XML files. Furthermore we split up the TV and Radio part of the PVR section and add unique window names like TVChannels, RadioGuide etc. to activate such a window (ActivateWindow(TVGuide)). We also removed most of the static button id's previously used for navigating through the former views and added some default functionality such as support for views, sorting type and sorting direction, which you remember from the video windows.

New XML files:

  • MyPVRChannels.xml
  • MyPVRGuide.xml
  • MyPVRRecordings.xml
  • MyPVRSearch.xml
  • MyPVRTimers.xml

New window names:

  • TVChannels & RadioChannels -> MyPVRChannels.xml
  • TVGuide & RadioGuide -> MyPVRGuide.xml
  • TVRecordings & RadioRecordings -> MyPVRRecordings.xml
  • TVSearch & RadioSearch -> MyPVRSearch.xml
  • TVTimers & RadioTimers -> MyPVRTimers.xml

New buttons

  • added a new group selection dialog, button "Channel Groups" (ID: 28)
  • added view support, button "View As" (ID: 2)
  • added ability to sort the listings, "Sort by" button (ID: 3), "Sort direction" button (ID: 4)
  • added ability to group recordings by folder structure (in MyPVRRecordings.xml), radiobutton (ID: 5)

see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L74

New static list ids

  • ID: 10 -> guide EPG grid
  • ID: 11 -> guide view now
  • ID: 12 -> guide view next
  • ID: 13 -> guide view channel

see:
https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRGuide.xml#L5
https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/ViewsPVRGuide.xml

New properties


Migrate your home menu entries

  • Replace the existing calls to the built-in functions ActivateWindowAndFocus(MyPVR, 32,0, 11,0) with ActivateWindow(TVChannels) or ActivateWindow(RadioChannels) etc. (see the list of new window names)

see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesHomeMenuItems.xml#L258

Migrate the existing views to the new window XML files

  • copy over the content of your existing MyPVR.xml to each new XML file (MyPVRChannels.xml, MyPVRGuide.xml)
  • remove the <include> parts where you include the different views (channels, guide etc.) and replace each with its corresponding content for this window, except the radio channels view (ID: 12) which we do not differ from the tv channel list anymore.
  • As we now support the view functionality like we do in the video window, you have to define a <views> element right after the <window> element (ex. <views>50</views>).
  • Now it's up to you if you want to replace the different id's used for each listing (11 = channel list, 13 = Recordings) with a single ID, for example 50. If not, please make sure your id's used in the <views> element match your control id's.

see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRChannels.xml

Guide Window

IMPORTANT: In guide window (MyPVRGuide.xml) you have to use the static view id's (epg = 10, now = 11, next = 12, channel = 13) within the <view> element (<views>10,11,12,13</views>).

  • clone the view "now/next" as we split this view into now (ID: 11) and next (ID: 12)
  • change the view id for the guide channel view from ID 15 to ID 13
  • you have to add a <viewtype> to each control to define the name of the view (<viewtype label="19032">list</viewtype>).
    Label ID's: 19032 = EPG, 19030 = Now, 19031 = Next, 19029 = Channel

see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyPVRGuide.xml https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/ViewsPVRGuide.xml#L19

Migrate the sideblade menu

  • there is no need to add special button id's to switch the windows (like channels, recordings). Use <onclick>ActivateWindow(...)</onclick> and the new property IsRadio to indicate which window should be activated.
  • add the button to access the new group selection dialog (ID: 28)
  • add the button "View as" to change the views of this window (ID: 2)
  • add the buttons "Sort by" (ID: 3) and "Sort direction" (ID: 4) to sort your listings

see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L74


Migrate the section header (breadcrumb)

see: https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/IncludesPVR.xml#L3