diff --git a/origin/origin_channels.py b/origin/origin_channels.py index 744061e..ab84139 100644 --- a/origin/origin_channels.py +++ b/origin/origin_channels.py @@ -13,7 +13,11 @@ class OriginChannels(): unfiltered_chan_json = urlopn.json() self.fhdhr.logger.info("Found %s Total Channels Lists" % len(unfiltered_chan_json)) - filtered_chan_json = unfiltered_chan_json.copy() + filter_dict = { + "country": [], + "language": [] + } + for filter in ["country", "language"]: filterconf = self.fhdhr.config.dict["origin"]["filter_%s" % filter] @@ -21,10 +25,12 @@ class OriginChannels(): if isinstance(filterconf, str): filterconf = [filterconf] self.fhdhr.logger.info("Found %s Enabled %s Filters" % (len(filterconf), filter)) - print(filterconf) + filter_dict[filter].extend(filterconf) else: self.fhdhr.logger.info("Found No Enabled %s Filters" % (filter)) + print(filter_dict) + return channel_list = []