From 213abf02cc052148d23d5e20507f1f38c5588c6c Mon Sep 17 00:00:00 2001 From: DougMac Date: Fri, 14 Sep 2018 21:07:52 +0100 Subject: [PATCH 1/2] Update readme for 0.8 --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bd5876a..310216d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Latest release can be downloaded from [releases](https://github.com/su1s/e2m3u2b usage: e2m3u2bouquet.py [-h] [-m M3UURL] [-e EPGURL] [-u USERNAME] [-p PASSWORD] [-i] [-sttv STTV] [-stvod STVOD] [-M] [-a] [-P] [-q ICONPATH] [-xs] - [-b BOUQUETURL] [-bd] [-bt] [-U] [-V] + [-b BOUQUETURL] [-bd] [-bt] [-U] [-V] e2m3u2bouquet.e2m3u2bouquet -- Enigma2 IPTV m3u to bouquet parser @@ -44,7 +44,7 @@ optional arguments: -bd, --bouquetdownload Download providers bouquet (use default url) - to map custom service references - -bt, --bouquettop Place IPTV bouquets at top + -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 @@ -52,7 +52,7 @@ 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 + URL source for XML TV epg data sources Config file based setup No parameters required @@ -137,7 +137,7 @@ Default is DVB stream types for live channels and IPTV for VOD, all IPTV type st * Kick off a manual EPG import ## Updating Channels -To update the channels simply run this script again. A scheduled script can +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) @@ -227,7 +227,7 @@ which makes editing the crontab easier) * Reorder bouquets * Reorder channels within bouquets * Disable entire bouquet or individual channels - * Ability to change service reference (so that EPG from existing satellite service can be used) + * Ability to change service reference (so that EPG from existing satellite service can be used) * Change tvg-id to match other xml epg feeds * Support unicode characters in playlist * Xml override file can set-up EPG-Importer config for different xmltv feeds @@ -236,7 +236,7 @@ which makes editing the crontab easier) #### v0.5.1 * Stream Url no longer output to xml (replaced by clearStreamUrl). This means that custom override maps can be shared as they no longer contain username and passwords - + #### v0.5.2 * Fix bug where delimiter arguments weren't getting converted to ints @@ -288,7 +288,7 @@ which makes editing the crontab easier) * Make sure comments are xml safe * Extract username and password from m3u url if they are not passed in * Set services to stream type '1' in epg config so that the epg can be imported if - serviceapp is overriding stream type '4097' to exteplayer3 + serviceapp is overriding stream type '4097' to exteplayer3 * Minor fixes & tidy * Option for custom stream type for TV and VOD * Allow https & rtmp services @@ -306,4 +306,8 @@ which makes editing the crontab easier) ### v0.7.5 * Additional stream url type checking (e.g. live or VOD) +### v0.8 +* When providers boquet is downloaded (-b or -bd option) use full service references + instead of just the epg releveant part incase it's used for picon naming + Visit https://www.suls.co.uk/enigma2-iptv-bouquets-with-epg/ for further information on the script From 1bcbc3b3f2840b0714bb543e29d5c28578f00dc3 Mon Sep 17 00:00:00 2001 From: DougMac Date: Fri, 14 Sep 2018 21:21:28 +0100 Subject: [PATCH 2/2] V 0.7.6 * Add nocheck attribute for EpgImporter sources (fix for new EpgImporter version) * Add m3u8 VOD stream matching --- README.md | 6 +++--- e2m3u2bouquet.py | 16 ++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 310216d..f4e6f82 100644 --- a/README.md +++ b/README.md @@ -306,8 +306,8 @@ which makes editing the crontab easier) ### v0.7.5 * Additional stream url type checking (e.g. live or VOD) -### v0.8 -* When providers boquet is downloaded (-b or -bd option) use full service references - instead of just the epg releveant part incase it's used for picon naming +### v0.7.6 +* Add nocheck attribute for EpgImporter sources (fix for new EpgImporter version) +* Add m3u8 VOD stream matching Visit https://www.suls.co.uk/enigma2-iptv-bouquets-with-epg/ for further information on the script diff --git a/e2m3u2bouquet.py b/e2m3u2bouquet.py index dbea00c..955854c 100644 --- a/e2m3u2bouquet.py +++ b/e2m3u2bouquet.py @@ -40,9 +40,9 @@ from argparse import RawDescriptionHelpFormatter __all__ = [] -__version__ = '0.7.5' +__version__ = '0.7.6' __date__ = '2017-06-04' -__updated__ = '2018-06-08' +__updated__ = '2018-09-14' DEBUG = 0 TESTRUN = 0 @@ -342,7 +342,11 @@ def set_streamtypes_vodcats(self, channeldict, all_iptv_stream_types, tv_stream_ """ parsed_stream_url = urlparse.urlparse(channeldict['stream-url']) + # check for vod streams ending .*.m3u8 e.g. 2345.mp4.m3u8 + is_m3u8_vod = re.search('\..+\.m3u8$', parsed_stream_url.path) + if (parsed_stream_url.path.endswith('.ts') or parsed_stream_url.path.endswith('.m3u8')) \ + and not is_m3u8_vod \ and not channeldict['group-title'].startswith('VOD'): channeldict['stream-type'] = '4097' if all_iptv_stream_types else '1' if tv_stream_type: @@ -988,7 +992,7 @@ def create_epgimport_source(self, sources, provider, group=None): with open(os.path.join(EPGIMPORTPATH, source_filename), "w+") as f: f.write('\n') f.write('{}\n'.format(indent)) - f.write('{}\n' + f.write('{}\n' .format(2 * indent, channels_filename)) f.write('{}{}\n'.format(3 * indent, self.xml_escape(source_name))) for source in sources: @@ -1107,11 +1111,11 @@ def makeconfig(self, configfile): f = open(configfile, 'wb') f.write("""\r \r \r