This commit is contained in:
deathbybandaid 2020-12-16 09:25:57 -05:00
parent 270d631a24
commit 57e0a6a88a

View File

@ -18,18 +18,16 @@ class Startup_Tasks():
# Hit Channel Update API URL without waiting unless we've never scanned before # Hit Channel Update API URL without waiting unless we've never scanned before
haseverscanned = self.fhdhr.db.get_fhdhr_value("channels", "scanned_time") haseverscanned = self.fhdhr.db.get_fhdhr_value("channels", "scanned_time")
updatechannels = False
if not haseverscanned: if not haseverscanned:
self.fhdhr.web.session.get(self.channel_update_url) updatechannels = True
elif self.fhdhr.config.dict["fhdhr"]["chanscan_on_start"]: elif self.fhdhr.config.dict["fhdhr"]["chanscan_on_start"]:
try: updatechannels = True
self.fhdhr.web.session.get(self.channel_update_url, timeout=0.0000000001)
except self.fhdhr.web.exceptions.ReadTimeout: if updatechannels:
pass self.fhdhr.api.client.get(self.channel_update_url, timeout=0.0000000001)
# Hit EPG Update API URL without waiting # Hit EPG Update API URL without waiting
try: self.fhdhr.api.client.get(self.epg_update_url, timeout=0.0000000001)
self.fhdhr.web.session.get(self.epg_update_url, timeout=0.0000000001)
except self.fhdhr.web.exceptions.ReadTimeout:
pass
return "Success" return "Success"