Fix complex entries for shows
This commit is contained in:
parent
2f1b232023
commit
1f508f9b27
2 changed files with 9 additions and 9 deletions
|
@ -2,7 +2,7 @@
|
|||
shows:
|
||||
- "College Football":
|
||||
- "Conan":
|
||||
- "Dirk Gently's Holistic Detective Agency":
|
||||
- series: "Dirk Gently's Holistic Detective Agency"
|
||||
short: "Dirk Gently"
|
||||
host: "wavehh.lassitu.de:30080"
|
||||
proxies:
|
||||
|
|
|
@ -68,15 +68,15 @@ class Config:
|
|||
setattr(self, key, y[key])
|
||||
|
||||
for show in self.shows:
|
||||
for key in show:
|
||||
if isinstance(key, dict):
|
||||
value = show[key]
|
||||
if value and 'short' in value:
|
||||
IncludeShow(key, value['short'])
|
||||
else:
|
||||
IncludeShow(key)
|
||||
if isinstance(show, dict):
|
||||
if 'short' in show and 'series' in show:
|
||||
IncludeShow(show['series'], show['short'])
|
||||
else:
|
||||
IncludeShow(key)
|
||||
logger.error("Need either a string or a dict with 'series' and 'short' entries for a show, got \"{}\".".format\
|
||||
(show))
|
||||
sys.exit(1)
|
||||
else:
|
||||
IncludeShow(key)
|
||||
|
||||
def __repr__(self):
|
||||
return "Config options for tivomirror (singleton)"
|
||||
|
|
Loading…
Reference in a new issue