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,
|
'viewName': xxx,
|
||||||
'viewId': xxx,
|
'viewId': xxx,
|
||||||
'title': xxx
|
'title': xxx
|
||||||
|
'mediaType': xxx, e.g. 'movie', 'episode'
|
||||||
|
|
||||||
self.allPlexElementsId APPENDED(!!) dict
|
self.allPlexElementsId APPENDED(!!) dict
|
||||||
= {itemid: checksum}
|
= {itemid: checksum}
|
||||||
|
@ -886,12 +887,15 @@ class LibrarySync(Thread):
|
||||||
# Only update if movie is not in Kodi or checksum is
|
# Only update if movie is not in Kodi or checksum is
|
||||||
# different
|
# different
|
||||||
if kodi_checksum != plex_checksum:
|
if kodi_checksum != plex_checksum:
|
||||||
self.updatelist.append({'itemId': itemId,
|
self.updatelist.append({
|
||||||
|
'itemId': itemId,
|
||||||
'itemType': itemType,
|
'itemType': itemType,
|
||||||
'method': method,
|
'method': method,
|
||||||
'viewName': viewName,
|
'viewName': viewName,
|
||||||
'viewId': viewId,
|
'viewId': viewId,
|
||||||
'title': title})
|
'title': title,
|
||||||
|
'mediaType': item.attrib.get('type')
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
# Initial or repair sync: get all Plex movies
|
# Initial or repair sync: get all Plex movies
|
||||||
for item in xml:
|
for item in xml:
|
||||||
|
@ -903,12 +907,15 @@ class LibrarySync(Thread):
|
||||||
plex_checksum = ("K%s%s"
|
plex_checksum = ("K%s%s"
|
||||||
% (itemId, item.attrib.get('updatedAt', '')))
|
% (itemId, item.attrib.get('updatedAt', '')))
|
||||||
self.allPlexElementsId[itemId] = plex_checksum
|
self.allPlexElementsId[itemId] = plex_checksum
|
||||||
self.updatelist.append({'itemId': itemId,
|
self.updatelist.append({
|
||||||
|
'itemId': itemId,
|
||||||
'itemType': itemType,
|
'itemType': itemType,
|
||||||
'method': method,
|
'method': method,
|
||||||
'viewName': viewName,
|
'viewName': viewName,
|
||||||
'viewId': viewId,
|
'viewId': viewId,
|
||||||
'title': title})
|
'title': title,
|
||||||
|
'mediaType': item.attrib.get('type')
|
||||||
|
})
|
||||||
|
|
||||||
def GetAndProcessXMLs(self, itemType, showProgress=True):
|
def GetAndProcessXMLs(self, itemType, showProgress=True):
|
||||||
"""
|
"""
|
||||||
|
@ -999,6 +1006,7 @@ class LibrarySync(Thread):
|
||||||
# Save to queue for later processing
|
# Save to queue for later processing
|
||||||
typus = {'Movies': 'movie', 'TVShows': 'tvshow'}[itemType]
|
typus = {'Movies': 'movie', 'TVShows': 'tvshow'}[itemType]
|
||||||
for item in self.updatelist:
|
for item in self.updatelist:
|
||||||
|
if item['mediaType'] in ('movie', 'tvshow'):
|
||||||
self.fanartqueue.put({
|
self.fanartqueue.put({
|
||||||
'itemId': item['itemId'],
|
'itemId': item['itemId'],
|
||||||
'class': itemType,
|
'class': itemType,
|
||||||
|
|
Loading…
Reference in a new issue