From 726addd1172cc685a3b235014408bd1bc4cdcbfd Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 12 Jul 2018 16:23:33 +0200 Subject: [PATCH 1/4] Fix "Prefer Kodi artwork" setting not being visible --- resources/settings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/settings.xml b/resources/settings.xml index dc8525d1..ad276023 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -131,9 +131,9 @@ - - - + + + From 141234c8b85b42ed04ab2bffaef338de9c8d7cfd Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 12 Jul 2018 16:34:35 +0200 Subject: [PATCH 2/4] Fix "Prefer Kodi Artwork" toggle doing the exact opposite --- resources/lib/itemtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 725dd49b..3fa594cb 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -119,7 +119,7 @@ class Items(object): setid = self.kodi_db.create_collection(setname) external_set_artwork = api.set_artwork() if (external_set_artwork and - utils.settings('PreferKodiCollectionArt') == 'false'): + utils.settings('PreferKodiCollectionArt') == 'true'): # Need to make sure we are not overwriting existing Plex # collection artwork plex_artwork = api.artwork(kodi_id=setid, From 4e0429fcc92ea45a2be8a9f9badaf3b20932aa23 Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 12 Jul 2018 18:46:02 +0200 Subject: [PATCH 3/4] Fix switching to __future__ module - Fixes #507 --- resources/lib/artwork.py | 4 ++-- resources/lib/clientinfo.py | 4 ++-- resources/lib/command_pipeline.py | 3 ++- resources/lib/companion.py | 3 +++ resources/lib/context.py | 3 ++- resources/lib/context_entry.py | 3 ++- resources/lib/downloadutils.py | 4 ++-- resources/lib/entrypoint.py | 11 +++++----- resources/lib/initialsetup.py | 3 ++- resources/lib/itemtypes.py | 3 ++- resources/lib/json_rpc.py | 3 +++ resources/lib/kodidb_functions.py | 9 +++++---- resources/lib/kodimonitor.py | 3 +++ resources/lib/library_sync/fanart.py | 1 + resources/lib/library_sync/get_metadata.py | 1 + .../lib/library_sync/process_metadata.py | 1 + resources/lib/library_sync/sync_info.py | 1 + resources/lib/librarysync.py | 3 ++- resources/lib/loghandler.py | 3 ++- resources/lib/migration.py | 3 +++ resources/lib/music.py | 2 ++ resources/lib/path_ops.py | 20 +++++++++++-------- resources/lib/pickler.py | 3 ++- resources/lib/pkc_listitem.py | 3 ++- resources/lib/playback.py | 3 +++ resources/lib/playback_starter.py | 3 ++- resources/lib/playlist_func.py | 1 + resources/lib/playlists/__init__.py | 1 + resources/lib/playlists/common.py | 3 +++ resources/lib/playlists/db.py | 1 + resources/lib/playlists/kodi_pl.py | 1 + resources/lib/playlists/plex_pl.py | 1 + resources/lib/playlists/pms.py | 1 + resources/lib/playqueue.py | 3 +++ resources/lib/playutils.py | 4 ++-- resources/lib/plex_api.py | 2 ++ resources/lib/plex_companion.py | 3 +++ resources/lib/plex_functions.py | 2 ++ resources/lib/plex_tv.py | 2 ++ resources/lib/plexbmchelper/httppersist.py | 3 +++ resources/lib/plexbmchelper/listener.py | 3 +++ resources/lib/plexbmchelper/plexgdm.py | 3 +++ resources/lib/plexbmchelper/subscribers.py | 3 +++ resources/lib/plexdb_functions.py | 3 ++- resources/lib/service_entry.py | 3 ++- resources/lib/state.py | 6 +++++- resources/lib/userclient.py | 3 ++- resources/lib/utils.py | 3 ++- resources/lib/variables.py | 2 ++ resources/lib/videonodes.py | 3 ++- resources/lib/websocket.py | 4 ++-- resources/lib/websocket_client.py | 9 ++------- 52 files changed, 126 insertions(+), 50 deletions(-) diff --git a/resources/lib/artwork.py b/resources/lib/artwork.py index 4281e437..50dfbbb1 100644 --- a/resources/lib/artwork.py +++ b/resources/lib/artwork.py @@ -1,6 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- - -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from Queue import Queue, Empty from urllib import quote_plus, unquote diff --git a/resources/lib/clientinfo.py b/resources/lib/clientinfo.py index edf67f0e..d576ed44 100644 --- a/resources/lib/clientinfo.py +++ b/resources/lib/clientinfo.py @@ -1,6 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- - -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from . import utils diff --git a/resources/lib/command_pipeline.py b/resources/lib/command_pipeline.py index 9604a0e1..3107d825 100644 --- a/resources/lib/command_pipeline.py +++ b/resources/lib/command_pipeline.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals import logging from threading import Thread from xbmc import sleep diff --git a/resources/lib/companion.py b/resources/lib/companion.py index d48aedb1..e94f4ae1 100644 --- a/resources/lib/companion.py +++ b/resources/lib/companion.py @@ -1,6 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Processes Plex companion inputs from the plexbmchelper to Kodi commands """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from xbmc import Player diff --git a/resources/lib/context.py b/resources/lib/context.py index 914e9a5d..db9b5f75 100644 --- a/resources/lib/context.py +++ b/resources/lib/context.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import xbmcgui diff --git a/resources/lib/context_entry.py b/resources/lib/context_entry.py index 373e52cf..c6507fec 100644 --- a/resources/lib/context_entry.py +++ b/resources/lib/context_entry.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import xbmc import xbmcgui diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index 420b7f33..6ad5d8b0 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -1,6 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- - -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import xml.etree.ElementTree as etree import requests diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index d51335c9..14eb2c9e 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -1,9 +1,10 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Loads of different functions called in SEPARATE Python instances through -# e.g. plugin://... calls. Hence be careful to only rely on window variables. -# -############################################################################### +""" +Loads of different functions called in SEPARATE Python instances through +e.g. plugin://... calls. Hence be careful to only rely on window variables. +""" +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from sys import argv from urllib import urlencode diff --git a/resources/lib/initialsetup.py b/resources/lib/initialsetup.py index 4f027ce7..8b65de57 100644 --- a/resources/lib/initialsetup.py +++ b/resources/lib/initialsetup.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from Queue import Queue import xml.etree.ElementTree as etree diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 3fa594cb..598974ec 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from ntpath import dirname from datetime import datetime diff --git a/resources/lib/json_rpc.py b/resources/lib/json_rpc.py index b989c97b..443d54da 100644 --- a/resources/lib/json_rpc.py +++ b/resources/lib/json_rpc.py @@ -1,7 +1,10 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Collection of functions using the Kodi JSON RPC interface. See http://kodi.wiki/view/JSON-RPC_API """ +from __future__ import absolute_import, division, unicode_literals from json import loads, dumps from xbmc import executeJSONRPC diff --git a/resources/lib/kodidb_functions.py b/resources/lib/kodidb_functions.py index f3038d10..92c0910f 100644 --- a/resources/lib/kodidb_functions.py +++ b/resources/lib/kodidb_functions.py @@ -1,8 +1,9 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Connect to the Kodi databases (video and music) and operate on them -# -############################################################################### +""" +Connect to the Kodi databases (video and music) and operate on them +""" +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from ntpath import dirname from sqlite3 import IntegrityError diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index 8a6efddc..a20eb6c0 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -1,6 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ PKC Kodi Monitoring implementation """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from json import loads from threading import Thread diff --git a/resources/lib/library_sync/fanart.py b/resources/lib/library_sync/fanart.py index 6153c2fd..1b26eca5 100644 --- a/resources/lib/library_sync/fanart.py +++ b/resources/lib/library_sync/fanart.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread from Queue import Empty diff --git a/resources/lib/library_sync/get_metadata.py b/resources/lib/library_sync/get_metadata.py index fb9a8097..e7f2ce16 100644 --- a/resources/lib/library_sync/get_metadata.py +++ b/resources/lib/library_sync/get_metadata.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread from Queue import Empty diff --git a/resources/lib/library_sync/process_metadata.py b/resources/lib/library_sync/process_metadata.py index ac65aac6..c0258730 100644 --- a/resources/lib/library_sync/process_metadata.py +++ b/resources/lib/library_sync/process_metadata.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread from Queue import Empty diff --git a/resources/lib/library_sync/sync_info.py b/resources/lib/library_sync/sync_info.py index fd22520b..db255ef1 100644 --- a/resources/lib/library_sync/sync_info.py +++ b/resources/lib/library_sync/sync_info.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread, Lock from xbmc import sleep diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 24b2589f..653d9cae 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread import Queue diff --git a/resources/lib/loghandler.py b/resources/lib/loghandler.py index 5a91a214..69666c3c 100644 --- a/resources/lib/loghandler.py +++ b/resources/lib/loghandler.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals import logging import xbmc ############################################################################### diff --git a/resources/lib/migration.py b/resources/lib/migration.py index 00c15228..87efd19a 100644 --- a/resources/lib/migration.py +++ b/resources/lib/migration.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from . import variables as v diff --git a/resources/lib/music.py b/resources/lib/music.py index 8731237c..93770a32 100644 --- a/resources/lib/music.py +++ b/resources/lib/music.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from xml.etree.ElementTree import ParseError diff --git a/resources/lib/path_ops.py b/resources/lib/path_ops.py index a08f32e2..b32915dd 100644 --- a/resources/lib/path_ops.py +++ b/resources/lib/path_ops.py @@ -1,12 +1,16 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -# File and Path operations -# -# Kodi xbmc*.*() functions usually take utf-8 encoded commands, thus try_encode -# works. -# Unfortunatly, working with filenames and paths seems to require an encoding in -# the OS' getfilesystemencoding - it will NOT always work with unicode paths. -# However, sys.getfilesystemencoding might return None. -# Feed unicode to all the functions below and you're fine. +""" +File and Path operations + +Kodi xbmc*.*() functions usually take utf-8 encoded commands, thus try_encode +works. +Unfortunatly, working with filenames and paths seems to require an encoding in +the OS' getfilesystemencoding - it will NOT always work with unicode paths. +However, sys.getfilesystemencoding might return None. +Feed unicode to all the functions below and you're fine. +""" +from __future__ import absolute_import, division, unicode_literals import shutil import os from os import path # allows to use path_ops.path.join, for example diff --git a/resources/lib/pickler.py b/resources/lib/pickler.py index d7450b27..bf836663 100644 --- a/resources/lib/pickler.py +++ b/resources/lib/pickler.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from cPickle import dumps, loads from xbmcgui import Window from xbmc import log, LOGDEBUG diff --git a/resources/lib/pkc_listitem.py b/resources/lib/pkc_listitem.py index 00956888..f84b28e5 100644 --- a/resources/lib/pkc_listitem.py +++ b/resources/lib/pkc_listitem.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from xbmcgui import ListItem diff --git a/resources/lib/playback.py b/resources/lib/playback.py index 0f3f3b63..922e81a9 100644 --- a/resources/lib/playback.py +++ b/resources/lib/playback.py @@ -1,6 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Used to kick off Kodi playback """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread from xbmc import Player, sleep diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index ff20b519..a4ce8cc9 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread from urlparse import parse_qsl diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index fe53a1fa..d2f1105d 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -3,6 +3,7 @@ """ Collection of functions associated with Kodi and Plex playlists and playqueues """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import urllib from urlparse import parse_qsl, urlsplit diff --git a/resources/lib/playlists/__init__.py b/resources/lib/playlists/__init__.py index 7de68e86..1f89a8ae 100644 --- a/resources/lib/playlists/__init__.py +++ b/resources/lib/playlists/__init__.py @@ -14,6 +14,7 @@ Triggers a full re-sync of playlists PlaylistError is thrown if anything wierd happens """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from .common import Playlist, PlaylistError, PlaylistObserver diff --git a/resources/lib/playlists/common.py b/resources/lib/playlists/common.py index c389eda8..2421978c 100644 --- a/resources/lib/playlists/common.py +++ b/resources/lib/playlists/common.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import Queue import time @@ -64,6 +65,8 @@ class Playlist(object): self.kodi_hash = None def __repr__(self): + for attr in self.__dict__: + LOG.debug('attr %s: %s', attr, type(attr)) return ("{{" "'plex_id': {self.plex_id}, " "'plex_name': '{self.plex_name}', " diff --git a/resources/lib/playlists/db.py b/resources/lib/playlists/db.py index c94ab0a0..464948b5 100644 --- a/resources/lib/playlists/db.py +++ b/resources/lib/playlists/db.py @@ -4,6 +4,7 @@ Synced playlists are stored in our plex.db. Interact with it through this module """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from .common import Playlist, PlaylistError diff --git a/resources/lib/playlists/kodi_pl.py b/resources/lib/playlists/kodi_pl.py index 573efd65..9b90bf83 100644 --- a/resources/lib/playlists/kodi_pl.py +++ b/resources/lib/playlists/kodi_pl.py @@ -3,6 +3,7 @@ """ Create and delete playlists on the Kodi side of things """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from .common import Playlist, PlaylistError diff --git a/resources/lib/playlists/plex_pl.py b/resources/lib/playlists/plex_pl.py index 6699b4ed..8b94563d 100644 --- a/resources/lib/playlists/plex_pl.py +++ b/resources/lib/playlists/plex_pl.py @@ -3,6 +3,7 @@ """ Create and delete playlists on the Plex side of things """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from .common import PlaylistError diff --git a/resources/lib/playlists/pms.py b/resources/lib/playlists/pms.py index 88d03f35..9d7f9023 100644 --- a/resources/lib/playlists/pms.py +++ b/resources/lib/playlists/pms.py @@ -4,6 +4,7 @@ Functions to communicate with the currently connected PMS in order to manipulate playlists """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import urllib diff --git a/resources/lib/playqueue.py b/resources/lib/playqueue.py index fc6c6606..81c34e0c 100644 --- a/resources/lib/playqueue.py +++ b/resources/lib/playqueue.py @@ -1,6 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Monitors the Kodi playqueue and adjusts the Plex playqueue accordingly """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread import xbmc diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 536cfaa0..68d45fe5 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -1,6 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- - -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from .downloadutils import DownloadUtils as DU diff --git a/resources/lib/plex_api.py b/resources/lib/plex_api.py index 7a67e220..32f91b97 100644 --- a/resources/lib/plex_api.py +++ b/resources/lib/plex_api.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- """ Taken from iBaa, https://github.com/iBaa/PlexConnect @@ -29,6 +30,7 @@ http://stackoverflow.com/questions/2407126/python-urllib2-basic-auth-problem http://stackoverflow.com/questions/111945/is-there-any-way-to-do-http-put-in-python (and others...) """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from re import sub from urllib import urlencode, unquote, quote diff --git a/resources/lib/plex_companion.py b/resources/lib/plex_companion.py index c582ca68..6e686443 100644 --- a/resources/lib/plex_companion.py +++ b/resources/lib/plex_companion.py @@ -1,6 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ The Plex Companion master python file """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread from Queue import Empty diff --git a/resources/lib/plex_functions.py b/resources/lib/plex_functions.py index fe64a8be..10732a1a 100644 --- a/resources/lib/plex_functions.py +++ b/resources/lib/plex_functions.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from urllib import urlencode, quote_plus from ast import literal_eval diff --git a/resources/lib/plex_tv.py b/resources/lib/plex_tv.py index 4dccd592..a353b84a 100644 --- a/resources/lib/plex_tv.py +++ b/resources/lib/plex_tv.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from xbmc import sleep, executebuiltin diff --git a/resources/lib/plexbmchelper/httppersist.py b/resources/lib/plexbmchelper/httppersist.py index 3b23b1f6..450cba3c 100644 --- a/resources/lib/plexbmchelper/httppersist.py +++ b/resources/lib/plexbmchelper/httppersist.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import httplib import traceback diff --git a/resources/lib/plexbmchelper/listener.py b/resources/lib/plexbmchelper/listener.py index a3b03fd8..1cafc9ed 100644 --- a/resources/lib/plexbmchelper/listener.py +++ b/resources/lib/plexbmchelper/listener.py @@ -1,6 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Plex Companion listener """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from re import sub from SocketServer import ThreadingMixIn diff --git a/resources/lib/plexbmchelper/plexgdm.py b/resources/lib/plexbmchelper/plexgdm.py index d430acac..05627feb 100644 --- a/resources/lib/plexbmchelper/plexgdm.py +++ b/resources/lib/plexbmchelper/plexgdm.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ PlexGDM.py - Version 0.2 @@ -21,6 +23,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. """ +from __future__ import absolute_import, division, unicode_literals import logging import socket import threading diff --git a/resources/lib/plexbmchelper/subscribers.py b/resources/lib/plexbmchelper/subscribers.py index 4c1f3675..cdf5de45 100644 --- a/resources/lib/plexbmchelper/subscribers.py +++ b/resources/lib/plexbmchelper/subscribers.py @@ -1,7 +1,10 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Manages getting playstate from Kodi and sending it to the PMS as well as subscribed Plex Companion clients. """ +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread diff --git a/resources/lib/plexdb_functions.py b/resources/lib/plexdb_functions.py index ea3e445b..411623b2 100644 --- a/resources/lib/plexdb_functions.py +++ b/resources/lib/plexdb_functions.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from . import utils from . import variables as v diff --git a/resources/lib/service_entry.py b/resources/lib/service_entry.py index 9d1e803a..9d1d4851 100644 --- a/resources/lib/service_entry.py +++ b/resources/lib/service_entry.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals import logging import sys import xbmc diff --git a/resources/lib/state.py b/resources/lib/state.py index d62a79f4..ac25354c 100644 --- a/resources/lib/state.py +++ b/resources/lib/state.py @@ -1,5 +1,9 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -# THREAD SAFE +""" +THREAD SAFE +""" +from __future__ import absolute_import, division, unicode_literals from threading import Lock, RLock diff --git a/resources/lib/userclient.py b/resources/lib/userclient.py index 5b74884c..11dbf014 100644 --- a/resources/lib/userclient.py +++ b/resources/lib/userclient.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from threading import Thread diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 6ce21ba6..3bb67ad5 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -1,8 +1,9 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- """ Various functions and decorators for PKC """ -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger from cProfile import Profile from pstats import Stats diff --git a/resources/lib/variables.py b/resources/lib/variables.py index bcbd18a6..fdfd4d13 100644 --- a/resources/lib/variables.py +++ b/resources/lib/variables.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import absolute_import, division, unicode_literals import os import sys import xbmc diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index b32cefad..73b32613 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -1,5 +1,6 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -############################################################################### +from __future__ import absolute_import, division, unicode_literals from logging import getLogger import xml.etree.ElementTree as etree import xbmc diff --git a/resources/lib/websocket.py b/resources/lib/websocket.py index ac8aff70..ce1486ed 100644 --- a/resources/lib/websocket.py +++ b/resources/lib/websocket.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ websocket - WebSocket client library for Python @@ -18,8 +20,6 @@ Copyright (C) 2010 Hiroki Ohtani(liris) Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ - - import socket try: diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index 4018ff9c..13f0b793 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -1,18 +1,13 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- - -############################################################################### from logging import getLogger -import websocket from json import loads import xml.etree.ElementTree as etree from threading import Thread from ssl import CERT_NONE from xbmc import sleep -from . import utils -from . import companion -from . import state -from . import variables as v +from . import websocket, utils, companion, state, variables as v ############################################################################### From 551c06ac7ca694ea9689d404727f41faa5d4731e Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 12 Jul 2018 19:01:46 +0200 Subject: [PATCH 4/4] Beta version bump 2.2.13 --- README.md | 2 +- addon.xml | 10 ++++++++-- changelog.txt | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c2cbdc51..13b908d0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![stable version](https://img.shields.io/badge/stable_version-2.1.6-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.2.12-red.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/beta/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.2.zip) +[![beta version](https://img.shields.io/badge/beta_version-2.2.13-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 0e7983f6..5bde2c3e 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -73,7 +73,13 @@ Нативна інтеграція Plex в Kodi Підключає Kodi до серверу Plex. Цей плагін передбачає, що ви керуєте всіма своїми відео за допомогою Plex (і ніяк не Kodi). Ви можете втратити дані, які вже зберігаються у відео та музичних БД Kodi (оскільки цей плагін безпосередньо їх змінює). Використовуйте на свій страх і ризик! Використовуйте на свій ризик - version 2.2.12 (beta only): + version 2.2.13 (beta only): +- Fix library sync crash +- Fix switching to __future__ module +- Fix "Prefer Kodi Artwork" toggle doing the exact opposite +- Fix "Prefer Kodi artwork" setting not being visible + +version 2.2.12 (beta only): - Fix slow sync. Fix endless sync of corrupted PMS elements - Refactor playlist code - Fix FutureWarning diff --git a/changelog.txt b/changelog.txt index fab04cff..85eec9de 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +version 2.2.13 (beta only): +- Fix library sync crash +- Fix switching to __future__ module +- Fix "Prefer Kodi Artwork" toggle doing the exact opposite +- Fix "Prefer Kodi artwork" setting not being visible + version 2.2.12 (beta only): - Fix slow sync. Fix endless sync of corrupted PMS elements - Refactor playlist code