mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Don't import DatabaseConn initialized
This creates import loops. It's always better to initialize them within the class' __init__
This commit is contained in:
parent
16df4d6404
commit
82c31e0672
1 changed files with 3 additions and 3 deletions
|
@ -8,8 +8,8 @@ import hashlib
|
|||
import xbmc
|
||||
|
||||
import downloadutils
|
||||
import database
|
||||
from utils import window, settings
|
||||
from database import DatabaseConn
|
||||
from contextlib import closing
|
||||
|
||||
#################################################################################################
|
||||
|
@ -27,7 +27,7 @@ class Read_EmbyServer():
|
|||
def __init__(self):
|
||||
|
||||
self.doUtils = downloadutils.DownloadUtils().downloadUrl
|
||||
|
||||
self.database = database.DatabaseConn
|
||||
self.userId = window('emby_currUser')
|
||||
self.server = window('emby_server%s' % self.userId)
|
||||
|
||||
|
@ -107,7 +107,7 @@ class Read_EmbyServer():
|
|||
viewId = view['Id']
|
||||
|
||||
# Compare to view table in emby database
|
||||
with DatabaseConn('emby') as conn:
|
||||
with self.database('emby') as conn:
|
||||
with closing(conn.cursor()) as cursor:
|
||||
query = ' '.join((
|
||||
|
||||
|
|
Loading…
Reference in a new issue