Archive:Skin migration PVR section for Helix release

From Official Kodi Wiki
Jump to navigation Jump to search

Introduction

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)

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

New static list ids

  • ID: 10 -> guide EPG grip
  • 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>), but it's up to you which view you want to support. Remove each id which you don't want to support (ex. <views>10</views> -> EPG view only).

  • 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