This commit is contained in:
deathbybandaid 2020-12-09 09:04:40 -05:00
parent f8a1de743d
commit 3e38cc3a47

View File

@ -13,7 +13,11 @@ class OriginChannels():
unfiltered_chan_json = urlopn.json() unfiltered_chan_json = urlopn.json()
self.fhdhr.logger.info("Found %s Total Channels Lists" % len(unfiltered_chan_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"]: for filter in ["country", "language"]:
filterconf = self.fhdhr.config.dict["origin"]["filter_%s" % filter] filterconf = self.fhdhr.config.dict["origin"]["filter_%s" % filter]
@ -21,10 +25,12 @@ class OriginChannels():
if isinstance(filterconf, str): if isinstance(filterconf, str):
filterconf = [filterconf] filterconf = [filterconf]
self.fhdhr.logger.info("Found %s Enabled %s Filters" % (len(filterconf), filter)) self.fhdhr.logger.info("Found %s Enabled %s Filters" % (len(filterconf), filter))
print(filterconf) filter_dict[filter].extend(filterconf)
else: else:
self.fhdhr.logger.info("Found No Enabled %s Filters" % (filter)) self.fhdhr.logger.info("Found No Enabled %s Filters" % (filter))
print(filter_dict)
return return
channel_list = [] channel_list = []