From 57e0a6a88a95f4794405e79b721ad232cf22f9fb Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 16 Dec 2020 09:25:57 -0500 Subject: [PATCH] test --- fHDHR_web/api/startup_tasks.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/fHDHR_web/api/startup_tasks.py b/fHDHR_web/api/startup_tasks.py index 8191dbe..66bb9a4 100644 --- a/fHDHR_web/api/startup_tasks.py +++ b/fHDHR_web/api/startup_tasks.py @@ -18,18 +18,16 @@ class Startup_Tasks(): # Hit Channel Update API URL without waiting unless we've never scanned before haseverscanned = self.fhdhr.db.get_fhdhr_value("channels", "scanned_time") + updatechannels = False if not haseverscanned: - self.fhdhr.web.session.get(self.channel_update_url) + updatechannels = True elif self.fhdhr.config.dict["fhdhr"]["chanscan_on_start"]: - try: - self.fhdhr.web.session.get(self.channel_update_url, timeout=0.0000000001) - except self.fhdhr.web.exceptions.ReadTimeout: - pass + updatechannels = True + + if updatechannels: + self.fhdhr.api.client.get(self.channel_update_url, timeout=0.0000000001) # Hit EPG Update API URL without waiting - try: - self.fhdhr.web.session.get(self.epg_update_url, timeout=0.0000000001) - except self.fhdhr.web.exceptions.ReadTimeout: - pass + self.fhdhr.api.client.get(self.epg_update_url, timeout=0.0000000001) return "Success"