Merge nested if condition

This commit is contained in:
Brian Pepple 2020-09-27 11:16:48 -04:00 committed by Odd Stråbø
parent e7e6fbdd31
commit 5e188e63dd

View file

@ -341,20 +341,21 @@ class Library(threading.Thread):
return True
if settings('SyncInstallRunDone.bool'):
if settings('kodiCompanion.bool'):
if settings('SyncInstallRunDone.bool') and settings(
'kodiCompanion.bool'
):
if self.server.jellyfin.check_companion_installed():
if self.server.jellyfin.check_companion_installed():
if not self.fast_sync():
dialog("ok", "{jellyfin}", translate(33128))
if not self.fast_sync():
dialog("ok", "{jellyfin}", translate(33128))
raise Exception("Failed to retrieve latest updates")
raise Exception("Failed to retrieve latest updates")
LOG.info("--<[ retrieve changes ]")
LOG.info("--<[ retrieve changes ]")
else:
raise LibraryException('CompanionMissing')
else:
raise LibraryException('CompanionMissing')
return True
except LibraryException as error: