From 4916bbb46e992fca3a3f41ccfc876de10733d876 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 30 Apr 2021 10:22:11 +0200 Subject: [PATCH 1/4] Fix a rare AttributeError when using playlists --- resources/lib/playlist_func.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index c5aee32f..c5def585 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -410,9 +410,9 @@ def _get_playListVersion_from_xml(playlist, xml): Raises PlaylistError if unsuccessful """ - playlist.version = utils.cast(int, - xml.get('%sVersion' % playlist.kind)) - if playlist.version is None: + try: + playlist.version = int(xml.get('%sVersion' % playlist.kind)) + except (AttributeError, TypeError): raise PlaylistError('Could not get new playlist Version for playlist ' '%s' % playlist) @@ -424,6 +424,8 @@ def get_playlist_details_from_xml(playlist, xml): Raises PlaylistError if something went wrong. """ + if xml is None: + raise PlaylistError('No playlist received for playlist %s' % playlist) playlist.id = utils.cast(int, xml.get('%sID' % playlist.kind)) playlist.version = utils.cast(int, @@ -711,8 +713,8 @@ def delete_playlist_item_from_PMS(playlist, pos): playlist.items[pos].id, playlist.repeat), action_type="DELETE") - _get_playListVersion_from_xml(playlist, xml) del playlist.items[pos] + _get_playListVersion_from_xml(playlist, xml) # Functions operating on the Kodi playlist objects ########## From c29be48cacb73bb6e453ad1d359db85af8531e3b Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 2 May 2021 14:35:24 +0200 Subject: [PATCH 2/4] Fix Alexa and RuntimeError: dictionary keys changed during iteration --- resources/lib/companion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/companion.py b/resources/lib/companion.py index bb068159..910d1dec 100644 --- a/resources/lib/companion.py +++ b/resources/lib/companion.py @@ -49,7 +49,7 @@ def convert_alexa_to_companion(dictionary): """ The params passed by Alexa must first be converted to Companion talk """ - for key in dictionary: + for key in list(dictionary): if key in v.ALEXA_TO_COMPANION: dictionary[v.ALEXA_TO_COMPANION[key]] = dictionary[key] del dictionary[key] From 019bd1aeae325f46d50659ea0e8adb2e8d2cc5a2 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 14 May 2021 09:17:26 +0200 Subject: [PATCH 3/4] Beta version bump 2.12.23 --- addon.xml | 8 ++++++-- changelog.txt | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index f2128bf3..29eb1658 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -88,7 +88,11 @@ Plex를 Kodi에 기본 통합 Kodi를 Plex Media Server에 연결합니다. 이 플러그인은 Plex로 모든 비디오를 관리하고 Kodi로는 관리하지 않는다고 가정합니다. Kodi 비디오 및 음악 데이터베이스에 이미 저장된 데이터가 손실 될 수 있습니다 (이 플러그인이 직접 변경하므로). 자신의 책임하에 사용하십시오! 자신의 책임하에 사용 - version 2.12.22: + version 2.12.23 (beta only): +- Fix Alexa and RuntimeError: dictionary keys changed during iteration +- Fix a rare AttributeError when using playlists + +version 2.12.22: - version 2.12.20 and 2.12.21 for everyone version 2.12.21 (beta only): diff --git a/changelog.txt b/changelog.txt index dea04e2b..d4b98570 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +version 2.12.23 (beta only): +- Fix Alexa and RuntimeError: dictionary keys changed during iteration +- Fix a rare AttributeError when using playlists + version 2.12.22: - version 2.12.20 and 2.12.21 for everyone From d38fe789b3eba94f7865732ddd253310201e4c3b Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 23 May 2021 08:03:45 +0200 Subject: [PATCH 4/4] Beta and stable version bump 2.12.24 --- addon.xml | 7 +++++-- changelog.txt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index 29eb1658..3d09b15d 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -88,7 +88,10 @@ Plex를 Kodi에 기본 통합 Kodi를 Plex Media Server에 연결합니다. 이 플러그인은 Plex로 모든 비디오를 관리하고 Kodi로는 관리하지 않는다고 가정합니다. Kodi 비디오 및 음악 데이터베이스에 이미 저장된 데이터가 손실 될 수 있습니다 (이 플러그인이 직접 변경하므로). 자신의 책임하에 사용하십시오! 자신의 책임하에 사용 - version 2.12.23 (beta only): + version 2.12.24: +- version 2.12.23 for everyone + +version 2.12.23 (beta only): - Fix Alexa and RuntimeError: dictionary keys changed during iteration - Fix a rare AttributeError when using playlists diff --git a/changelog.txt b/changelog.txt index d4b98570..15b49a6c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 2.12.24: +- version 2.12.23 for everyone + version 2.12.23 (beta only): - Fix Alexa and RuntimeError: dictionary keys changed during iteration - Fix a rare AttributeError when using playlists