mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Hoist repeated code outside conditional statement
This commit is contained in:
parent
5b1e4c7eab
commit
dd77969a79
1 changed files with 1 additions and 4 deletions
|
@ -832,17 +832,14 @@ class Views(object):
|
||||||
window_prop = "Jellyfin.wnodes.%s" % index
|
window_prop = "Jellyfin.wnodes.%s" % index
|
||||||
window('%s.index' % window_prop, path.replace('all.xml', "")) # dir
|
window('%s.index' % window_prop, path.replace('all.xml', "")) # dir
|
||||||
window('%s.title' % window_prop, view['Name'])
|
window('%s.title' % window_prop, view['Name'])
|
||||||
window('%s.content' % window_prop, path)
|
|
||||||
|
|
||||||
elif node == 'browse':
|
elif node == 'browse':
|
||||||
|
|
||||||
window_prop = "Jellyfin.wnodes.%s" % index
|
window_prop = "Jellyfin.wnodes.%s" % index
|
||||||
window('%s.title' % window_prop, view['Name'])
|
window('%s.title' % window_prop, view['Name'])
|
||||||
window('%s.content' % window_prop, path)
|
|
||||||
else:
|
else:
|
||||||
window_prop = "Jellyfin.wnodes.%s.%s" % (index, node)
|
window_prop = "Jellyfin.wnodes.%s.%s" % (index, node)
|
||||||
window('%s.title' % window_prop, node_label)
|
window('%s.title' % window_prop, node_label)
|
||||||
window('%s.content' % window_prop, path)
|
window('%s.content' % window_prop, path)
|
||||||
|
|
||||||
window('%s.id' % window_prop, view['Id'])
|
window('%s.id' % window_prop, view['Id'])
|
||||||
window('%s.path' % window_prop, window_path)
|
window('%s.path' % window_prop, window_path)
|
||||||
|
|
Loading…
Reference in a new issue