Hoist repeated code outside conditional statement

This commit is contained in:
Brian Pepple 2020-09-27 11:20:32 -04:00 committed by Odd Stråbø
parent 5b1e4c7eab
commit dd77969a79

View file

@ -832,13 +832,10 @@ class Views(object):
window_prop = "Jellyfin.wnodes.%s" % index
window('%s.index' % window_prop, path.replace('all.xml', "")) # dir
window('%s.title' % window_prop, view['Name'])
window('%s.content' % window_prop, path)
elif node == 'browse':
window_prop = "Jellyfin.wnodes.%s" % index
window('%s.title' % window_prop, view['Name'])
window('%s.content' % window_prop, path)
else:
window_prop = "Jellyfin.wnodes.%s.%s" % (index, node)
window('%s.title' % window_prop, node_label)