Skip to content

Commit

Permalink
Merge pull request #65 from su1s/0.7-updates-dm
Browse files Browse the repository at this point in the history
0.7.6
  • Loading branch information
DougMac authored Sep 14, 2018
2 parents 64bcf54 + 1bcbc3b commit 1bffffb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -44,15 +44,15 @@ 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
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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -306,4 +306,8 @@ which makes editing the crontab easier)
### v0.7.5
* Additional stream url type checking (e.g. live or VOD)

### 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
16 changes: 10 additions & 6 deletions e2m3u2bouquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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('<sources>\n')
f.write('{}<sourcecat sourcecatname="IPTV Bouquet Maker - E2m3u2bouquet">\n'.format(indent))
f.write('{}<source type="gen_xmltv" channels="{}">\n'
f.write('{}<source type="gen_xmltv" nocheck="1" channels="{}">\n'
.format(2 * indent, channels_filename))
f.write('{}<description>{}</description>\n'.format(3 * indent, self.xml_escape(source_name)))
for source in sources:
Expand Down Expand Up @@ -1107,11 +1111,11 @@ def makeconfig(self, configfile):
f = open(configfile, 'wb')
f.write("""<!--\r
E2m3u2bouquet supplier config file\r
Add as many suppliers as required and run the script with no parameters\r
this config file will be used and the relevant bouquets set up for all suppliers entered\r
Add as many suppliers as required and run the script with no parameters\r
this config file will be used and the relevant bouquets set up for all suppliers entered\r
0 = No/false\r
1 = Yes/true\r
For elements with <![CDATA[]] enter value between brackets e.g. <![CDATA[mypassword]]>\r
For elements with <![CDATA[]] enter value between brackets e.g. <![CDATA[mypassword]]>\r
-->\r
<config>\r
<supplier>\r
Expand Down

0 comments on commit 1bffffb

Please sign in to comment.