From a399660a15b8b48c493767194b80d22a0d5f40c4 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Sun, 19 Aug 2018 10:55:41 +0300 Subject: [PATCH] fixed get url for iptv --- app/ui/main_helper.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/ui/main_helper.py b/app/ui/main_helper.py index 70bff152..7f9ce42c 100644 --- a/app/ui/main_helper.py +++ b/app/ui/main_helper.py @@ -543,9 +543,11 @@ def append_text_to_tview(char, view): def get_iptv_url(row, profile): """ Returns url from iptv type row """ data = row[7].split(":" if profile is Profile.ENIGMA_2 else "::") - url = data[-3 if profile is Profile.ENIGMA_2 else 0] - - return url.replace("%3a", ":") if profile is Profile.ENIGMA_2 else url + if profile is Profile.ENIGMA_2: + data = list(filter(lambda x: "http" in x, data)) + if data: + url = data[0] + return url.replace("%3a", ":") if profile is Profile.ENIGMA_2 else url if __name__ == "__main__":