From cd47fa0a3f6adda21c0ef771f9eac768f9654f7b Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 7 Jan 2021 08:40:25 -0500 Subject: [PATCH] Add Better EPG Logging --- fHDHR/device/epg/__init__.py | 7 ++++++- fHDHR/device/tuners/__init__.py | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fHDHR/device/epg/__init__.py b/fHDHR/device/epg/__init__.py index 7692199..fa6e554 100644 --- a/fHDHR/device/epg/__init__.py +++ b/fHDHR/device/epg/__init__.py @@ -278,16 +278,21 @@ class EPG(): programguide[cnum]["listing"][prog_index]["thumbnail"] = programguide[cnum]["thumbnail"] prog_index += 1 + # Get Totals + total_channels = len(list(programguide.keys())) + total_programs = 0 + # Sort the channels sorted_channel_list = channel_sort(list(programguide.keys())) sorted_chan_guide = {} for channel in sorted_channel_list: + total_programs += len(programguide[cnum]["listing"]) sorted_chan_guide[channel] = programguide[channel] self.epgdict[method] = sorted_chan_guide self.fhdhr.db.set_fhdhr_value("epg_dict", method, programguide) self.fhdhr.db.set_fhdhr_value("update_time", method, time.time()) - self.fhdhr.logger.info("Wrote " + epgtypename + " EPG cache.") + self.fhdhr.logger.info("Wrote %s EPG cache. %s Programs for %s Channels" % (epgtypename, total_programs, total_channels)) def run(self): time.sleep(1800) diff --git a/fHDHR/device/tuners/__init__.py b/fHDHR/device/tuners/__init__.py index c089757..d4ed0d9 100644 --- a/fHDHR/device/tuners/__init__.py +++ b/fHDHR/device/tuners/__init__.py @@ -99,9 +99,6 @@ class Tuners(): stream_info = {"url": stream_info} stream_args["stream_info"] = stream_info - if "quality_from_origin" not in list(stream_args["stream_info"].keys()): - stream_args["stream_info"]["quality_from_origin"] = False - if stream_args["stream_info"]["url"].startswith("udp://"): stream_args["true_content_type"] = "video/mpeg" stream_args["content_type"] = "video/mpeg"