hippojay edited this page May 6, 2015 · 24 revisions
Clone this wiki locally


Create a single simple to use addon that replicates PHT functionality as closely as possible on the KODI platform. It should work "out of the box" without configuration, although we will provide advanced configuration as this is an expectation of KODI power users.


  1. *Separate display and API type code Move API type code where we find and return code from the XML (such as movietag(), getthumb(), etc) to a separate file. I want to be able to reuse this type of code elsewhere (see 5)

  2. Move skin functions Whilst these run in the foreground, they affect background skin values and therefore I think they should be separated from the main "real-time" running code

  3. Refactor the skin code I'm sure there are some gains to be made here. The code is too linear for running across multiple sections and servers.

  4. Incorporate helper code into plexbmc Make plexbmc start the service, but also provide addon functions. This means a single package to install and manage, which should be easier for users. A single plexGDM module, so we don't move out of sync for changes. Combine settings, so that it's easier to manage and share settings across the two functions (such as the issue with plex timelines)

  5. Move server discovery to plexbmc helper function So that we can do continuous discovery of servers and sections. This in turn would mean that we can do continuous updates of skin properties to ensure that we are never waiting too long for an up to date interface. Part of this would be intermediate caching in the helper, so the main plugin is never waiting for XML to be delivered fr the plex server. I think doing this would have a big impact on performance and may well allow the skin to move to dynamic listitems.


I was going to start this in the following order, as I wanted to get some immediate control over the Helper and try and merge some functionality to improve the experiance:

  1. Merge plexbmc helper into plexbmc - immediate control over end to end function
  2. Create process to allow helper to do ongoing discovery in separate thread.(server + section)
  3. Move Skin functions to separate file
  4. Create process to allow helper to do continuous skin updates

Moving to separate API files and other internal refactoring was going to be left til later, as some of these architectural changes might affect what is done in this area.


One thing to bear in mind is performance. Some of the code iterate many thousands of times and small changes can introduce larger effects. Having helper to the heavy lifting may help smooth over a lot of these.

Python profiling code should be used to ensure changes do not have an adverse affect.