mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 21:56:13 +00:00
add first support for music library sync
This commit is contained in:
parent
87681ee850
commit
8839b3b323
7 changed files with 760 additions and 13 deletions
|
@ -48,12 +48,18 @@ def convertEncoding(data):
|
|||
except:
|
||||
return data
|
||||
|
||||
def KodiSQL():
|
||||
connection = sqlite3.connect(getKodiDBPath())
|
||||
def KodiSQL(type="video"):
|
||||
|
||||
if type == "music":
|
||||
dbPath = getKodiMusicDBPath()
|
||||
else:
|
||||
dbPath = getKodiVideoDBPath()
|
||||
|
||||
connection = sqlite3.connect(dbPath)
|
||||
|
||||
return connection
|
||||
|
||||
def getKodiDBPath():
|
||||
def getKodiVideoDBPath():
|
||||
if xbmc.getInfoLabel("System.BuildVersion").startswith("13"):
|
||||
#gotham
|
||||
dbVersion = "78"
|
||||
|
@ -68,6 +74,22 @@ def getKodiDBPath():
|
|||
|
||||
return dbPath
|
||||
|
||||
def getKodiMusicDBPath():
|
||||
if xbmc.getInfoLabel("System.BuildVersion").startswith("13"):
|
||||
#gotham
|
||||
dbVersion = "48"
|
||||
if xbmc.getInfoLabel("System.BuildVersion").startswith("15"):
|
||||
#isengard
|
||||
dbVersion = "52"
|
||||
else:
|
||||
#helix
|
||||
dbVersion = "48"
|
||||
|
||||
dbPath = xbmc.translatePath("special://profile/Database/MyMusic" + dbVersion + ".db")
|
||||
|
||||
return dbPath
|
||||
|
||||
|
||||
def checkAuthentication():
|
||||
#check authentication
|
||||
if addonSettings.getSetting('username') != "" and addonSettings.getSetting('ipaddress') != "":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue