Remove jellyfin/helper folder

This commit is contained in:
TrueTechy 2019-11-03 18:06:39 +00:00
commit 638ffbc4fd
6 changed files with 9 additions and 25 deletions

View file

@ -157,7 +157,6 @@ class Connect(object):
state = state or self.connect_manager.connect({'enableAutoLogin': False})
user = {}
LOG.info("XML PATH: "+str(XML_PATH))
dialog = ServerConnect("script-jellyfin-connect-server.xml", *XML_PATH)
dialog.set_args(**{
'connect_manager': self.connect_manager,

View file

@ -17,6 +17,7 @@ from utils import compare_version
from utils import unzip
from utils import create_id
from utils import convert_to_local as Local
from utils import has_attribute
from wrapper import progress
from wrapper import catch

View file

@ -480,3 +480,10 @@ def convert_to_local(date):
LOG.exception(error)
return str(date)
def has_attribute(obj, name):
try:
object.__getattribute__(obj, name)
return True
except AttributeError:
return False

View file

@ -5,7 +5,7 @@
import logging
from client import JellyfinClient
from helpers import has_attribute
from helper import has_attribute
#################################################################################################

View file

@ -1,7 +0,0 @@
def has_attribute(obj, name):
try:
object.__getattribute__(obj, name)
return True
except AttributeError:
return False

View file

@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
#################################################################################################
import logging
from uuid import uuid4
#################################################################################################
LOG = logging.getLogger('JELLYFIN.' + __name__)
#################################################################################################
def generate_client_id():
return str("%012X" % uuid4())