su1s / e2m3u2bouquet

Enigma2 IPTV m3u parser and bouquet creator
GNU General Public License v3.0
68 stars 50 forks source link

Enigma2 IPTV m3u to bouquet

Latest release can be downloaded from releases

Usage

usage: e2m3u2bouquet.py [-h] [-m M3UURL] [-e EPGURL] [-n PROVIDERNAME]
                        [-u USERNAME] [-p PASSWORD] [-i] [-sttv STTV]
                        [-stvod STVOD] [-M] [-a] [-P] [-q ICONPATH] [-xs]
                        [-b BOUQUETURL] [-bd] [-bt] [-U] [-V]

e2m3u2bouquet.e2m3u2bouquet -- Enigma2 IPTV m3u to bouquet parser

  Copyright 2017. All rights reserved.
  Created on 2017-06-04.
  Licensed under GNU GENERAL PUBLIC LICENSE version 3
  Distributed on an "AS IS" basis without warranties
  or conditions of any kind, either express or implied.

USAGE

optional arguments:
  -h, --help            show this help message and exit
  -i, --iptvtypes       Treat all stream references as IPTV stream type.
                        (required for some enigma boxes)
  -sttv STTV, --streamtype_tv STTV
                        Stream type for TV (e.g. 1, 4097, 5001 or 5002)
                        overrides iptvtypes
  -stvod STVOD, --streamtype_vod STVOD
                        Stream type for VOD (e.g. 4097, 5001 or 5002)
                        overrides iptvtypes
  -M, --multivod        Create multiple VOD bouquets rather than single VOD
                        bouquet
  -a, --allbouquet      Create all channels bouquet
  -P, --picons          Automatically download of Picons, this option will
                        slow the execution
  -q ICONPATH, --iconpath ICONPATH
                        Option path to store picons, if not supplied defaults
                        to /usr/share/enigma2/picon/
  -xs, --xcludesref     Disable service ref overriding from override.xml file
  -b BOUQUET_URL, --bouqueturl BOUQUET_URL
                        URL to download providers bouquet - to map custom
                        service references
  -bd, --bouquetdownload
                        Download providers bouquet (use default url) - to map
                        custom service references
  -bt, --bouquettop     Place IPTV bouquets at top
  -U, --uninstall       Uninstall all changes made by this script
  -V, --version         show program's version number and exit

URL Based Setup:
  -m M3UURL, --m3uurl M3UURL
                        URL to download m3u data from (required)
  -e EPGURL, --epgurl EPGURL
                        URL source for XML TV epg data sources

  -n PROVIDERNAME, --providername PROVIDERNAME
                        Host IPTV provider name

Config file based setup
                        No parameters required
                        The script will create a default config file
                        first time it is run, IPTV providers details
                        need to be entered into this file before
                        running the script again

Prerequisites

EPG-Importer plugin is required. This should be available in the plugin feed or already installed.

N.B. OpenPLi may need additional packages installed. If you attempt to run the script and get an error about missing modules please run

opkg update
opkg install python-image python-imaging python-argparse

How to install

URL Based Setup

Run the script passing the url for your m3u file and the url for your providers XML TV data feed

./e2m3u2bouquet.py -m "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD"

NB: you need to replace the username and password values X 2

If you are with a different provider the script should work but you will obviously need the m3u url (1st parameter) and XML TV url (2nd parameter) for your own provider. Please note the m3u file needs to be the "extended" version if you have the option.

Config File Setup

No parameters required, just run the script

./e2m3u2bouquet.py

The script will create a default config.xml file in /etc/enigma2/e2m3u2bouquet the first time it is run IPTV providers details need to be entered into this file before running the script again

Note: Multiple IPTV providers can be supported via the config.xml

For Picon Download Support

Add -P and optionally -q /path/to/picon/folder/ if you don't store your picons in the default location. The default location is /usr/share/enigma2/picon/ (internal flash) other enigma2 picon search location are /media/usb/picon/ & /media/hdd/picon/.

N.B. If you store the picons on HDD it was spin up whenever they are shown

./e2m3u2bouquet.py "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -P

Specify all stream types to be IPTV

Default is DVB stream types for live channels and IPTV for VOD, all IPTV type streams may be required if you are unable to record channels.

./e2m3u2bouquet.py "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -i

Keep VOD all in a single bouquet

./e2m3u2bouquet.py "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -s

Uninstall

./e2m3u2bouquet.py -U

Help!

./e2m3u2bouquet.py --help

Importing EPG Data

Updating Channels

To update the channels simply run this script again. A scheduled script can be set up to automate this process (see below)

Automate channel updates (set up from SSH)

(Depending on your box image installing nano opkg install nano may set it as the default editor which makes editing the crontab easier)

Automate Channel Updates (set up from box GUI)

Custom Mapping

Change notes

v0.1

v0.5.2

v0.5.3

v0.5.4

v0.5.5

v0.5.6

v0.6

v0.6.1

v0.6.2

v0.6.3

v0.7

v0.7.1

v0.7.3

v0.7.4

v0.7.5

v0.7.6

v0.7.7

v0.8

Visit https://www.suls.co.uk/enigma2-iptv-bouquets-with-epg/ for further information on the script