Setup - Mariusz89B/script.mtvguide GitHub Wiki

m-TVGuide

m-TVGuide is a XMLTV electronic program guide application for listings and help manage your TV viewing.

To each XMLTV program channel it's possible to match a playlist M3U channel and play it directly from the guide itself.

Matching is done using the XMLTV program channel id and display-name with playlist M3U channel name. Predefined basemaps are also included with a regex channel matching.

EPG

XMLTV is the only supported format for EPG used in m-TVGuide. For faster loading times, provide an compressed EPG in eg. .zip, .bz2 or .gz format, as uncompressed formats such as .xml will take longer time to load.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#source-source

The EPG contains information about programmes for each channel such as title, description, category, timezone, start and endtime ect.

eg.

Programme information

  <programme start="20211105062500 +0000" stop="20211105071000 +0000" channel="Canal+ Premium PL">
    <title lang="pl">The Crew</title>
    <desc lang="pl">Historia załogi Ocean Challenge Yacht Club, która bierze udział w Rolex Fastnet 2019. Ekipa żegluje u wybrzeży Wielkiej Brytanii. Walczy nie tylko z innymi zespołami, lecz także z siłami natury.</desc>
    <credits>
      <director>Maciej Puczyński</director>
    </credits>
    <date>2020</date>
    <category lang="pl">Film</category>
    <category lang="pl">Dokument</category>
    <category lang="pl">Film Dokumentalny</category>
    <country lang="pl">Polska</country>
    <rating>
      <value>12+</value>
    </rating>
  </programme>

An electronic program guide (EPG) file contain programme information based on number of days that have been generated, the content differs from each provider but a typical EPG provides information covering a span of 3 to 7 days. Some providers may even provide EPG containing archive content with multiple days available in the past.

EPG interval

EPG interval can be set on how often to update the EPG file, if the file contains a span of eg. 3 days then 48 hours is enough to keep the file updated as the Auto setting will update the EPG file whenever a new file is available on server.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#epg-update-interval-epg_interval

Categories

The add-on also provides the possibility to group channels into predefined regions. This to make it easier to categorize channels in several regions.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#enable-only-channels-in-pre-defined-groups-show_group_channels

Channel matching

Provided examples of EPG, playlists and basemaps formats and understanding about channel matching.

EPG

<channel id="Canal+ Premium PL">
    <display-name lang="pl">Canal+ Premium PL</display-name>
    <display-name lang="pl">Canal+ Premium FHD PL</display-name>
    <display-name lang="pl">Canal+ Premium FHD VIP PL</display-name>
    <display-name lang="pl">Canal+ Premium FHD</display-name>
    <display-name lang="pl">Canal+ Premium HD VIP PL</display-name>
    <display-name lang="pl">Canal+ Premium HD</display-name>
    <display-name lang="pl">Canal+ Premium SD PL</display-name>
    <display-name lang="pl">Canal+ Premium SD VIP PL</display-name>
    <display-name lang="pl">Canal+ Premium SD</display-name>
    <display-name lang="pl">Canal+ Premium VIP PL</display-name>
    <display-name lang="pl">Canal+ Premium</display-name>
    <display-name lang="pl">PL Canal+ Premium FHD</display-name>
    <display-name lang="pl">PL Canal+ Premium HD</display-name>
    <display-name lang="pl">PL Canal+ Premium SD</display-name>
    <display-name lang="pl">PL Canal+ Premium</display-name>
    <display-name lang="pl">PL: Canal+ Premium FHD</display-name>
    <display-name lang="pl">PL: Canal+ Premium HD</display-name>
    <display-name lang="pl">PL: Canal+ Premium SD</display-name>
    <display-name lang="pl">PL: Canal+ Premium</display-name>
    <display-name lang="pl">PL| Canal+ Premium FHD</display-name>
    <display-name lang="pl">PL| Canal+ Premium HD</display-name>
    <display-name lang="pl">PL| Canal+ Premium SD</display-name>
    <display-name lang="pl">PL| Canal+ Premium</display-name>
    <display-name lang="pl">|PL| Canal+ Premium FHD</display-name>
    <display-name lang="pl">|PL| Canal+ Premium HD</display-name>
    <display-name lang="pl">|PL| Canal+ Premium SD</display-name>
    <display-name lang="pl">|PL| Canal+ Premium</display-name>
  </channel>

Matching is made for both the "channel id" and the "display-name". For the "display-name" to be matched with a playlist channel name you need to enable detection of alternative channel names in settings. This will iterate through every provided "display-name", and might vastly increase startup loading time.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#enable-detection-of-alternative-channel-names-epg_display_name

Playlist M3U

#EXTINF:-1 tvg-id="Canal+ Premium PL" tvg-name="Canal+ Premium FHD PL" tvg-logo="" group-title="Poland",Canal+ Premium FHD PL

While loading a playlist, playlist channel name is extracted from the EXTINF string. The channel name at the end of the string is matched with EPG, as for the "tvg-id" it will match if channel name is missing or if it is enabled in settings.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#enable-tvg-id-matching-tvg_id

Country codes

In case of playlist channel name is missing a country code, it is possible to let the add-on automatically assign it by selecting replace country code setting or manually append a fixed country code.

For the automatic country code replacement, the add-on scans throughout the string for any langual connection. If detected, a country code will be added at the end of the string using the selected pattern.

Replace country code patterns

  • Default - Adjusting only quality definition (eg. Canal+ Premium PL HD will become Canal+ Premium HD PL)
  • Alpha-2 [CC] - PL
  • Alpha-3 [CCC] - POL
  • ccTLD [.cc] - .pl
  • Country name - Poland
  • Remove all definitions

If remove all definitions is selected, it will clear all definitions and country codes in string, eg. TV, HD, 4K, PL, POL ect.

Append

It is also possible to append a country code or definition to the string by using the append setting.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#append-fixed-country-code-append_country_code

eg.

Before appending:

#EXTINF:-1 tvg-id="Canal+ Premium" tvg-name="Canal+ Premium FHD" tvg-logo="" group-title="Poland",Canal+ Premium FHD

After appending:

#EXTINF:-1 tvg-id="Canal+ Premium" tvg-name="Canal+ Premium FHD" tvg-logo="" group-title="Poland",Canal+ Premium FHD PL

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#replace-country-code-pattern https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#append-fixed-country-code-append_country_code

Missing country code

Keep in mind, if a playlist channel is missing a country code it will be filtered out unless you disable the setting only channels in pre-defined groups. Disabling channels in pre-defined groups might vastly increase startup loading time depending on playlist size, as the add-on will load all playlist content.

https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki#enable-only-channels-in-pre-defined-groups-show_group_channels

Add channels without EPG

m-TVGuide is built to only support channels that have a EPG assigned to a channel by default, but there is a possibility to manually assign channels to the EPG list if an EPG is not available for the provided stream, you can do this by using the add channel setting, for more information please see link below.

https://github.com/Mariusz89B/script.mtvguide/wiki/Quickstart#add-channel

Basemap

<channel id="CANAL+ PREMIUM, CANAL+ PREMIUM PL" title="(?=(CANAL|C)\s*(\+|PLUS)?(\s*PREMIUM)?(\s*TV)?(\s*(HD|UHD|4K))?\s*PL$)" strm=""/>

Playlist channel names can also be matched using a basemap regex. A playlist channel name is matched with the regex title and outputs as a "channel id" from the basemap which in turn matches the "channel id" in EPG.

Basemap "channel id" are splited with ", " to output multiple channel ids.

The basemap file is located in the m-TVGuide directory:
\.kodi\addons\script.mtvguide\resources\basemap.xml

Conclusion

To display a channel with provided stream, the channel name in playlists must be equal with the channel id or display-name in EPG.

m-TVGuide only displays channels provided in the EPG, as it is a electronic program guide unlike other similar IPTV program applications that display all playlist content.

For more information about add-on settings, please visit Wiki.
https://github.com/Mariusz89B/script.mtvguide/wiki/Wiki

⚠️ **GitHub.com Fallback** ⚠️