From a867acb0f8d642e62f708022fd154e4be2024e50 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 11 Jan 2021 16:21:37 +0100 Subject: [PATCH 1/2] Fix Local variable 'user' referenced before assignement --- resources/lib/service_entry.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/lib/service_entry.py b/resources/lib/service_entry.py index 8c4d9e27..cdc613e1 100644 --- a/resources/lib/service_entry.py +++ b/resources/lib/service_entry.py @@ -361,6 +361,7 @@ class Service(object): app.ACCOUNT.set_authenticated() return True + user = None while True: # Could not use settings - try to get Plex user list from plex.tv if app.ACCOUNT.plex_token: @@ -416,11 +417,15 @@ class Service(object): utils.settings('username', value=username) utils.settings('userid', value=user_id) utils.settings('accessToken', value=token) - utils.settings('plex_restricteduser', - 'true' if user.isManaged else 'false') + if user: + utils.settings('plex_restricteduser', + 'true' if user.isManaged else 'false') + app.CONN.restricted_user = user.isManaged + else: + utils.settings('plex_restricteduser', 'false') + app.CONN.restricted_user = False app.ACCOUNT.load() app.ACCOUNT.set_authenticated() - app.CONN.restricted_user = user.isManaged return True def ServiceEntryPoint(self): From 939cdd4615f8885501296d44a6cdb3b087d54867 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 11 Jan 2021 16:21:37 +0100 Subject: [PATCH 2/2] Beta and stable version bump 2.12.9 --- addon.xml | 7 +++++-- changelog.txt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index d3bf488d..e6348da3 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -83,7 +83,10 @@ Natūralioji „Plex“ integracija į „Kodi“ Prijunkite „Kodi“ prie „Plex Medija Serverio“. Šiame papildinyje daroma prielaida, kad valdote visus savo vaizdo įrašus naudodami „Plex“ (ir nė vieno su „Kodi“). Galite prarasti jau saugomus „Kodi“ vaizdo įrašų ir muzikos duomenų bazių duomenis (kadangi šis papildinys juos tiesiogiai pakeičia). Naudokite savo pačių rizika! Naudokite savo pačių rizika - version 2.12.8: + version 2.12.9: +- Fix Local variable 'user' referenced before assignement + +version 2.12.8: - version 2.12.7 for everyone version 2.12.7 (beta only): diff --git a/changelog.txt b/changelog.txt index 74cf417e..5322b44f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 2.12.9: +- Fix Local variable 'user' referenced before assignement + version 2.12.8: - version 2.12.7 for everyone