Don't try to get fanart for episodes, seasons
This commit is contained in:
parent
4cfb8c4610
commit
c9dd44f498
1 changed files with 26 additions and 18 deletions
|
@ -867,6 +867,7 @@ class LibrarySync(Thread):
|
|||
'viewName': xxx,
|
||||
'viewId': xxx,
|
||||
'title': xxx
|
||||
'mediaType': xxx, e.g. 'movie', 'episode'
|
||||
|
||||
self.allPlexElementsId APPENDED(!!) dict
|
||||
= {itemid: checksum}
|
||||
|
@ -886,12 +887,15 @@ class LibrarySync(Thread):
|
|||
# Only update if movie is not in Kodi or checksum is
|
||||
# different
|
||||
if kodi_checksum != plex_checksum:
|
||||
self.updatelist.append({'itemId': itemId,
|
||||
'itemType': itemType,
|
||||
'method': method,
|
||||
'viewName': viewName,
|
||||
'viewId': viewId,
|
||||
'title': title})
|
||||
self.updatelist.append({
|
||||
'itemId': itemId,
|
||||
'itemType': itemType,
|
||||
'method': method,
|
||||
'viewName': viewName,
|
||||
'viewId': viewId,
|
||||
'title': title,
|
||||
'mediaType': item.attrib.get('type')
|
||||
})
|
||||
else:
|
||||
# Initial or repair sync: get all Plex movies
|
||||
for item in xml:
|
||||
|
@ -903,12 +907,15 @@ class LibrarySync(Thread):
|
|||
plex_checksum = ("K%s%s"
|
||||
% (itemId, item.attrib.get('updatedAt', '')))
|
||||
self.allPlexElementsId[itemId] = plex_checksum
|
||||
self.updatelist.append({'itemId': itemId,
|
||||
'itemType': itemType,
|
||||
'method': method,
|
||||
'viewName': viewName,
|
||||
'viewId': viewId,
|
||||
'title': title})
|
||||
self.updatelist.append({
|
||||
'itemId': itemId,
|
||||
'itemType': itemType,
|
||||
'method': method,
|
||||
'viewName': viewName,
|
||||
'viewId': viewId,
|
||||
'title': title,
|
||||
'mediaType': item.attrib.get('type')
|
||||
})
|
||||
|
||||
def GetAndProcessXMLs(self, itemType, showProgress=True):
|
||||
"""
|
||||
|
@ -999,12 +1006,13 @@ class LibrarySync(Thread):
|
|||
# Save to queue for later processing
|
||||
typus = {'Movies': 'movie', 'TVShows': 'tvshow'}[itemType]
|
||||
for item in self.updatelist:
|
||||
self.fanartqueue.put({
|
||||
'itemId': item['itemId'],
|
||||
'class': itemType,
|
||||
'mediaType': typus,
|
||||
'refresh': False
|
||||
})
|
||||
if item['mediaType'] in ('movie', 'tvshow'):
|
||||
self.fanartqueue.put({
|
||||
'itemId': item['itemId'],
|
||||
'class': itemType,
|
||||
'mediaType': typus,
|
||||
'refresh': False
|
||||
})
|
||||
self.updatelist = []
|
||||
|
||||
@LogTime
|
||||
|
|
Loading…
Reference in a new issue