added additional yt link checking (#170)

This commit is contained in:
DYefremov
2023-04-06 14:55:30 +03:00
parent 95a1732f01
commit 7b002b208f

View File

@@ -219,7 +219,7 @@ class IptvDialog:
# URL.
url = unquote(data[10].strip())
sch = urlparse(url).scheme.upper()
if sch in _URL_PREFIXES:
if YouTube.get_yt_id(url) and sch in _URL_PREFIXES:
active_prefix = _URL_PREFIXES.get(sch)
url = re.sub(active_prefix, "", url, 1, re.IGNORECASE)
self._url_prefix_combobox.set_active_id(active_prefix)