Merge pull request #713 from croneter/fix-collections
Fix processing of collections in special cases
This commit is contained in:
commit
7a0b9c8fca
2 changed files with 3 additions and 3 deletions
|
@ -189,7 +189,7 @@ class Movie(ItemBase):
|
||||||
# e.g. when added via websocket
|
# e.g. when added via websocket
|
||||||
LOG.debug('Costly looking up Plex collection %s: %s',
|
LOG.debug('Costly looking up Plex collection %s: %s',
|
||||||
plex_set_id, set_name)
|
plex_set_id, set_name)
|
||||||
for index, coll_plex_id in api.collections_match():
|
for index, coll_plex_id in api.collections_match(section_id):
|
||||||
# Get Plex artwork for collections - a pain
|
# Get Plex artwork for collections - a pain
|
||||||
if index == plex_set_id:
|
if index == plex_set_id:
|
||||||
set_xml = PF.GetPlexMetadata(coll_plex_id)
|
set_xml = PF.GetPlexMetadata(coll_plex_id)
|
||||||
|
|
|
@ -1256,7 +1256,7 @@ class API(object):
|
||||||
"""
|
"""
|
||||||
return self.item.get('librarySectionID')
|
return self.item.get('librarySectionID')
|
||||||
|
|
||||||
def collections_match(self):
|
def collections_match(self, section_id):
|
||||||
"""
|
"""
|
||||||
Downloads one additional xml from the PMS in order to return a list of
|
Downloads one additional xml from the PMS in order to return a list of
|
||||||
tuples [(collection_id, plex_id), ...] for all collections of the
|
tuples [(collection_id, plex_id), ...] for all collections of the
|
||||||
|
@ -1264,7 +1264,7 @@ class API(object):
|
||||||
Pass in the collection id of e.g. the movie's metadata
|
Pass in the collection id of e.g. the movie's metadata
|
||||||
"""
|
"""
|
||||||
if self.collections is None:
|
if self.collections is None:
|
||||||
self.collections = PF.collections(self.library_section_id())
|
self.collections = PF.collections(section_id)
|
||||||
if self.collections is None:
|
if self.collections is None:
|
||||||
LOG.error('Could not download collections for %s',
|
LOG.error('Could not download collections for %s',
|
||||||
self.library_section_id())
|
self.library_section_id())
|
||||||
|
|
Loading…
Reference in a new issue