diff --git a/fHDHR/origin/origin_epg.py b/fHDHR/origin/origin_epg.py index 76fe72a..4849c5e 100644 --- a/fHDHR/origin/origin_epg.py +++ b/fHDHR/origin/origin_epg.py @@ -78,13 +78,15 @@ class OriginEPG(): timedict = self.get_prog_timedict(program_dict["startDate"], nextprog_dict["startDate"]) + try: + subtitle = program_dict["name"] + except KeyError: + subtitle = "Unavailable" + try: title = program_dict["info"]["fullname"] except KeyError: - try: - title = program_dict["name"] - except KeyError: - title = "Unavailable" + title = subtitle clean_prog_dict = { "time_start": timedict['time_start'], @@ -92,7 +94,7 @@ class OriginEPG(): "duration_minutes": timedict["duration"], "thumbnail": program_dict["info"]["image"], "title": title, - "sub-title": program_dict["name"], + "sub-title": subtitle, "description": "Unavailable", "rating": "N/A", "episodetitle": None,