Fix loading shows with empty channels.
This commit is contained in:
parent
3f89a3cd32
commit
d44d417a06
1 changed files with 4 additions and 2 deletions
|
@ -265,8 +265,10 @@ class Player:
|
|||
plan = sync(self.api.get_showplan(message))
|
||||
self.clear_channel_plan()
|
||||
channel = self.state.get()["channel"]
|
||||
self.logger.log.info(plan)
|
||||
if len(plan) > channel:
|
||||
self.logger.log.debug(plan)
|
||||
if not isinstance(plan, dict):
|
||||
return False
|
||||
if str(channel) in plan.keys():
|
||||
for plan_item in plan[str(channel)]:
|
||||
try:
|
||||
self.add_to_plan(plan_item)
|
||||
|
|
Loading…
Reference in a new issue