From 61e4056a1320f45ab7b0a6985403b86b1e0c0fc0 Mon Sep 17 00:00:00 2001 From: croneter Date: Wed, 29 Jul 2020 17:42:04 +0200 Subject: [PATCH 1/5] Fix UnboundLocalError when certain Plex sections are deleted or un-synced --- resources/lib/library_sync/sections.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/library_sync/sections.py b/resources/lib/library_sync/sections.py index da97e455..46af7e24 100644 --- a/resources/lib/library_sync/sections.py +++ b/resources/lib/library_sync/sections.py @@ -526,6 +526,9 @@ def _delete_kodi_db_items(section): types = ((v.PLEX_TYPE_ARTIST, itemtypes.Artist), (v.PLEX_TYPE_ALBUM, itemtypes.Album), (v.PLEX_TYPE_SONG, itemtypes.Song)) + else: + types = () + LOG.debug('Skipping deletion of DB elements for section %s', section) for plex_type, context in types: while True: with PlexDB() as plexdb: From 06cc2b6cde9792893b4ddd3113c8b39a2759edbf Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Sep 2020 14:40:00 +0200 Subject: [PATCH 2/5] Fix ValueError: invalid literal for int() with base 10 during show sync --- resources/lib/library_sync/fill_metadata_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/library_sync/fill_metadata_queue.py b/resources/lib/library_sync/fill_metadata_queue.py index d4f5a00e..492db28c 100644 --- a/resources/lib/library_sync/fill_metadata_queue.py +++ b/resources/lib/library_sync/fill_metadata_queue.py @@ -42,7 +42,7 @@ class FillMetadataQueue(common.LibrarySyncMixin, checksum = int('{}{}'.format( plex_id, xml.get('updatedAt', - xml.get('addedAt', '1541572987')))) + xml.get('addedAt', '1541572987')).replace('-', ''))) if (not self.repair and plexdb.checksum(plex_id, section.plex_type) == checksum): continue From 4f9f7bc7c98a97139e136c8d21c6d98750039209 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Sep 2020 15:21:02 +0200 Subject: [PATCH 3/5] Fix playback failing due to caching of subtitles with non-ascii chars --- resources/lib/plex_api/media.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/resources/lib/plex_api/media.py b/resources/lib/plex_api/media.py index 60353d7c..e6eb7a59 100644 --- a/resources/lib/plex_api/media.py +++ b/resources/lib/plex_api/media.py @@ -261,10 +261,19 @@ class Media(object): if int(stream.get('streamType')) != 3 or 'key' not in stream.attrib: # Not a subtitle or not not an external subtitle continue - path = self.download_external_subtitles( - '{server}%s' % stream.get('key'), - stream.get('displayTitle'), - stream.get('codec')) + try: + path = self.download_external_subtitles( + '{server}%s' % stream.get('key'), + stream.get('displayTitle'), + stream.get('codec')) + except IOError: + # Catch "IOError: [Errno 22] invalid mode ('wb') or filename" + # Due to stream.get('displayTitle') returning chars that our + # OS is not supporting, e.g. "српски језик (SRT External)" + path = self.download_external_subtitles( + '{server}%s' % stream.get('key'), + stream.get('languageCode', 'Unknown'), + stream.get('codec')) if path: externalsubs.append(path) LOG.info('Found external subs: %s', externalsubs) From 548be35c104be6158547e0c28b94e71226cb0dd0 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Sep 2020 20:37:23 +0200 Subject: [PATCH 4/5] Update readme to reflect new installation method --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 257a3a12..f8f20ba0 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Unfortunately, the PKC Kodi repository had to move because it stopped working (t ### Download and Installation -Install PKC via the PlexKodiConnect Kodi repository download button just below (do NOT use the standard GitHub download!). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation) for a detailed guide. Please use the stable version except if you really know what you're doing. Kodi will update PKC automatically. +Install PKC via the PlexKodiConnect Kodi repository download button just below (do NOT use the standard GitHub download!). Alternatively, add [https://croneter.github.io/pkc-source](https://croneter.github.io/pkc-source) as a new Kodi `Web server directory (HTTPS)` source. See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation) for a detailed guide. Please use the stable version except if you really know what you're doing. Kodi will update PKC automatically. | Stable version | Beta version | |----------------|--------------| From d192f924b5b7505ee42711f13cd7c992f5a803f2 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Sep 2020 20:42:21 +0200 Subject: [PATCH 5/5] Stable and beta version bump 2.12.3 --- README.md | 4 ++-- addon.xml | 10 ++++++++-- changelog.txt | 6 ++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 257a3a12..b8b0ff7e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![stable version](https://img.shields.io/badge/stable_version-2.12.2-blue.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/stable/repository.plexkodiconnect/repository.plexkodiconnect-1.0.2.zip) -[![beta version](https://img.shields.io/badge/beta_version-2.12.2-red.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/beta/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.2.zip) +[![stable version](https://img.shields.io/badge/stable_version-2.12.3-blue.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/stable/repository.plexkodiconnect/repository.plexkodiconnect-1.0.2.zip) +[![beta version](https://img.shields.io/badge/beta_version-2.12.3-red.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/beta/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.2.zip) [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) diff --git a/addon.xml b/addon.xml index 963f2ca8..2ebc9724 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -83,7 +83,13 @@ 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.2: + version 2.12.3: +- Fix playback failing due to caching of subtitles with non-ascii chars +- Fix ValueError: invalid literal for int() with base 10 during show sync +- Fix UnboundLocalError when certain Plex sections are deleted or being un-synched +- New method to install PlexKodiConnect directly via an URL. You thus do not need to upload a ZIP file to Kodi anymore. + +version 2.12.2: - version 2.12.0 and 2.12.1 for everyone - Fix regression: sync dialog not showing up when it should diff --git a/changelog.txt b/changelog.txt index b9eb38c3..85efdfe0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +version 2.12.3: +- Fix playback failing due to caching of subtitles with non-ascii chars +- Fix ValueError: invalid literal for int() with base 10 during show sync +- Fix UnboundLocalError when certain Plex sections are deleted or being un-synched +- New method to install PlexKodiConnect directly via an URL. You thus do not need to upload a ZIP file to Kodi anymore. + version 2.12.2: - version 2.12.0 and 2.12.1 for everyone - Fix regression: sync dialog not showing up when it should