Rename database to plex.db
This commit is contained in:
parent
ed281ad847
commit
266ad70605
7 changed files with 10 additions and 10 deletions
|
@ -21,7 +21,7 @@ class GetEmbyDB():
|
|||
and the db gets closed
|
||||
"""
|
||||
def __enter__(self):
|
||||
self.embyconn = kodiSQL('emby')
|
||||
self.embyconn = kodiSQL('plex')
|
||||
self.emby_db = Embydb_Functions(self.embyconn.cursor())
|
||||
return self.emby_db
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ def deleteItem():
|
|||
return
|
||||
|
||||
from utils import kodiSQL
|
||||
embyconn = kodiSQL('emby')
|
||||
embyconn = kodiSQL('plex')
|
||||
embycursor = embyconn.cursor()
|
||||
emby_db = embydb.Embydb_Functions(embycursor)
|
||||
item = emby_db.getItem_byKodiId(dbid, itemtype)
|
||||
|
|
|
@ -45,7 +45,7 @@ class Items(object):
|
|||
"""
|
||||
Open DB connections and cursors
|
||||
"""
|
||||
self.embyconn = kodiSQL('emby')
|
||||
self.embyconn = kodiSQL('plex')
|
||||
self.embycursor = self.embyconn.cursor()
|
||||
self.kodiconn = kodiSQL('video')
|
||||
self.kodicursor = self.kodiconn.cursor()
|
||||
|
@ -1249,7 +1249,7 @@ class Music(Items):
|
|||
OVERWRITE this method, because we need to open another DB.
|
||||
Open DB connections and cursors
|
||||
"""
|
||||
self.embyconn = kodiSQL('emby')
|
||||
self.embyconn = kodiSQL('plex')
|
||||
self.embycursor = self.embyconn.cursor()
|
||||
# Here it is, not 'video' but 'music'
|
||||
self.kodiconn = kodiSQL('music')
|
||||
|
|
|
@ -124,7 +124,7 @@ class KodiMonitor(xbmc.Monitor):
|
|||
log.info("Item is invalid for emby deletion.")
|
||||
else:
|
||||
# Send the delete action to the server.
|
||||
embyconn = utils.kodiSQL('emby')
|
||||
embyconn = utils.kodiSQL('plex')
|
||||
embycursor = embyconn.cursor()
|
||||
emby_db = embydb.Embydb_Functions(embycursor)
|
||||
emby_dbitem = emby_db.getItem_byKodiId(kodiid, type)
|
||||
|
|
|
@ -532,7 +532,7 @@ class LibrarySync(Thread):
|
|||
"""
|
||||
Run once during startup to verify that emby db exists.
|
||||
"""
|
||||
embyconn = kodiSQL('emby')
|
||||
embyconn = kodiSQL('plex')
|
||||
embycursor = embyconn.cursor()
|
||||
# Create the tables for the emby database
|
||||
# emby, view, version
|
||||
|
|
|
@ -101,7 +101,7 @@ class Read_EmbyServer():
|
|||
viewId = view['Id']
|
||||
|
||||
# Compare to view table in emby database
|
||||
emby = kodiSQL('emby')
|
||||
emby = kodiSQL('plex')
|
||||
cursor_emby = emby.cursor()
|
||||
query = ' '.join((
|
||||
|
||||
|
|
|
@ -217,8 +217,8 @@ def getUnixTimestamp(secondsIntoTheFuture=None):
|
|||
|
||||
def kodiSQL(media_type="video"):
|
||||
|
||||
if media_type == "emby":
|
||||
dbPath = tryDecode(xbmc.translatePath("special://database/emby.db"))
|
||||
if media_type == "plex":
|
||||
dbPath = tryDecode(xbmc.translatePath("special://database/plex.db"))
|
||||
elif media_type == "music":
|
||||
dbPath = getKodiMusicDBPath()
|
||||
elif media_type == "texture":
|
||||
|
@ -363,7 +363,7 @@ def reset():
|
|||
|
||||
# Wipe the Plex database
|
||||
log.info("Resetting the Plex database.")
|
||||
connection = kodiSQL('emby')
|
||||
connection = kodiSQL('plex')
|
||||
cursor = connection.cursor()
|
||||
cursor.execute('SELECT tbl_name FROM sqlite_master WHERE type="table"')
|
||||
rows = cursor.fetchall()
|
||||
|
|
Loading…
Reference in a new issue