From f12b58406ba778c524564efd4745a1c795dc777b Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 14 Mar 2021 09:50:19 -0400 Subject: [PATCH 1/2] Fix formatting on multiline if statement --- jellyfin_kodi/database/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jellyfin_kodi/database/__init__.py b/jellyfin_kodi/database/__init__.py index ca80bc3c..44a976e2 100644 --- a/jellyfin_kodi/database/__init__.py +++ b/jellyfin_kodi/database/__init__.py @@ -117,8 +117,8 @@ class Database(object): for db_file in reversed(files): if (db_file.startswith(database) and not db_file.endswith('-wal') - and not db_file.endswith('-shm') - and not db_file.endswith('db-journal')): + and not db_file.endswith('-shm') + and not db_file.endswith('db-journal')): version_string = re.search('{}(.*).db'.format(database), db_file) version = int(version_string.group(1)) From d3d4996d0dbb98ac4f5d9e6be5c083c5b12dd8e2 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 14 Mar 2021 19:09:10 -0400 Subject: [PATCH 2/2] Split if statement evenly --- jellyfin_kodi/database/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jellyfin_kodi/database/__init__.py b/jellyfin_kodi/database/__init__.py index 44a976e2..6371d888 100644 --- a/jellyfin_kodi/database/__init__.py +++ b/jellyfin_kodi/database/__init__.py @@ -116,7 +116,8 @@ class Database(object): target = {'db_file': '', 'version': 0} for db_file in reversed(files): - if (db_file.startswith(database) and not db_file.endswith('-wal') + if (db_file.startswith(database) + and not db_file.endswith('-wal') and not db_file.endswith('-shm') and not db_file.endswith('db-journal')):