diff --git a/README.md b/README.md index 257a3a12..5674063e 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) @@ -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 | |----------------|--------------| 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 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 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: 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)