Don't import read_embyserver
This commit is contained in:
parent
136f0b3157
commit
044f1a5550
5 changed files with 11 additions and 16 deletions
|
@ -9,7 +9,6 @@ import sys
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcaddon
|
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
import xbmcvfs
|
import xbmcvfs
|
||||||
import xbmcplugin
|
import xbmcplugin
|
||||||
|
@ -19,7 +18,6 @@ from utils import window, settings, language as lang
|
||||||
from utils import tryDecode, tryEncode, CatchExceptions
|
from utils import tryDecode, tryEncode, CatchExceptions
|
||||||
import clientinfo
|
import clientinfo
|
||||||
import downloadutils
|
import downloadutils
|
||||||
import read_embyserver as embyserver
|
|
||||||
import embydb_functions as embydb
|
import embydb_functions as embydb
|
||||||
import playbackutils as pbutils
|
import playbackutils as pbutils
|
||||||
import playlist
|
import playlist
|
||||||
|
|
|
@ -15,7 +15,6 @@ from utils import settings, window, kodiSQL, CatchExceptions
|
||||||
from utils import tryEncode, tryDecode
|
from utils import tryEncode, tryDecode
|
||||||
import embydb_functions as embydb
|
import embydb_functions as embydb
|
||||||
import kodidb_functions as kodidb
|
import kodidb_functions as kodidb
|
||||||
import read_embyserver as embyserver
|
|
||||||
|
|
||||||
import PlexAPI
|
import PlexAPI
|
||||||
from PlexFunctions import GetPlexMetadata
|
from PlexFunctions import GetPlexMetadata
|
||||||
|
@ -41,7 +40,6 @@ class Items(object):
|
||||||
self.directpath = window('useDirectPaths') == 'true'
|
self.directpath = window('useDirectPaths') == 'true'
|
||||||
|
|
||||||
self.artwork = artwork.Artwork()
|
self.artwork = artwork.Artwork()
|
||||||
self.emby = embyserver.Read_EmbyServer()
|
|
||||||
self.userid = window('currUserId')
|
self.userid = window('currUserId')
|
||||||
self.server = window('pms_server')
|
self.server = window('pms_server')
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ import downloadutils
|
||||||
import itemtypes
|
import itemtypes
|
||||||
import embydb_functions as embydb
|
import embydb_functions as embydb
|
||||||
import kodidb_functions as kodidb
|
import kodidb_functions as kodidb
|
||||||
import read_embyserver as embyserver
|
|
||||||
import userclient
|
import userclient
|
||||||
import videonodes
|
import videonodes
|
||||||
|
|
||||||
|
@ -283,7 +282,6 @@ class LibrarySync(Thread):
|
||||||
|
|
||||||
self.clientInfo = clientinfo.ClientInfo()
|
self.clientInfo = clientinfo.ClientInfo()
|
||||||
self.user = userclient.UserClient()
|
self.user = userclient.UserClient()
|
||||||
self.emby = embyserver.Read_EmbyServer()
|
|
||||||
self.vnodes = videonodes.VideoNodes()
|
self.vnodes = videonodes.VideoNodes()
|
||||||
self.dialog = xbmcgui.Dialog()
|
self.dialog = xbmcgui.Dialog()
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ import xbmcplugin
|
||||||
import artwork
|
import artwork
|
||||||
import playutils as putils
|
import playutils as putils
|
||||||
import playlist
|
import playlist
|
||||||
import read_embyserver as embyserver
|
|
||||||
from utils import window, settings, tryEncode, tryDecode
|
from utils import window, settings, tryEncode, tryDecode
|
||||||
import downloadutils
|
import downloadutils
|
||||||
|
|
||||||
|
@ -41,7 +40,6 @@ class PlaybackUtils():
|
||||||
self.server = window('pms_server')
|
self.server = window('pms_server')
|
||||||
|
|
||||||
self.artwork = artwork.Artwork()
|
self.artwork = artwork.Artwork()
|
||||||
self.emby = embyserver.Read_EmbyServer()
|
|
||||||
if self.API.getType() == 'track':
|
if self.API.getType() == 'track':
|
||||||
self.pl = playlist.Playlist(typus='music')
|
self.pl = playlist.Playlist(typus='music')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -6,7 +6,6 @@ import logging
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
|
|
||||||
import utils
|
|
||||||
import downloadutils
|
import downloadutils
|
||||||
from utils import window, settings, kodiSQL
|
from utils import window, settings, kodiSQL
|
||||||
|
|
||||||
|
@ -14,17 +13,21 @@ from utils import window, settings, kodiSQL
|
||||||
|
|
||||||
log = logging.getLogger("EMBY."+__name__)
|
log = logging.getLogger("EMBY."+__name__)
|
||||||
|
|
||||||
@utils.logging
|
#################################################################################################
|
||||||
|
|
||||||
|
|
||||||
class Read_EmbyServer():
|
class Read_EmbyServer():
|
||||||
|
|
||||||
# limitIndex = int(utils.settings('limitindex'))
|
limitIndex = int(settings('limitindex'))
|
||||||
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.doUtils = downloadutils.DownloadUtils().downloadUrl
|
self.doUtils = downloadutils.DownloadUtils().downloadUrl
|
||||||
|
|
||||||
self.userId = utils.window('currUserId')
|
self.userId = window('emby_currUser')
|
||||||
self.server = utils.window('pms_server')
|
self.server = window('emby_server%s' % self.userId)
|
||||||
|
|
||||||
|
|
||||||
def split_list(self, itemlist, size):
|
def split_list(self, itemlist, size):
|
||||||
# Split up list in pieces of size. Will generate a list of lists
|
# Split up list in pieces of size. Will generate a list of lists
|
||||||
|
@ -86,8 +89,8 @@ class Read_EmbyServer():
|
||||||
|
|
||||||
return items
|
return items
|
||||||
|
|
||||||
def getView_plexid(self, itemid):
|
def getView_embyId(self, itemid):
|
||||||
# Returns ancestors using plexid
|
# Returns ancestors using embyId
|
||||||
viewId = None
|
viewId = None
|
||||||
|
|
||||||
url = "{server}/emby/Items/%s/Ancestors?UserId={UserId}&format=json" % itemid
|
url = "{server}/emby/Items/%s/Ancestors?UserId={UserId}&format=json" % itemid
|
||||||
|
@ -267,7 +270,7 @@ class Read_EmbyServer():
|
||||||
log.debug("Set jump limit to recover: %s" % jump)
|
log.debug("Set jump limit to recover: %s" % jump)
|
||||||
|
|
||||||
retry = 0
|
retry = 0
|
||||||
while utils.window('plex_online') != "true":
|
while window('emby_online') != "true":
|
||||||
# Wait server to come back online
|
# Wait server to come back online
|
||||||
if retry == 5:
|
if retry == 5:
|
||||||
log.info("Unable to reconnect to server. Abort process.")
|
log.info("Unable to reconnect to server. Abort process.")
|
||||||
|
|
Loading…
Reference in a new issue