keep poster service selection even if poster gets updated, fixes #1098
This commit is contained in:
parent
2473dfd231
commit
f0b8824f62
2 changed files with 8 additions and 7 deletions
|
@ -463,7 +463,7 @@ class Item(models.Model):
|
|||
for service in external_posters:
|
||||
p = external_posters[service][0]
|
||||
p['source'] = service
|
||||
p['selected'] = p['url'] == url
|
||||
p['selected'] = self.poster_source and self.poster_source == service or False
|
||||
p['index'] = index.index(service)
|
||||
posters.append(p)
|
||||
posters.sort(key=lambda a: a['index'])
|
||||
|
|
|
@ -49,6 +49,7 @@ def update_poster(itemId):
|
|||
item = models.Item.objects.get(itemId=itemId)
|
||||
item.make_poster(True)
|
||||
item.make_icon()
|
||||
if item.poster and os.path.exists(item.poster.path):
|
||||
models.Item.objects.filter(pk=item.id).update(
|
||||
poster=item.poster.name,
|
||||
poster_height=item.poster.height,
|
||||
|
|
Loading…
Reference in a new issue