Merge branch 'beta-version'
This commit is contained in:
commit
06f008b8b3
8 changed files with 133 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
[![stable version](https://img.shields.io/badge/stable_version-2.3.3-blue.svg?maxAge=60&style=flat) ](https://github.com/croneter/binary_repo/raw/master/stable/repository.plexkodiconnect/repository.plexkodiconnect-1.0.2.zip)
|
[![stable version](https://img.shields.io/badge/stable_version-2.3.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.3.5-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.3.6-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)
|
[![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)
|
[![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.3.5" provider-name="croneter">
|
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="2.3.6" provider-name="croneter">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
<import addon="script.module.requests" version="2.9.1" />
|
<import addon="script.module.requests" version="2.9.1" />
|
||||||
|
@ -73,7 +73,10 @@
|
||||||
<summary lang="uk_UA">Нативна інтеграція Plex в Kodi</summary>
|
<summary lang="uk_UA">Нативна інтеграція Plex в Kodi</summary>
|
||||||
<description lang="uk_UA">Підключає Kodi до серверу Plex. Цей плагін передбачає, що ви керуєте всіма своїми відео за допомогою Plex (і ніяк не Kodi). Ви можете втратити дані, які вже зберігаються у відео та музичних БД Kodi (оскільки цей плагін безпосередньо їх змінює). Використовуйте на свій страх і ризик!</description>
|
<description lang="uk_UA">Підключає Kodi до серверу Plex. Цей плагін передбачає, що ви керуєте всіма своїми відео за допомогою Plex (і ніяк не Kodi). Ви можете втратити дані, які вже зберігаються у відео та музичних БД Kodi (оскільки цей плагін безпосередньо їх змінює). Використовуйте на свій страх і ризик!</description>
|
||||||
<disclaimer lang="uk_UA">Використовуйте на свій ризик</disclaimer>
|
<disclaimer lang="uk_UA">Використовуйте на свій ризик</disclaimer>
|
||||||
<news>version 2.3.5 (beta only):
|
<news>version 2.3.6 (beta only):
|
||||||
|
- Fix PKC not starting by decoupling watchdog/subprocess modules
|
||||||
|
|
||||||
|
version 2.3.5 (beta only):
|
||||||
- Fix PKC not starting by importing playlist module only when sync enabled
|
- Fix PKC not starting by importing playlist module only when sync enabled
|
||||||
|
|
||||||
version 2.3.4 (beta only):
|
version 2.3.4 (beta only):
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
version 2.3.6 (beta only):
|
||||||
|
- Fix PKC not starting by decoupling watchdog/subprocess modules
|
||||||
|
|
||||||
version 2.3.5 (beta only):
|
version 2.3.5 (beta only):
|
||||||
- Fix PKC not starting by importing playlist module only when sync enabled
|
- Fix PKC not starting by importing playlist module only when sync enabled
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ from xbmcplugin import setResolvedUrl
|
||||||
|
|
||||||
from resources.lib import entrypoint, utils, pickler, pkc_listitem, \
|
from resources.lib import entrypoint, utils, pickler, pkc_listitem, \
|
||||||
variables as v, loghandler
|
variables as v, loghandler
|
||||||
from resources.lib.watchdog.utils import unicode_paths
|
from resources.lib.tools import unicode_paths
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ from distutils import dir_util
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcvfs
|
import xbmcvfs
|
||||||
|
|
||||||
from .watchdog.utils import unicode_paths
|
from .tools import unicode_paths
|
||||||
|
|
||||||
# Kodi seems to encode in utf-8 in ALL cases (unlike e.g. the OS filesystem)
|
# Kodi seems to encode in utf-8 in ALL cases (unlike e.g. the OS filesystem)
|
||||||
KODI_ENCODING = 'utf-8'
|
KODI_ENCODING = 'utf-8'
|
||||||
|
|
1
resources/lib/tools/__init__.py
Normal file
1
resources/lib/tools/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Dummy file to make this directory a package.
|
57
resources/lib/tools/platform.py
Normal file
57
resources/lib/tools/platform.py
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
|
||||||
|
# Copyright 2012 Google, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
PLATFORM_WINDOWS = 'windows'
|
||||||
|
PLATFORM_LINUX = 'linux'
|
||||||
|
PLATFORM_BSD = 'bsd'
|
||||||
|
PLATFORM_DARWIN = 'darwin'
|
||||||
|
PLATFORM_UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
|
||||||
|
def get_platform_name():
|
||||||
|
if sys.platform.startswith("win"):
|
||||||
|
return PLATFORM_WINDOWS
|
||||||
|
elif sys.platform.startswith('darwin'):
|
||||||
|
return PLATFORM_DARWIN
|
||||||
|
elif sys.platform.startswith('linux'):
|
||||||
|
return PLATFORM_LINUX
|
||||||
|
elif sys.platform.startswith(('dragonfly', 'freebsd', 'netbsd', 'openbsd', )):
|
||||||
|
return PLATFORM_BSD
|
||||||
|
else:
|
||||||
|
return PLATFORM_UNKNOWN
|
||||||
|
|
||||||
|
__platform__ = get_platform_name()
|
||||||
|
|
||||||
|
|
||||||
|
def is_linux():
|
||||||
|
return __platform__ == PLATFORM_LINUX
|
||||||
|
|
||||||
|
|
||||||
|
def is_bsd():
|
||||||
|
return __platform__ == PLATFORM_BSD
|
||||||
|
|
||||||
|
|
||||||
|
def is_darwin():
|
||||||
|
return __platform__ == PLATFORM_DARWIN
|
||||||
|
|
||||||
|
|
||||||
|
def is_windows():
|
||||||
|
return __platform__ == PLATFORM_WINDOWS
|
64
resources/lib/tools/unicode_paths.py
Normal file
64
resources/lib/tools/unicode_paths.py
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 Will Bond <will@wbond.net>
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from . import platform
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Python 2
|
||||||
|
str_cls = unicode
|
||||||
|
bytes_cls = str
|
||||||
|
except NameError:
|
||||||
|
# Python 3
|
||||||
|
str_cls = str
|
||||||
|
bytes_cls = bytes
|
||||||
|
|
||||||
|
|
||||||
|
# This is used by Linux when the locale seems to be improperly set. UTF-8 tends
|
||||||
|
# to be the encoding used by all distros, so this is a good fallback.
|
||||||
|
fs_fallback_encoding = 'utf-8'
|
||||||
|
fs_encoding = sys.getfilesystemencoding() or fs_fallback_encoding
|
||||||
|
|
||||||
|
|
||||||
|
def encode(path):
|
||||||
|
if isinstance(path, str_cls):
|
||||||
|
try:
|
||||||
|
path = path.encode(fs_encoding, 'strict')
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
if not platform.is_linux():
|
||||||
|
raise
|
||||||
|
path = path.encode(fs_fallback_encoding, 'strict')
|
||||||
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
def decode(path):
|
||||||
|
if isinstance(path, bytes_cls):
|
||||||
|
try:
|
||||||
|
path = path.decode(fs_encoding, 'strict')
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
if not platform.is_linux():
|
||||||
|
raise
|
||||||
|
path = path.decode(fs_fallback_encoding, 'strict')
|
||||||
|
return path
|
Loading…
Reference in a new issue