mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
fixes for mysql support
This commit is contained in:
parent
cb8df35a1e
commit
65c74ba014
1 changed files with 3 additions and 10 deletions
|
@ -84,10 +84,10 @@ def checkKodiSources():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def KodiSQL():
|
def KodiSQL():
|
||||||
if xbmc.getinfolabel("System.BuildVersion").startswith("13"):
|
if xbmc.getInfoLabel("System.BuildVersion").startswith("13"):
|
||||||
#gotham
|
#gotham
|
||||||
dbVersion = "78"
|
dbVersion = "78"
|
||||||
if xbmc.getinfolabel("System.BuildVersion").startswith("15"):
|
if xbmc.getInfoLabel("System.BuildVersion").startswith("15"):
|
||||||
#isengard
|
#isengard
|
||||||
dbVersion = "91"
|
dbVersion = "91"
|
||||||
else:
|
else:
|
||||||
|
@ -100,7 +100,7 @@ def KodiSQL():
|
||||||
if xbmcvfs.exists(settingsFile):
|
if xbmcvfs.exists(settingsFile):
|
||||||
tree = ET.ElementTree(file=settingsFile)
|
tree = ET.ElementTree(file=settingsFile)
|
||||||
root = tree.getroot()
|
root = tree.getroot()
|
||||||
video = root.find("videolibrary")
|
video = root.find("videodatabase")
|
||||||
if video != None:
|
if video != None:
|
||||||
mysql = video.find("type")
|
mysql = video.find("type")
|
||||||
if mysql != None:
|
if mysql != None:
|
||||||
|
@ -113,13 +113,6 @@ def KodiSQL():
|
||||||
db_name = video.find("name").text
|
db_name = video.find("name").text
|
||||||
else:
|
else:
|
||||||
db_name = "MyVideos"
|
db_name = "MyVideos"
|
||||||
|
|
||||||
SubElement(video, "importwatchedstate").text = "true"
|
|
||||||
if video.find("importresumepoint") == None:
|
|
||||||
writeNeeded = True
|
|
||||||
SubElement(video, "importresumepoint").text = "true"
|
|
||||||
|
|
||||||
|
|
||||||
if useMySQL:
|
if useMySQL:
|
||||||
import local.mysql.connector as database
|
import local.mysql.connector as database
|
||||||
connection = database.connect(dbPath)
|
connection = database.connect(dbPath)
|
||||||
|
|
Loading…
Reference in a new issue