From 0e1ea79f3cf5db44078f24a9029335e07932550e Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 2 Feb 2019 15:52:11 +0100 Subject: [PATCH 1/2] Stable and beta version bump 2.6.3 --- README.md | 4 ++-- addon.xml | 7 +++++-- changelog.txt | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 25b29ded..1f17b037 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![stable version](https://img.shields.io/badge/stable_version-2.6.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.6.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.6.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.6.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 112693c9..3a238aee 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -77,7 +77,10 @@ Нативна інтеграція Plex в Kodi Підключає Kodi до серверу Plex. Цей плагін передбачає, що ви керуєте всіма своїми відео за допомогою Plex (і ніяк не Kodi). Ви можете втратити дані, які вже зберігаються у відео та музичних БД Kodi (оскільки цей плагін безпосередньо їх змінює). Використовуйте на свій страх і ризик! Використовуйте на свій ризик - version 2.6.2: + version 2.6.3: +- Fix PKC crashing on Xbox + +version 2.6.2: - Fix playlist sync: sequence item 0: expected string or unicode - Fix PKC not deleting all the items it should - Fix keyError 'sessionKey' for weird PMS messages diff --git a/changelog.txt b/changelog.txt index 8cc2ac14..f5610858 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 2.6.3: +- Fix PKC crashing on Xbox + version 2.6.2: - Fix playlist sync: sequence item 0: expected string or unicode - Fix PKC not deleting all the items it should From 6c8b17d7b83a0a5340860ae5520f7081e932bcaf Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 2 Feb 2019 15:49:21 +0100 Subject: [PATCH 2/2] Fix PKC crashing on Xbox --- resources/lib/library_sync/__init__.py | 4 ++-- resources/lib/library_sync/common.py | 5 ++++- resources/lib/library_sync/full_sync.py | 10 +++------- resources/lib/library_sync/websocket.py | 8 +++++--- resources/lib/sync.py | 5 +++-- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/resources/lib/library_sync/__init__.py b/resources/lib/library_sync/__init__.py index 2d5d4d55..0c4f23ea 100644 --- a/resources/lib/library_sync/__init__.py +++ b/resources/lib/library_sync/__init__.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals -from .full_sync import start, PLAYLIST_SYNC_ENABLED +from .full_sync import start from .time import sync_pms_time from .websocket import store_websocket_message, process_websocket_messages, \ WEBSOCKET_MESSAGES, PLAYSTATE_SESSIONS -from .common import update_kodi_library +from .common import update_kodi_library, PLAYLIST_SYNC_ENABLED from .fanart import FanartThread, FanartTask diff --git a/resources/lib/library_sync/common.py b/resources/lib/library_sync/common.py index 77cc8a9a..557d0f33 100644 --- a/resources/lib/library_sync/common.py +++ b/resources/lib/library_sync/common.py @@ -3,7 +3,10 @@ from __future__ import absolute_import, division, unicode_literals import xbmc -from .. import app +from .. import app, utils, variables as v + +PLAYLIST_SYNC_ENABLED = (v.PLATFORM != 'Microsoft UWP' and + utils.settings('enablePlaylistSync') == 'true') class libsync_mixin(object): diff --git a/resources/lib/library_sync/full_sync.py b/resources/lib/library_sync/full_sync.py index 83c0528b..ccda2b7e 100644 --- a/resources/lib/library_sync/full_sync.py +++ b/resources/lib/library_sync/full_sync.py @@ -13,13 +13,9 @@ from .. import utils, timing, backgroundthread, variables as v, app from .. import plex_functions as PF, itemtypes from ..plex_db import PlexDB -if (v.PLATFORM != 'Microsoft UWP' and - utils.settings('enablePlaylistSync') == 'true'): - # Xbox cannot use watchdog, a dependency for PKC playlist features +if common.PLAYLIST_SYNC_ENABLED: from .. import playlists - PLAYLIST_SYNC_ENABLED = True -else: - PLAYLIST_SYNC_ENABLED = False + LOG = getLogger('PLEX.sync.full_sync') # How many items will be put through the processing chain at once? @@ -411,7 +407,7 @@ class FullSync(common.fullsync_mixin): if self.isCanceled(): self.successful = False return - if PLAYLIST_SYNC_ENABLED and not playlists.full_sync(): + if common.PLAYLIST_SYNC_ENABLED and not playlists.full_sync(): self.successful = False return finally: diff --git a/resources/lib/library_sync/websocket.py b/resources/lib/library_sync/websocket.py index c302f8d9..63b72ebe 100644 --- a/resources/lib/library_sync/websocket.py +++ b/resources/lib/library_sync/websocket.py @@ -3,15 +3,17 @@ from __future__ import absolute_import, division, unicode_literals from logging import getLogger -from .common import update_kodi_library -from .full_sync import PLAYLIST_SYNC_ENABLED +from .common import update_kodi_library, PLAYLIST_SYNC_ENABLED from .fanart import SYNC_FANART, FanartTask from ..plex_api import API from ..plex_db import PlexDB from .. import kodi_db -from .. import backgroundthread, playlists, plex_functions as PF, itemtypes +from .. import backgroundthread, plex_functions as PF, itemtypes from .. import artwork, utils, timing, variables as v, app +if PLAYLIST_SYNC_ENABLED: + from .. import playlists + LOG = getLogger('PLEX.sync.websocket') CACHING_ENALBED = utils.settings('enableTextureCache') == "true" diff --git a/resources/lib/sync.py b/resources/lib/sync.py index 2c3ba4ba..7f2f6afb 100644 --- a/resources/lib/sync.py +++ b/resources/lib/sync.py @@ -9,6 +9,9 @@ from . import library_sync, timing from . import backgroundthread, utils, artwork, variables as v, app from . import kodi_db +if library_sync.PLAYLIST_SYNC_ENABLED: + from . import playlists + LOG = getLogger('PLEX.sync') @@ -208,7 +211,6 @@ class Sync(backgroundthread.KillableThread): initial_sync_done = True utils.settings('dbCreatedWithVersion', v.ADDON_VERSION) if library_sync.PLAYLIST_SYNC_ENABLED: - from . import playlists playlist_monitor = playlists.kodi_playlist_monitor() self.start_fanart_download(refresh=False) self.start_image_cache_thread() @@ -227,7 +229,6 @@ class Sync(backgroundthread.KillableThread): initial_sync_done = True LOG.info('Done initial sync on Kodi startup') if library_sync.PLAYLIST_SYNC_ENABLED: - from . import playlists playlist_monitor = playlists.kodi_playlist_monitor() self.start_fanart_download(refresh=False) self.start_image_cache_thread()