I’ve been working on the concept of a PVR Setup Wizard to aid users in configuring a basic PVR using LibreELEC. The idea is that the users will be able to setup a simple PVR from scratch with little effort.
Bits and pieces of this already exist, however, I’d like to try to consolidate these pieces so that a new user can setup a ‘default PVR’ quickly and easily with LibreELEC out-of-the-box via the Kodi interface.
I have already built a prototype Python script to do this for Tvheadend. I’d like to hear some options regard the merits of this idea and whether it is worth pursuing for other backends.
Part One
Expand the existing LibreELEC setup wizard to ask the user if they want to install a PVR. If the user answers positively, they would continue into the PVR Setup wizard.
From what I have found, LE seems to have 3 PVR servers that can be run as Kodi addons (NextPVR, Tvheadend and VDR), there may be more, these are just what I have found so far. Furthermore, it seems that only Tvheadend in installed in the LE image. The others needs to be installed from the LE repository.
I think that the user question would be something like “Which PVR would you like to install?” providing a list of available PVR servers with “None” being the first and default option. Based on this selection, the appropriate Kodi PVR server and client addons will be installed by the existing TVH setup wizard script.
Part Two
Each of the LE PVR server addons will be updated with their own setup wizard that will run when first loaded. I have already mostly completed this step for Tvheadend.
In my TVH wizard, I perform the following steps:
- Set the TVH GUI language to be the same as the Kodi GUI language, defaulting to ‘eng_GB’ if there is no suitable equivalent.
- Set the TVH server name to be the same as the LE hostname.
- Fetch the tuner adapters that TVH has auto-detected and work out which transport (DVB-T, DVB-C, etc) they support.
- Give the user the choice of ONE of these transports.
- Based on the selected transport, list the Country and then Region for the pre-defined muxes.
- Create a new ‘Network’ connected to the adapters of the selected transport and link in the selected pre-defined muxes for the transport/country/region.
- Perform a scan for services. This is not always successful the first time, so that runs in a loop until all services have an LCN or a timeout is reached.
- Create a channel for every service.
- Perform an initial EPG scan.
I’m thinking of adding an easy way to configure the EPG scan interval too.
This was very specific to TVH. I suspect that other PVRs will follow a similar logic, but that all of the details will be customised to each PVR’s architecture.
Running the script on a remote system, I was able to get a virgin LE system (with TVH server and client manually installed for testing purposes), to the stage where the EPG grid in Kodi could be seen populating in real-time as the first EPG scans occurred.
Thoughts, opinions and comments welcome.