From 1e98e30c9d4ce115623cef00357f6f65cb2b803d Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 21 Oct 2020 15:46:46 -0400 Subject: [PATCH] float channel numbers for matching --- fHDHR/api/hub/device/epg.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fHDHR/api/hub/device/epg.py b/fHDHR/api/hub/device/epg.py index f22b1fb..69921a7 100644 --- a/fHDHR/api/hub/device/epg.py +++ b/fHDHR/api/hub/device/epg.py @@ -73,7 +73,13 @@ class EPG(): func_to_call = getattr(method_to_call, 'update_epg') programguide = func_to_call() + for chan in list(programguide.keys()): + floatnum = str(float(chan)) + programguide[floatnum] = programguide.pop(chan) + programguide[floatnum]["number"] = floatnum + programguide = OrderedDict(sorted(programguide.items())) + for cnum in programguide: programguide[cnum]["listing"] = sorted(programguide[cnum]["listing"], key=lambda i: i['time_start'])