Skip to content

Commit

Permalink
Merge pull request #121 from phunkyfish/externalise-config
Browse files Browse the repository at this point in the history
Externalise config
  • Loading branch information
phunkyfish authored Oct 30, 2018
2 parents 4fd72d4 + f60533a commit 6882acb
Show file tree
Hide file tree
Showing 43 changed files with 2,890 additions and 717 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ set(VUPLUS_SOURCES src/client.cpp
src/enigma2/data/RecordingEntry.cpp
src/enigma2/data/Timer.cpp
src/enigma2/extract/EpgEntryExtractor.cpp
src/enigma2/extract/GenreExtractor.cpp
src/enigma2/extract/GenreIdMapper.cpp
src/enigma2/extract/GenreRytecTextMapper.cpp
src/enigma2/extract/ShowInfoExtractor.cpp
src/enigma2/utilities/CurlFile.cpp
src/enigma2/utilities/FileUtils.cpp
src/enigma2/utilities/Logger.cpp
src/enigma2/utilities/WebUtils.cpp)

Expand All @@ -65,11 +67,14 @@ set(VUPLUS_HEADERS src/client.h
src/enigma2/extract/IExtractor.h
src/enigma2/extract/EpgEntryExtractor.h
src/enigma2/extract/EpisodeSeasonPattern.h
src/enigma2/extract/GenreExtractor.h
src/enigma2/extract/GenreIdMapper.h
src/enigma2/extract/GenreRytecTextMapper.h
src/enigma2/extract/ShowInfoExtractor.h
src/enigma2/utilities/CurlFile.h
src/enigma2/utilities/DeviceInfo.h
src/enigma2/utilities/LocalizedString.h
src/enigma2/utilities/UpdateState.h
src/enigma2/utilities/FileUtils.h
src/enigma2/utilities/Logger.h
src/enigma2/utilities/WebUtils.h)

Expand Down
77 changes: 65 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Within this tab the connection options need to be configured before it can be su
* **Enable automatic configuration for live streams**: When enabled the stream URL will be read from an M3U file. When disabled it is constructed based on the filename.
* **Streaming port**: This option defines the streaming port the settop box uses to stream live tv. The default is 8001 which should be fine if the user did not define a custom port within the webinterface.
Webinterface Port: This option defines the port that should be used to access the webinterface of the settop box.
* **Use secure HTTP (https) for streams**: Use https to connect to streams
* **Use login for streams**: Use the login username and password for streams

### General
Within this tab general options are configured.
Expand All @@ -45,18 +47,25 @@ Within this tab general options are configured.
* **Icon path**: In order to have Kodi display channel logos you have to copy the picons from your settop box onto your OpenELEC machine. You then need to specify this path in this property.
* **Update interval**: As the settop box can also be used to modify timers, delete recordings etc. and the settop box does not notify the Kodi installation, the addon needs to regularly check for updates (new channels, new/changed/deletes timers, deleted recordings, etc.) This property defines how often the addon checks for updates.

### Channels & EPG
Within this tab options that refer to channel and EPG data can be set.
### Channels
Within this tab options that refer to channel data can be set.

* **Fetch only one TV bouquet**: If this option is set than only the channels that are in one specified TV bouquet will be loaded, instead of fetching all available channels in all available bouquets.
* **TV bouquet**: If the previous option has been enabled you need to specify the TV bouquet to be fetched from the settop box. Please not that this is the bouquet-name as shown on the settop box (i.e. "Favourites (TV)"). This setting is case-sensitive.
* **Zap before channelswitch (i.e. for Single Tuner boxes)**: When using the addon with a single tuner box it may be necessary that the addon needs to be able to zap to another channel on the settop box. If this option is enabled each channel switch in Kodi will also result in a channel switch on the settop box. Please note that "allow channel switching" needs to be enabled in the webinterface on the settop box.
* **Extract genre, season and episode info where possible**: Have kodi check the description fields in the EPG data and attempt to extrac
t genre, season and episode info where possible. Currently supports OTA, OpenTV and Rytec XMLTV EPG data for UK and Ireland channels. If y
ou would like to support other formats please raise an issue at the github project https://github.com/kodi-pvr/pvr.vuplus. Genre support s
pecificially requires the use of Rytec XMLTV Epg data. There is a CPU overhead to enabling this setting. After changing this option you wi
ll need to clear the EPG cache `Settings->PVR & Live TV->Guide->Clear cache` for it to take effect.
* **Log missing genre mappings**: If you would like missing genre mappings to be logged so you can report them enable this option. Note, any genres found that don't have a mapping will still be extracted and sent to Kodi as strings. Currently genres are extracted by looking for text between square brackets, e.g. [TV Drama]

### EPG
Within this tab options that refer to EPG data can be set. Excluding logging missing genre text mappings all other options will require clearing the EPG cache to take effect. This can be done by going to `Settings->PVR & Live TV->Guide->Clear cache` in Kodi after the addon restarts.

Information on customising the extraction and mapper configs can be found in the next section of the README.

* **Extract season, episode and year info where possible**: Check the description fields in the EPG data and attempt to extract season, episode and year info where possible.
* **Extract show info file**: The config used to extract season, episode and year information. The default file is `English-ShowInfo.xml`.
* **Enable genre ID mappings**: If the genre IDs sent with EPG data from your STB are not using the DVB standard, map from these to the DVB standard IDs. Sky UK for instance uses OpenTV, in that case without this option set the genre colouring and text would be incorrect in Kodi.
* **Genre ID mappings file**: The config used to map STB EPG genre IDs to DVB standard IDs. The default file is `Sky-UK.xml`.
* **Enable Rytec genre text mappings**: If you use Rytec XMLTV EPG data this option can be used to map the text genres to DVB standard IDs.
* **Rytec genre text mappings file**: The config used to map Rytec Genre Text to DVB IDs. The default file is `Rytec-UK-Ireland.xml`.
* **Log missing genre text mappings**: If you would like missing genre mappings to be logged so you can report them enable this option. Note: any genres found that don't have a mapping will still be extracted and sent to Kodi as strings. Currently genres are extracted by looking for text between square brackets, e.g. [TV Drama], or for major, minor genres using a dot (.) to separate [TV Drama. Soap Opera]

### Recordings & Timers

Expand All @@ -74,15 +83,59 @@ ll need to clear the EPG cache `Settings->PVR & Live TV->Guide->Clear cache` for
* **Automatic timerlist cleanup**: If this option is set then the addon will send the command to delete completed timers from the STB after each update interval.

### Timeshift
* **Enable timeshift**: What timeshift option do you want. `Disabled`, only timeshift `On pause` or timeshift `On Playback`.
* **Enable timeshift**: What timeshift option do you want:
- `Disabled` - No timeshifting
- `On Pause` - Timeshifting starts when a live stream is paused. E.g. you want to continue from where you were at after pausing.
- `On Playback` - Timeshifting starts when a live stream is opened. E.g. You can go to any point in the stream since it was opened.
* **Timeshift buffer path**: The path used to store the timeshoft buffer. The default is the addon data folder in userdata

### Advanced
Within this tab more uncommon and advanced options can be configured.

* **Put outline (e.g. sub-title) before plot**: By default plot outline (short description on Enigma2) is not displayed in the UI. Can be
displayed in EPG, Recordings or both. After changing this option you will need to clear the EPG cache `Settings->PVR & Live TV->Guide->C
lear cache` for it to take effect.
displayed in EPG, Recordings or both. After changing this option you will need to clear the EPG cache `Settings->PVR & Live TV->Guide->Clear cache` for it to take effect.
* **Send deep standby command**: If this option is set then the addon will send the DeepStandby-Command to the settop box when Kodi will be closed (or the addon will be deactivated), causing the settop box to shutdown into DeepStandby.
* **Custom live TV timeout (0 to use default)**: The timemout to use when trying to read live streams
* **Stream read chunk size**: The chunk size used by Kodi for streams. Default 0 to leave it to Kodi to decide.
* **Stream read chunk size**: The chunk size used by Kodi for streams. Default 0 to leave it to Kodi to decide.

## Customising Config Files

The various config files allow users to create their own, making it possible to support other languages and formats. Each different type of config file is detailed below. Best way to learn about them is to read the config files themselves. Each contains details of how the config file works.

All of the files listed below are overwritten each time the addon starts. Therefore if you are customising files please create new copies with different file names. Note: that only the files below are overwritten any new files you create will not be touched.

After adding and selecting new config files you will need to clear the EPG cache `Settings->PVR & Live TV->Guide->Clear cache` for it to take effect.

If you would like to support other formats/languages please raise an issue at the github project https://github.com/kodi-pvr/pvr.vuplus, where you can either create a PR or request your new configs be shipped with the addon.

There is one config file located here: `userdata/addon_data/pvr.vuplus/genres/kodiDvbGenres.xml`. This simply contains the DVB genre IDs that Kodi supports. Can be a useful reference if creating your own configs. This file is also overwritten each time the addon restarts.

### Season, Episode and Year Show Info

Config files are located in the `userdata/addon_data/pvr.vuplus/showInfo` folder.

The following files are currently available with the addon:
- `English-ShowInfo.xml`

Note: the config file can contain as many pattern matches as are required. So if you need to support multiple languages in a single file that is possible. However there must be at least one <seasonEpisode> pattern and at least one <year> pattern. Proficiency in regular exressions is required!

### Genre ID Mappings

Config files are located in the `userdata/addon_data/pvr.vuplus/genres/genreIdMappings` folder.

The following files are currently available with the addon:
- `AU-SAT.xml`
- `Sky-IT.xml`
- `Sky-NZ.xml`
- `Sky-UK.xml`

Note: that each source genre ID can be mapped to a DVB ID. However multiple source IDs can be mapped to the same DVB ID. Therefore there are exactly 256 <mapping> elements in each file as a genre ID is 8 bits. All values are in Hex. The first fours bits are the genreType in Kodi PVR and the last four bits are the genreSubType.

### Rytec Genre Text Mappings

Config files are located in the `userdata/addon_data/pvr.vuplus/genres/genreRytecTextMappings` folder.

The following files are currently available with the addon:
- `Rytec-UK-Ireland.xml`

Note: the config file can contain as many mappings as is required. Currently genres are extracted by looking for text between square brackets, e.g. [TV Drama], or for major, minor genres using a dot (.) to separate [TV Drama. Soap Opera]. The config file maps the text to a kodi DVB genre ID. If the full text cannot be matched it attempts to match just the major genre, i.e. "TV Drama" in the previous example. If a mapping cannot be found the text between the brackets will be used instead. However there will be no colouring in the Kodi EPG in this case.
13 changes: 10 additions & 3 deletions pvr.vuplus/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.vuplus"
version="3.13.0"
version="3.14.0"
name="Enigma2 Client"
provider-name="Joerg Dembski and Ross Nicholson">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -19,7 +19,7 @@
<summary lang="de_DE">Kodi Oberfläche für VU+ / Enigma2-basierte Settop-Boxen</summary>
<summary lang="el_GR">Frontend του Kodi για αποκωδικοποιητές (settop box) τύπου VU+ / Enigma2</summary>
<summary lang="en_AU">Kodi's frontend for VU+ / Enigma2 based settop boxes</summary>
<summary lang="en_GB">Kodi's frontend for Enigma2 based settop boxes</summary>
<summary lang="en_GB">Kodi's frontend for Enigma2 based set-top boxes</summary>
<summary lang="en_NZ">Kodi's frontend for VU+ / Enigma2 based settop boxes</summary>
<summary lang="en_US">Kodi's frontend for VU+ / Enigma2 based settop boxes</summary>
<summary lang="es_AR">Kodi frontend para decodificadores equipados con VU+/Enigma2</summary>
Expand Down Expand Up @@ -71,7 +71,10 @@
<description lang="de_DE">VU+ -Oberfläche; Unterstützt Live TV &amp; Aufnahmen, EPG und Timer.</description>
<description lang="el_GR">Frontend για το VU+. Υποστηρίζει ροές Live TV &amp; Εγγραφές, EPG, Χρονοδιακόπτες.</description>
<description lang="en_AU">VU+ frontend; supporting streaming of Live TV &amp; Recordings, EPG, Timers.</description>
<description lang="en_GB">Enigma2 frontend; supporting streaming of Live TV &amp; Recordings, EPG, Timers, Autotimers.</description>
<description lang="en_GB">Enigma2 frontend - supporting streaming of Live TV &amp; Recordings, EPG, Timers, Autotimers.

For documentation visit: https://github.com/kodi-pvr/pvr.vuplus/blob/master/README.md
</description>
<description lang="en_NZ">VU+ frontend; supporting streaming of Live TV &amp; Recordings, EPG, Timers.</description>
<description lang="en_US">VU+ frontend; supporting streaming of Live TV &amp; Recordings, EPG, Timers.</description>
<description lang="es_AR">VU+ frontend; soporta TV en vivo, grabaciones, guía de programación (GEP) y temporizadores.</description>
Expand Down Expand Up @@ -175,6 +178,10 @@
<disclaimer lang="zh_TW">這是測試版軟體!其原創作者並無法對於以下情況負責,包含:錄影失敗,不正確的定時設定,多餘時數,或任何產生的其它不良影響...</disclaimer>
<platform>@PLATFORM@</platform>
<news>
v3.14.0
- Added: Externalised season/episode and genre config to allow users support other formats/languages, closes #118
- Added: Server OpenWebIf version now reported by addon

v3.13.0
- Added: New setting to enable streaming over HTTPS
- Added: New setting to enable authentication for streaming
Expand Down
4 changes: 4 additions & 0 deletions pvr.vuplus/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v3.14.0
- Added: Externalised season/episode and genre config to allow users support other formats/languages, closes #118
- Added: Server OpenWebIf version now reported by addon

v3.13.0
- Added: New setting to enable streaming over HTTPS
- Added: New setting to enable authentication for streaming
Expand Down
Loading

0 comments on commit 6882acb

Please sign in to comment.