Fix local variable 'set_api' referenced before assignment
This commit is contained in:
parent
1ed0deebc3
commit
d6246a1cab
1 changed files with 5 additions and 5 deletions
|
@ -177,6 +177,7 @@ class Movie(ItemBase):
|
||||||
tags = [section_name]
|
tags = [section_name]
|
||||||
if collections:
|
if collections:
|
||||||
for plex_set_id, set_name in collections:
|
for plex_set_id, set_name in collections:
|
||||||
|
set_api = None
|
||||||
tags.append(set_name)
|
tags.append(set_name)
|
||||||
# Add any sets from Plex collection tags
|
# Add any sets from Plex collection tags
|
||||||
kodi_set_id = self.kodidb.create_collection(set_name)
|
kodi_set_id = self.kodidb.create_collection(set_name)
|
||||||
|
@ -203,11 +204,10 @@ class Movie(ItemBase):
|
||||||
elif plex_set_id in children:
|
elif plex_set_id in children:
|
||||||
# Provided by get_metadata thread
|
# Provided by get_metadata thread
|
||||||
set_api = API(children[plex_set_id][0])
|
set_api = API(children[plex_set_id][0])
|
||||||
else:
|
if set_api:
|
||||||
continue
|
self.kodidb.modify_artwork(set_api.artwork(),
|
||||||
self.kodidb.modify_artwork(set_api.artwork(),
|
kodi_set_id,
|
||||||
kodi_set_id,
|
v.KODI_TYPE_SET)
|
||||||
v.KODI_TYPE_SET)
|
|
||||||
self.kodidb.modify_tags(kodi_id, v.KODI_TYPE_MOVIE, tags)
|
self.kodidb.modify_tags(kodi_id, v.KODI_TYPE_MOVIE, tags)
|
||||||
# Process playstate
|
# Process playstate
|
||||||
self.kodidb.set_resume(file_id,
|
self.kodidb.set_resume(file_id,
|
||||||
|
|
Loading…
Reference in a new issue