Merge remote-tracking branch 'MediaBrowser/master' into develop
This commit is contained in:
commit
b2663da584
3 changed files with 40 additions and 29 deletions
|
@ -561,7 +561,7 @@ def createListItemFromEmbyItem(item,art=artwork.Artwork(),doUtils=downloadutils.
|
||||||
runtime = item.get("RunTimeTicks",0)/ 10000000.0
|
runtime = item.get("RunTimeTicks",0)/ 10000000.0
|
||||||
seektime = userdata['Resume']
|
seektime = userdata['Resume']
|
||||||
if seektime:
|
if seektime:
|
||||||
li.setProperty("resumetime", seektime)
|
li.setProperty("resumetime", str(seektime))
|
||||||
li.setProperty("totaltime", str(runtime))
|
li.setProperty("totaltime", str(runtime))
|
||||||
|
|
||||||
played = userdata['Played']
|
played = userdata['Played']
|
||||||
|
|
|
@ -1246,8 +1246,8 @@ class TVShows(Items):
|
||||||
self.logMsg("UPDATE episode itemid: %s - Title: %s" % (itemid, title), 1)
|
self.logMsg("UPDATE episode itemid: %s - Title: %s" % (itemid, title), 1)
|
||||||
|
|
||||||
# Update the movie entry
|
# Update the movie entry
|
||||||
if kodiversion == 16:
|
if kodiversion in (16, 17):
|
||||||
# Kodi Jarvis
|
# Kodi Jarvis, Krypton
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"UPDATE episode",
|
"UPDATE episode",
|
||||||
|
@ -1284,8 +1284,8 @@ class TVShows(Items):
|
||||||
# Add the file
|
# Add the file
|
||||||
fileid = kodi_db.addFile(filename, pathid)
|
fileid = kodi_db.addFile(filename, pathid)
|
||||||
# Create the episode entry
|
# Create the episode entry
|
||||||
if kodiversion == 16:
|
if kodiversion in (16, 17):
|
||||||
# Kodi Jarvis
|
# Kodi Jarvis, Krypton
|
||||||
query = (
|
query = (
|
||||||
'''
|
'''
|
||||||
INSERT INTO episode(
|
INSERT INTO episode(
|
||||||
|
@ -1609,7 +1609,7 @@ class Music(Items):
|
||||||
|
|
||||||
|
|
||||||
# Process the artist
|
# Process the artist
|
||||||
if kodiversion == 16:
|
if self.kodiversion in (16, 17):
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"UPDATE artist",
|
"UPDATE artist",
|
||||||
|
@ -1696,7 +1696,18 @@ class Music(Items):
|
||||||
|
|
||||||
|
|
||||||
# Process the album info
|
# Process the album info
|
||||||
if kodiversion == 16:
|
if kodiversion == 17:
|
||||||
|
# Kodi Krypton
|
||||||
|
query = ' '.join((
|
||||||
|
|
||||||
|
"UPDATE album",
|
||||||
|
"SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, strImage = ?,",
|
||||||
|
"iUserrating = ?, lastScraped = ?, strReleaseType = ?",
|
||||||
|
"WHERE idAlbum = ?"
|
||||||
|
))
|
||||||
|
kodicursor.execute(query, (artistname, year, genre, bio, thumb, rating, lastScraped,
|
||||||
|
"album", albumid))
|
||||||
|
elif kodiversion == 16:
|
||||||
# Kodi Jarvis
|
# Kodi Jarvis
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
|
@ -1917,8 +1928,8 @@ class Music(Items):
|
||||||
# No album found, create a single's album
|
# No album found, create a single's album
|
||||||
kodicursor.execute("select coalesce(max(idAlbum),0) from album")
|
kodicursor.execute("select coalesce(max(idAlbum),0) from album")
|
||||||
albumid = kodicursor.fetchone()[0] + 1
|
albumid = kodicursor.fetchone()[0] + 1
|
||||||
if kodiversion == 16:
|
if kodiversion in (16, 17):
|
||||||
# Kodi Jarvis
|
# Kodi Jarvis, Krypton
|
||||||
query = (
|
query = (
|
||||||
'''
|
'''
|
||||||
INSERT INTO album(idAlbum, strGenres, iYear, strReleaseType)
|
INSERT INTO album(idAlbum, strGenres, iYear, strReleaseType)
|
||||||
|
@ -2029,8 +2040,8 @@ class Music(Items):
|
||||||
else:
|
else:
|
||||||
if addArtist:
|
if addArtist:
|
||||||
artists_onalbum = " / ".join(artists_name)
|
artists_onalbum = " / ".join(artists_name)
|
||||||
if kodiversion == 16:
|
if kodiversion in (16, 17):
|
||||||
# Kodi Jarvis
|
# Kodi Jarvis, Krypton
|
||||||
query = "UPDATE album SET strArtists = ? WHERE idAlbum = ?"
|
query = "UPDATE album SET strArtists = ? WHERE idAlbum = ?"
|
||||||
kodicursor.execute(query, (artists_onalbum, albumid))
|
kodicursor.execute(query, (artists_onalbum, albumid))
|
||||||
elif kodiversion == 15:
|
elif kodiversion == 15:
|
||||||
|
|
|
@ -141,8 +141,8 @@ class Kodidb_Functions():
|
||||||
|
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
|
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
for country in countries:
|
for country in countries:
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@ class Kodidb_Functions():
|
||||||
type = person['Type']
|
type = person['Type']
|
||||||
thumb = person['imageurl']
|
thumb = person['imageurl']
|
||||||
|
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
if kodiversion in (15, 16):
|
if kodiversion in (15, 16, 17):
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"SELECT actor_id",
|
"SELECT actor_id",
|
||||||
|
@ -422,8 +422,8 @@ class Kodidb_Functions():
|
||||||
|
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
|
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Delete current genres for clean slate
|
# Delete current genres for clean slate
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
|
@ -542,8 +542,8 @@ class Kodidb_Functions():
|
||||||
|
|
||||||
for studio in studios:
|
for studio in studios:
|
||||||
|
|
||||||
if kodiversion in (15, 16):
|
if kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"SELECT studio_id",
|
"SELECT studio_id",
|
||||||
|
@ -710,8 +710,8 @@ class Kodidb_Functions():
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
|
|
||||||
# First, delete any existing tags associated to the id
|
# First, delete any existing tags associated to the id
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"DELETE FROM tag_link",
|
"DELETE FROM tag_link",
|
||||||
|
@ -738,8 +738,8 @@ class Kodidb_Functions():
|
||||||
|
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
|
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"SELECT tag_id",
|
"SELECT tag_id",
|
||||||
|
@ -802,8 +802,8 @@ class Kodidb_Functions():
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
|
|
||||||
# This will create and return the tag_id
|
# This will create and return the tag_id
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"SELECT tag_id",
|
"SELECT tag_id",
|
||||||
|
@ -850,8 +850,8 @@ class Kodidb_Functions():
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
self.logMsg("Updating: %s with %s for %s: %s" % (oldtag, newtag, mediatype, kodiid), 2)
|
self.logMsg("Updating: %s with %s for %s: %s" % (oldtag, newtag, mediatype, kodiid), 2)
|
||||||
|
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
try:
|
try:
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
|
@ -903,8 +903,8 @@ class Kodidb_Functions():
|
||||||
|
|
||||||
cursor = self.cursor
|
cursor = self.cursor
|
||||||
|
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16, 17):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis, Krypton
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"SELECT tag_id",
|
"SELECT tag_id",
|
||||||
|
|
Loading…
Reference in a new issue