Optimize some imports
This commit is contained in:
parent
73c7f866e6
commit
cdd38c6ef7
23 changed files with 61 additions and 65 deletions
|
@ -30,7 +30,7 @@ http://stackoverflow.com/questions/111945/is-there-any-way-to-do-http-put-in-pyt
|
||||||
(and others...)
|
(and others...)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
from logging import getLogger
|
||||||
from time import time
|
from time import time
|
||||||
import urllib2
|
import urllib2
|
||||||
import socket
|
import socket
|
||||||
|
@ -57,7 +57,7 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX." + __name__)
|
log = getLogger("PLEX." + __name__)
|
||||||
|
|
||||||
REGEX_IMDB = re_compile(r'''/(tt\d+)''')
|
REGEX_IMDB = re_compile(r'''/(tt\d+)''')
|
||||||
REGEX_TVDB = re_compile(r'''thetvdb:\/\/(.+?)\?''')
|
REGEX_TVDB = re_compile(r'''thetvdb:\/\/(.+?)\?''')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import logging
|
from logging import getLogger
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
import Queue
|
from Queue import Queue, Empty
|
||||||
from socket import SHUT_RDWR
|
from socket import SHUT_RDWR
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class PlexCompanion(Thread):
|
||||||
log.debug("Registration string is:\n%s"
|
log.debug("Registration string is:\n%s"
|
||||||
% self.client.getClientDetails())
|
% self.client.getClientDetails())
|
||||||
# kodi player instance
|
# kodi player instance
|
||||||
self.player = player.Player()
|
self.player = player.PKC_Player()
|
||||||
|
|
||||||
Thread.__init__(self)
|
Thread.__init__(self)
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ class PlexCompanion(Thread):
|
||||||
subscriptionManager = subscribers.SubscriptionManager(
|
subscriptionManager = subscribers.SubscriptionManager(
|
||||||
requestMgr, self.player, self.mgr)
|
requestMgr, self.player, self.mgr)
|
||||||
|
|
||||||
queue = Queue.Queue(maxsize=100)
|
queue = Queue(maxsize=100)
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
|
|
||||||
if settings('plexCompanion') == 'true':
|
if settings('plexCompanion') == 'true':
|
||||||
|
@ -276,7 +276,7 @@ class PlexCompanion(Thread):
|
||||||
# See if there's anything we need to process
|
# See if there's anything we need to process
|
||||||
try:
|
try:
|
||||||
task = queue.get(block=False)
|
task = queue.get(block=False)
|
||||||
except Queue.Empty:
|
except Empty:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# Got instructions, process them
|
# Got instructions, process them
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
import requests
|
from Queue import Queue, Empty
|
||||||
from shutil import rmtree
|
from shutil import rmtree
|
||||||
from urllib import quote_plus, unquote
|
from urllib import quote_plus, unquote
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from Queue import Queue, Empty
|
import requests
|
||||||
import json_rpc as js
|
import json_rpc as js
|
||||||
|
|
||||||
from xbmc import sleep, translatePath
|
from xbmc import sleep, translatePath
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
|
|
||||||
from utils import window, settings
|
from utils import window, settings
|
||||||
import variables as v
|
import variables as v
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
from logging import getLogger
|
||||||
import logging
|
|
||||||
import requests
|
|
||||||
import xml.etree.ElementTree as etree
|
import xml.etree.ElementTree as etree
|
||||||
|
import requests
|
||||||
|
|
||||||
from utils import settings, window, language as lang, dialog
|
from utils import settings, window, language as lang, dialog
|
||||||
import clientinfo as client
|
import clientinfo as client
|
||||||
|
@ -17,7 +16,7 @@ import state
|
||||||
import requests.packages.urllib3
|
import requests.packages.urllib3
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
from os import walk, makedirs
|
from os import walk, makedirs
|
||||||
from os.path import basename, join
|
from os.path import basename, join
|
||||||
|
@ -22,7 +22,7 @@ import json_rpc as js
|
||||||
import variables as v
|
import variables as v
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
HANDLE = int(argv[1])
|
HANDLE = int(argv[1])
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
from logging import getLogger
|
||||||
|
|
||||||
import logging
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ from migration import check_migration
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
from logging import getLogger
|
||||||
import logging
|
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
from ntpath import dirname
|
from ntpath import dirname
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
@ -20,7 +19,7 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
Collection of functions using the Kodi JSON RPC interface.
|
Collection of functions using the Kodi JSON RPC interface.
|
||||||
See http://kodi.wiki/view/JSON-RPC_API
|
See http://kodi.wiki/view/JSON-RPC_API
|
||||||
"""
|
"""
|
||||||
|
from logging import getLogger
|
||||||
from json import loads, dumps
|
from json import loads, dumps
|
||||||
from utils import millis_to_kodi_time
|
from utils import millis_to_kodi_time
|
||||||
from xbmc import executeJSONRPC
|
from xbmc import executeJSONRPC
|
||||||
|
|
||||||
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
|
|
||||||
class jsonrpc(object):
|
class jsonrpc(object):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
from logging import getLogger
|
||||||
import logging
|
|
||||||
from ntpath import dirname
|
from ntpath import dirname
|
||||||
|
|
||||||
import artwork
|
import artwork
|
||||||
|
@ -11,7 +10,7 @@ import variables as v
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from json import loads
|
from json import loads
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from urlparse import parse_qsl
|
from urlparse import parse_qsl
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ from context_entry import ContextMenu
|
||||||
import state
|
import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
from logging import getLogger
|
||||||
import logging
|
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
|
@ -26,7 +25,7 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
import json
|
from json import loads
|
||||||
|
|
||||||
import xbmc
|
from xbmc import Player, sleep
|
||||||
|
|
||||||
from utils import window, DateToKodi, getUnixTimestamp, tryDecode, tryEncode
|
from utils import window, DateToKodi, getUnixTimestamp, tryDecode, tryEncode
|
||||||
import downloadutils
|
import downloadutils
|
||||||
|
@ -16,12 +16,12 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG = logging.getLogger("PLEX." + __name__)
|
LOG = getLogger("PLEX." + __name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
class Player(xbmc.Player):
|
class PKC_Player(Player):
|
||||||
|
|
||||||
played_info = state.PLAYED_INFO
|
played_info = state.PLAYED_INFO
|
||||||
playStats = state.PLAYER_STATES
|
playStats = state.PLAYER_STATES
|
||||||
|
@ -29,7 +29,7 @@ class Player(xbmc.Player):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.doUtils = downloadutils.DownloadUtils
|
self.doUtils = downloadutils.DownloadUtils
|
||||||
xbmc.Player.__init__(self)
|
Player.__init__(self)
|
||||||
LOG.info("Started playback monitor.")
|
LOG.info("Started playback monitor.")
|
||||||
|
|
||||||
def onPlayBackStarted(self):
|
def onPlayBackStarted(self):
|
||||||
|
@ -42,12 +42,12 @@ class Player(xbmc.Player):
|
||||||
# Get current file (in utf-8!)
|
# Get current file (in utf-8!)
|
||||||
try:
|
try:
|
||||||
currentFile = tryDecode(self.getPlayingFile())
|
currentFile = tryDecode(self.getPlayingFile())
|
||||||
xbmc.sleep(300)
|
sleep(300)
|
||||||
except:
|
except:
|
||||||
currentFile = ""
|
currentFile = ""
|
||||||
count = 0
|
count = 0
|
||||||
while not currentFile:
|
while not currentFile:
|
||||||
xbmc.sleep(100)
|
sleep(100)
|
||||||
try:
|
try:
|
||||||
currentFile = tryDecode(self.getPlayingFile())
|
currentFile = tryDecode(self.getPlayingFile())
|
||||||
except:
|
except:
|
||||||
|
@ -67,7 +67,7 @@ class Player(xbmc.Player):
|
||||||
itemId = window("plex_%s.itemid" % tryEncode(currentFile))
|
itemId = window("plex_%s.itemid" % tryEncode(currentFile))
|
||||||
count = 0
|
count = 0
|
||||||
while not itemId:
|
while not itemId:
|
||||||
xbmc.sleep(200)
|
sleep(200)
|
||||||
itemId = window("plex_%s.itemid" % tryEncode(currentFile))
|
itemId = window("plex_%s.itemid" % tryEncode(currentFile))
|
||||||
if count == 5:
|
if count == 5:
|
||||||
LOG.warn("Could not find itemId, cancelling playback report!")
|
LOG.warn("Could not find itemId, cancelling playback report!")
|
||||||
|
@ -142,17 +142,17 @@ class Player(xbmc.Player):
|
||||||
postdata['AudioStreamIndex'] = indexAudio + 1
|
postdata['AudioStreamIndex'] = indexAudio + 1
|
||||||
|
|
||||||
# Postdata for the subtitles
|
# Postdata for the subtitles
|
||||||
if subsEnabled and len(xbmc.Player().getAvailableSubtitleStreams()) > 0:
|
if subsEnabled and len(Player().getAvailableSubtitleStreams()) > 0:
|
||||||
|
|
||||||
# Number of audiotracks to help get plex Index
|
# Number of audiotracks to help get plex Index
|
||||||
audioTracks = len(xbmc.Player().getAvailableAudioStreams())
|
audioTracks = len(Player().getAvailableAudioStreams())
|
||||||
mapping = window("%s.indexMapping" % plexitem)
|
mapping = window("%s.indexMapping" % plexitem)
|
||||||
|
|
||||||
if mapping: # Set in playbackutils.py
|
if mapping: # Set in playbackutils.py
|
||||||
|
|
||||||
LOG.debug("Mapping for external subtitles index: %s"
|
LOG.debug("Mapping for external subtitles index: %s"
|
||||||
% mapping)
|
% mapping)
|
||||||
externalIndex = json.loads(mapping)
|
externalIndex = loads(mapping)
|
||||||
|
|
||||||
if externalIndex.get(str(indexSubs)):
|
if externalIndex.get(str(indexSubs)):
|
||||||
# If the current subtitle is in the mapping
|
# If the current subtitle is in the mapping
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Collection of functions associated with Kodi and Plex playlists and playqueues
|
Collection of functions associated with Kodi and Plex playlists and playqueues
|
||||||
"""
|
"""
|
||||||
import logging
|
from logging import getLogger
|
||||||
from urllib import quote
|
from urllib import quote
|
||||||
from urlparse import parse_qsl, urlsplit
|
from urlparse import parse_qsl, urlsplit
|
||||||
from re import compile as re_compile
|
from re import compile as re_compile
|
||||||
|
@ -15,7 +15,7 @@ import json_rpc as js
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG = logging.getLogger("PLEX." + __name__)
|
LOG = getLogger("PLEX." + __name__)
|
||||||
|
|
||||||
REGEX = re_compile(r'''metadata%2F(\d+)''')
|
REGEX = re_compile(r'''metadata%2F(\d+)''')
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Monitors the Kodi playqueue and adjusts the Plex playqueue accordingly
|
Monitors the Kodi playqueue and adjusts the Plex playqueue accordingly
|
||||||
"""
|
"""
|
||||||
import logging
|
from logging import getLogger
|
||||||
from threading import RLock, Thread
|
from threading import RLock, Thread
|
||||||
|
|
||||||
from xbmc import sleep, Player, PlayList, PLAYLIST_MUSIC, PLAYLIST_VIDEO
|
from xbmc import sleep, Player, PlayList, PLAYLIST_MUSIC, PLAYLIST_VIDEO
|
||||||
|
@ -15,7 +15,7 @@ import json_rpc as js
|
||||||
import variables as v
|
import variables as v
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
LOG = logging.getLogger("PLEX." + __name__)
|
LOG = getLogger("PLEX." + __name__)
|
||||||
|
|
||||||
# lock used for playqueue manipulations
|
# lock used for playqueue manipulations
|
||||||
LOCK = RLock()
|
LOCK = RLock()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
from downloadutils import DownloadUtils
|
from downloadutils import DownloadUtils
|
||||||
|
|
||||||
from utils import window, settings, tryEncode, language as lang, dialog
|
from utils import window, settings, tryEncode, language as lang, dialog
|
||||||
|
@ -10,7 +10,7 @@ import PlexAPI
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
from logging import getLogger
|
||||||
|
|
||||||
from utils import kodiSQL
|
from utils import kodiSQL
|
||||||
import logging
|
|
||||||
import variables as v
|
import variables as v
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
import threading
|
from threading import Thread
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
|
@ -19,13 +19,13 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
@thread_methods(add_suspends=['SUSPEND_USER_CLIENT'])
|
@thread_methods(add_suspends=['SUSPEND_USER_CLIENT'])
|
||||||
class UserClient(threading.Thread):
|
class UserClient(Thread):
|
||||||
|
|
||||||
# Borg - multiple instances, shared state
|
# Borg - multiple instances, shared state
|
||||||
__shared_state = {}
|
__shared_state = {}
|
||||||
|
@ -49,7 +49,7 @@ class UserClient(threading.Thread):
|
||||||
self.addon = xbmcaddon.Addon()
|
self.addon = xbmcaddon.Addon()
|
||||||
self.doUtils = downloadutils.DownloadUtils()
|
self.doUtils = downloadutils.DownloadUtils()
|
||||||
|
|
||||||
threading.Thread.__init__(self)
|
Thread.__init__(self)
|
||||||
|
|
||||||
def getUsername(self):
|
def getUsername(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
from cProfile import Profile
|
from cProfile import Profile
|
||||||
from pstats import Stats
|
from pstats import Stats
|
||||||
from sqlite3 import connect, OperationalError
|
from sqlite3 import connect, OperationalError
|
||||||
|
@ -28,7 +28,7 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
WINDOW = xbmcgui.Window(10000)
|
WINDOW = xbmcgui.Window(10000)
|
||||||
ADDON = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
|
ADDON = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
from shutil import copytree
|
from shutil import copytree
|
||||||
import xml.etree.ElementTree as etree
|
import xml.etree.ElementTree as etree
|
||||||
from os import makedirs
|
from os import makedirs
|
||||||
|
@ -14,7 +14,7 @@ import variables as v
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Paths are strings, NOT unicode!
|
# Paths are strings, NOT unicode!
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
import logging
|
from logging import getLogger
|
||||||
import websocket
|
import websocket
|
||||||
from json import loads
|
from json import loads
|
||||||
import xml.etree.ElementTree as etree
|
import xml.etree.ElementTree as etree
|
||||||
|
@ -17,7 +17,7 @@ import state
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
log = logging.getLogger("PLEX."+__name__)
|
log = getLogger("PLEX."+__name__)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue