mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 12:16:12 +00:00
jarvis support
This commit is contained in:
parent
f7fe85faae
commit
75a877ee9e
2 changed files with 17 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.emby"
|
<addon id="plugin.video.emby"
|
||||||
name="Emby"
|
name="Emby"
|
||||||
version="1.1.46"
|
version="1.1.47"
|
||||||
provider-name="Emby.media">
|
provider-name="Emby.media">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
|
|
|
@ -549,7 +549,7 @@ class WriteKodiVideoDB():
|
||||||
self.updateSeasons(embyId, showid, connection, cursor)
|
self.updateSeasons(embyId, showid, connection, cursor)
|
||||||
|
|
||||||
def addOrUpdateEpisodeToKodiLibrary(self, embyId, showid, connection, cursor):
|
def addOrUpdateEpisodeToKodiLibrary(self, embyId, showid, connection, cursor):
|
||||||
|
kodiVersion = self.kodiversion
|
||||||
MBitem = ReadEmbyDB().getFullItem(embyId)
|
MBitem = ReadEmbyDB().getFullItem(embyId)
|
||||||
|
|
||||||
if not MBitem:
|
if not MBitem:
|
||||||
|
@ -637,6 +637,8 @@ class WriteKodiVideoDB():
|
||||||
except: # Season does not exist, update seasons
|
except: # Season does not exist, update seasons
|
||||||
self.updateSeasons(seriesId, showid, connection, cursor)
|
self.updateSeasons(seriesId, showid, connection, cursor)
|
||||||
|
|
||||||
|
cursor.execute("SELECT idSeason FROM seasons WHERE idShow = ? and season = ?", (showid, season,))
|
||||||
|
idSeason = cursor.fetchone()[0]
|
||||||
|
|
||||||
##### UPDATE THE EPISODE #####
|
##### UPDATE THE EPISODE #####
|
||||||
if episodeid:
|
if episodeid:
|
||||||
|
@ -650,6 +652,10 @@ class WriteKodiVideoDB():
|
||||||
query = "UPDATE files SET strFilename = ? WHERE idFile = ?"
|
query = "UPDATE files SET strFilename = ? WHERE idFile = ?"
|
||||||
cursor.execute(query, (filename, fileid))
|
cursor.execute(query, (filename, fileid))
|
||||||
|
|
||||||
|
if kodiVersion == 16:
|
||||||
|
query = "UPDATE episode SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?, c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ? WHERE idEpisode = ?"
|
||||||
|
cursor.execute(query, (title, plot, rating, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, airsBeforeEpisode, idSeason ,episodeid))
|
||||||
|
else:
|
||||||
query = "UPDATE episode SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?, c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ? WHERE idEpisode = ?"
|
query = "UPDATE episode SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?, c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ? WHERE idEpisode = ?"
|
||||||
cursor.execute(query, (title, plot, rating, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, airsBeforeEpisode, episodeid))
|
cursor.execute(query, (title, plot, rating, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, airsBeforeEpisode, episodeid))
|
||||||
|
|
||||||
|
@ -689,6 +695,10 @@ class WriteKodiVideoDB():
|
||||||
# Create the episode
|
# Create the episode
|
||||||
cursor.execute("select coalesce(max(idEpisode),0) as episodeid from episode")
|
cursor.execute("select coalesce(max(idEpisode),0) as episodeid from episode")
|
||||||
episodeid = cursor.fetchone()[0] + 1
|
episodeid = cursor.fetchone()[0] + 1
|
||||||
|
if kodiVersion == 16:
|
||||||
|
query = "INSERT INTO episode(idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14, idShow, c15, c16, idSeason) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
||||||
|
cursor.execute(query, (episodeid, fileid, title, plot, rating, writer, premieredate, runtime, director, season, episode, title, showid, airsBeforeSeason, airsBeforeEpisode, idSeason))
|
||||||
|
else:
|
||||||
query = "INSERT INTO episode(idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14, idShow, c15, c16) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
query = "INSERT INTO episode(idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14, idShow, c15, c16) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
||||||
cursor.execute(query, (episodeid, fileid, title, plot, rating, writer, premieredate, runtime, director, season, episode, title, showid, airsBeforeSeason, airsBeforeEpisode))
|
cursor.execute(query, (episodeid, fileid, title, plot, rating, writer, premieredate, runtime, director, season, episode, title, showid, airsBeforeSeason, airsBeforeEpisode))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue