From 6076011d1cf71fc1eb6b5258421477343fb62376 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 21 Jan 2021 15:20:28 -0500 Subject: [PATCH] Make alt_epg loading more abstract --- alternative_epg/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/alternative_epg/__init__.py b/alternative_epg/__init__.py index 80c148d..80d47ae 100644 --- a/alternative_epg/__init__.py +++ b/alternative_epg/__init__.py @@ -1,3 +1,7 @@ -# pylama:ignore=W0401,W0611 -from .zap2it import * -from .tvtv import * +import os + +alt_epg_top_dir = os.path.dirname(__file__) +for entry in os.scandir(alt_epg_top_dir): + if entry.is_dir() and not entry.is_file() and entry.name[0] != '_': + imp_string = "from .%s import *" % entry.name + exec(imp_string)