diff --git a/app/eparser/enigma/bouquets.py b/app/eparser/enigma/bouquets.py index 93a937cc..b7638b6f 100644 --- a/app/eparser/enigma/bouquets.py +++ b/app/eparser/enigma/bouquets.py @@ -89,7 +89,7 @@ class BouquetsReader: """ Class for reading and parsing bouquets. """ _ALT_PAT = re.compile(".*alternatives\\.+(.*)\\.([tv|radio]+).*") _BQ_PAT = re.compile(".*userbouquet\\.+(.*)\\.+[tv|radio].*") - _STREAM_TYPES = {"4097", "5001", "5002", "8193"} + _STREAM_TYPES = {"4097", "5001", "5002", "8193", "8739"} __slots__ = ["_path"] diff --git a/app/eparser/iptv.py b/app/eparser/iptv.py index 4dbbff2e..2c96eaa9 100644 --- a/app/eparser/iptv.py +++ b/app/eparser/iptv.py @@ -19,6 +19,7 @@ class StreamType(Enum): NONE_REC_1 = "5001" NONE_REC_2 = "5002" E_SERVICE_URI = "8193" + E_SERVICE_HLS = "8739" def parse_m3u(path, s_type, detect_encoding=True): diff --git a/app/ui/iptv.glade b/app/ui/iptv.glade index 16ebb52d..12c50eff 100644 --- a/app/ui/iptv.glade +++ b/app/ui/iptv.glade @@ -251,6 +251,9 @@ Author: Dmitriy Yefremov eServiceUri + + eServiceHLS + diff --git a/app/ui/iptv.py b/app/ui/iptv.py index 345b8375..4425032c 100644 --- a/app/ui/iptv.py +++ b/app/ui/iptv.py @@ -40,7 +40,9 @@ def get_stream_type(box): return StreamType.NONE_REC_1.value elif active == 3: return StreamType.NONE_REC_2.value - return StreamType.E_SERVICE_URI.value + elif active == 4: + return StreamType.E_SERVICE_URI.value + return StreamType.E_SERVICE_HLS.value class IptvDialog: @@ -161,6 +163,8 @@ class IptvDialog: self._stream_type_combobox.set_active(3) elif stream_type is StreamType.E_SERVICE_URI: self._stream_type_combobox.set_active(4) + elif stream_type is StreamType.E_SERVICE_HLS: + self._stream_type_combobox.set_active(5) except ValueError: self.show_info_message("Unknown stream type {}".format(s_type), Gtk.MessageType.ERROR) @@ -200,7 +204,8 @@ class IptvDialog: def on_url_changed(self, entry): url_str = entry.get_text() url = urlparse(url_str) - cond = all([url.scheme, url.netloc, url.path]) or self.get_type() == StreamType.E_SERVICE_URI.value + e_types = (StreamType.E_SERVICE_URI.value, StreamType.E_SERVICE_HLS.value) + cond = all([url.scheme, url.netloc, url.path]) or self.get_type() in e_types entry.set_name("GtkEntry" if cond else _DIGIT_ENTRY_NAME) yt_id = YouTube.get_yt_id(url_str) @@ -251,7 +256,7 @@ class IptvDialog: yield True def on_stream_type_changed(self, item): - if self.get_type() == StreamType.E_SERVICE_URI.value: + if self.get_type() in (StreamType.E_SERVICE_URI.value, StreamType.E_SERVICE_HLS.value): self.show_info_message("DreamOS only!", Gtk.MessageType.WARNING) self.update_reference_entry()