Don't import read_embyserver

This commit is contained in:
tomkat83 2016-09-02 17:32:03 +02:00
parent 136f0b3157
commit 044f1a5550
5 changed files with 11 additions and 16 deletions

View file

@ -9,7 +9,6 @@ import sys
import urllib
import xbmc
import xbmcaddon
import xbmcgui
import xbmcvfs
import xbmcplugin
@ -19,7 +18,6 @@ from utils import window, settings, language as lang
from utils import tryDecode, tryEncode, CatchExceptions
import clientinfo
import downloadutils
import read_embyserver as embyserver
import embydb_functions as embydb
import playbackutils as pbutils
import playlist

View file

@ -15,7 +15,6 @@ from utils import settings, window, kodiSQL, CatchExceptions
from utils import tryEncode, tryDecode
import embydb_functions as embydb
import kodidb_functions as kodidb
import read_embyserver as embyserver
import PlexAPI
from PlexFunctions import GetPlexMetadata
@ -41,7 +40,6 @@ class Items(object):
self.directpath = window('useDirectPaths') == 'true'
self.artwork = artwork.Artwork()
self.emby = embyserver.Read_EmbyServer()
self.userid = window('currUserId')
self.server = window('pms_server')

View file

@ -20,7 +20,6 @@ import downloadutils
import itemtypes
import embydb_functions as embydb
import kodidb_functions as kodidb
import read_embyserver as embyserver
import userclient
import videonodes
@ -283,7 +282,6 @@ class LibrarySync(Thread):
self.clientInfo = clientinfo.ClientInfo()
self.user = userclient.UserClient()
self.emby = embyserver.Read_EmbyServer()
self.vnodes = videonodes.VideoNodes()
self.dialog = xbmcgui.Dialog()

View file

@ -14,7 +14,6 @@ import xbmcplugin
import artwork
import playutils as putils
import playlist
import read_embyserver as embyserver
from utils import window, settings, tryEncode, tryDecode
import downloadutils
@ -41,7 +40,6 @@ class PlaybackUtils():
self.server = window('pms_server')
self.artwork = artwork.Artwork()
self.emby = embyserver.Read_EmbyServer()
if self.API.getType() == 'track':
self.pl = playlist.Playlist(typus='music')
else:

View file

@ -6,7 +6,6 @@ import logging
import xbmc
import utils
import downloadutils
from utils import window, settings, kodiSQL
@ -14,17 +13,21 @@ from utils import window, settings, kodiSQL
log = logging.getLogger("EMBY."+__name__)
@utils.logging
#################################################################################################
class Read_EmbyServer():
# limitIndex = int(utils.settings('limitindex'))
limitIndex = int(settings('limitindex'))
def __init__(self):
self.doUtils = downloadutils.DownloadUtils().downloadUrl
self.userId = utils.window('currUserId')
self.server = utils.window('pms_server')
self.userId = window('emby_currUser')
self.server = window('emby_server%s' % self.userId)
def split_list(self, itemlist, size):
# Split up list in pieces of size. Will generate a list of lists
@ -86,8 +89,8 @@ class Read_EmbyServer():
return items
def getView_plexid(self, itemid):
# Returns ancestors using plexid
def getView_embyId(self, itemid):
# Returns ancestors using embyId
viewId = None
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)
retry = 0
while utils.window('plex_online') != "true":
while window('emby_online') != "true":
# Wait server to come back online
if retry == 5:
log.info("Unable to reconnect to server. Abort process.")