mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Removed else statements from loops without breaks
This commit is contained in:
parent
98c86304fe
commit
cc899931ed
4 changed files with 12 additions and 11 deletions
|
@ -260,8 +260,8 @@ class ConnectionManager(object):
|
|||
}
|
||||
|
||||
servers.append(info)
|
||||
else:
|
||||
return servers
|
||||
|
||||
return servers
|
||||
|
||||
# TODO: Make IPv6 compatable
|
||||
def _convert_endpoint_address_to_manual_address(self, info):
|
||||
|
|
|
@ -111,9 +111,9 @@ class Credentials(object):
|
|||
existing['ConnectServerId'] = server['ConnectServerId']
|
||||
|
||||
return existing
|
||||
else:
|
||||
servers.append(server)
|
||||
return server
|
||||
|
||||
servers.append(server)
|
||||
return server
|
||||
|
||||
def _date_object(self, date):
|
||||
# Convert string to date
|
||||
|
|
|
@ -242,8 +242,8 @@ class Views(object):
|
|||
temp_view['Media'] = media
|
||||
self.add_playlist(playlist_path, temp_view, True)
|
||||
self.add_nodes(node_path, temp_view, True)
|
||||
else: # Compensate for the duplicate.
|
||||
index += 1
|
||||
|
||||
index += 1 # Compensate for the duplicate.
|
||||
else:
|
||||
if view['Media'] in ('movies', 'tvshows', 'musicvideos'):
|
||||
self.add_playlist(playlist_path, view)
|
||||
|
@ -743,9 +743,10 @@ class Views(object):
|
|||
temp_view['Name'] = "%s (%s)" % (view['Name'], translate(media))
|
||||
self.window_node(index, temp_view, *node)
|
||||
self.window_wnode(windex, temp_view, *node)
|
||||
else: # Add one to compensate for the duplicate.
|
||||
index += 1
|
||||
windex += 1
|
||||
|
||||
# Add one to compensate for the duplicate.
|
||||
index += 1
|
||||
windex += 1
|
||||
else:
|
||||
for node in NODES[view['Media']]:
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ from helper import LazyLogger # noqa: F402
|
|||
#################################################################################################
|
||||
|
||||
LOG = LazyLogger(__name__)
|
||||
DELAY = int(settings('startupDelay') if settings('SyncInstallRunDone.bool') else 4 or 0)
|
||||
DELAY = int(settings('startupDelay') if settings('SyncInstallRunDone.bool') else 4)
|
||||
|
||||
#################################################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue