Skip to content

Commit 65db3fc

Browse files
committed
fix errors loading shortcuts without banners
1 parent cab31d2 commit 65db3fc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

chimera_app/server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,15 @@ def edit(platform, name):
276276
shortcuts = PlatformShortcutsFile(platform)
277277
shortcut = shortcuts.get_shortcut_match(name)
278278

279+
banner = ""
279280
if 'banner' in shortcut:
280281
filename = os.path.basename(shortcut['banner'])
281282
banner = f'/images/banner/{platform}/{filename}'
282283

284+
hidden = False
285+
if not remote and 'hidden' in shortcut:
286+
hidden = shortcut['hidden']
287+
283288
return template('new.tpl',
284289
isNew=False,
285290
isEditing=True,
@@ -288,7 +293,7 @@ def edit(platform, name):
288293
platformName=PLATFORMS[platform]['name'],
289294
name=name,
290295
content_id=name,
291-
hidden=shortcut['hidden'],
296+
hidden=hidden,
292297
banner=banner,
293298
steamShortcutID=(get_bpmbanner_id(platform, name) if remoteLaunchEnabled else None),
294299
content_share_only=CONTENT_SHARE_ONLY,

0 commit comments

Comments
 (0)