diff --git a/addon.xml b/addon.xml index f2128bf3..3d09b15d 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -88,7 +88,14 @@ Plex를 Kodi에 기본 통합 Kodi를 Plex Media Server에 연결합니다. 이 플러그인은 Plex로 모든 비디오를 관리하고 Kodi로는 관리하지 않는다고 가정합니다. Kodi 비디오 및 음악 데이터베이스에 이미 저장된 데이터가 손실 될 수 있습니다 (이 플러그인이 직접 변경하므로). 자신의 책임하에 사용하십시오! 자신의 책임하에 사용 - version 2.12.22: + 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 + +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..15b49a6c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,10 @@ +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 + version 2.12.22: - version 2.12.20 and 2.12.21 for everyone 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] 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 ##########