New fix item episode thumbs not caching
This commit is contained in:
parent
f060a71237
commit
d01cf199e5
3 changed files with 18 additions and 6 deletions
|
@ -3,7 +3,6 @@ from urllib import urlencode
|
||||||
from ast import literal_eval
|
from ast import literal_eval
|
||||||
from urlparse import urlparse, parse_qs
|
from urlparse import urlparse, parse_qs
|
||||||
import re
|
import re
|
||||||
import time
|
|
||||||
|
|
||||||
from xbmcaddon import Addon
|
from xbmcaddon import Addon
|
||||||
|
|
||||||
|
|
|
@ -421,7 +421,7 @@ class Artwork():
|
||||||
cursor.execute(query, (imageUrl, kodiId, mediaType, imageType))
|
cursor.execute(query, (imageUrl, kodiId, mediaType, imageType))
|
||||||
|
|
||||||
# Cache fanart and poster in Kodi texture cache
|
# Cache fanart and poster in Kodi texture cache
|
||||||
if cacheimage and imageType in ("fanart", "poster"):
|
if cacheimage and imageType in ("fanart", "poster", "thumb"):
|
||||||
self.CacheTexture(imageUrl)
|
self.CacheTexture(imageUrl)
|
||||||
|
|
||||||
def deleteArtwork(self, kodiid, mediatype, cursor):
|
def deleteArtwork(self, kodiid, mediatype, cursor):
|
||||||
|
|
|
@ -43,6 +43,8 @@ class Items(object):
|
||||||
|
|
||||||
self.artwork = artwork.Artwork()
|
self.artwork = artwork.Artwork()
|
||||||
self.emby = embyserver.Read_EmbyServer()
|
self.emby = embyserver.Read_EmbyServer()
|
||||||
|
self.userid = utils.window('currUserId')
|
||||||
|
self.server = utils.window('pms_server')
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1445,8 +1447,21 @@ class TVShows(Items):
|
||||||
people = API.getPeopleList()
|
people = API.getPeopleList()
|
||||||
kodi_db.addPeople(episodeid, people, "episode")
|
kodi_db.addPeople(episodeid, people, "episode")
|
||||||
# Process artwork
|
# Process artwork
|
||||||
artworks = API.getAllArtwork()
|
# Wide "screenshot" of particular episode
|
||||||
artwork.addOrUpdateArt(artworks['Primary'], episodeid, "episode", "thumb", kodicursor)
|
poster = item.attrib.get('thumb')
|
||||||
|
if poster:
|
||||||
|
poster = API.addPlexCredentialsToUrl(
|
||||||
|
"%s%s" % (self.server, poster))
|
||||||
|
artwork.addOrUpdateArt(
|
||||||
|
poster, episodeid, "episode", "thumb", kodicursor)
|
||||||
|
# poster of TV show itself
|
||||||
|
# poster = item.attrib.get('grandparentThumb')
|
||||||
|
# if poster:
|
||||||
|
# poster = API.addPlexCredentialsToUrl(
|
||||||
|
# "%s%s" % (self.server, poster))
|
||||||
|
# artwork.addOrUpdateArt(
|
||||||
|
# poster, episodeid, "episode", "poster", kodicursor)
|
||||||
|
|
||||||
# Process stream details
|
# Process stream details
|
||||||
streams = API.getMediaStreams()
|
streams = API.getMediaStreams()
|
||||||
kodi_db.addStreams(fileid, streams, runtime)
|
kodi_db.addStreams(fileid, streams, runtime)
|
||||||
|
@ -1609,8 +1624,6 @@ class Music(Items):
|
||||||
self.enableimportsongrating = utils.settings('enableImportSongRating') == "true"
|
self.enableimportsongrating = utils.settings('enableImportSongRating') == "true"
|
||||||
self.enableexportsongrating = utils.settings('enableExportSongRating') == "true"
|
self.enableexportsongrating = utils.settings('enableExportSongRating') == "true"
|
||||||
self.enableupdatesongrating = utils.settings('enableUpdateSongRating') == "true"
|
self.enableupdatesongrating = utils.settings('enableUpdateSongRating') == "true"
|
||||||
self.userid = utils.window('currUserId')
|
|
||||||
self.server = utils.window('pms_server')
|
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue