File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,20 @@ def copy_default(default, theme):
5454
5555def load_theme ():
5656 global THEME_DATA
57+ theme_path = Path ("res/themes/" + CONFIG_DATA ['config' ]['THEME' ])
5758 try :
58- theme_path = Path ("res/themes/" + CONFIG_DATA ['config' ]['THEME' ])
5959 logger .info ("Loading theme %s from %s" % (CONFIG_DATA ['config' ]['THEME' ], theme_path / "theme.yaml" ))
6060 THEME_DATA = load_yaml (MAIN_DIRECTORY / theme_path / "theme.yaml" )
6161 THEME_DATA ['PATH' ] = str (MAIN_DIRECTORY / theme_path ) + "/"
6262 except :
63+ if CONFIG_DATA .get ("display" , {}).get ("REVISION" ) == "A_HID" :
64+ logger .warning (
65+ "Classic YAML theme '%s' is not available in this package; using default fallback for SmartMonitor HID mode" ,
66+ CONFIG_DATA ['config' ]['THEME' ],
67+ )
68+ THEME_DATA = dict (THEME_DEFAULT )
69+ THEME_DATA ['PATH' ] = str (MAIN_DIRECTORY / "res/themes" ) + "/"
70+ return
6371 logger .error ("Theme not found or contains errors!" )
6472 try :
6573 sys .exit (0 )
You can’t perform that action at this time.
0 commit comments