update json cache too
This commit is contained in:
parent
c748527921
commit
31652fe3d8
1 changed files with 6 additions and 3 deletions
|
@ -712,11 +712,14 @@ def poster(request, id, size=None):
|
||||||
poster_path = os.path.join(settings.MEDIA_ROOT, item.path('poster.jpg'))
|
poster_path = os.path.join(settings.MEDIA_ROOT, item.path('poster.jpg'))
|
||||||
if os.path.exists(poster_path):
|
if os.path.exists(poster_path):
|
||||||
item.poster.name = item.path('poster.jpg')
|
item.poster.name = item.path('poster.jpg')
|
||||||
|
item.poster_height = item.poster.height
|
||||||
|
item.poster_width = item.poster.width
|
||||||
models.Item.objects.filter(pk=item.id).update(
|
models.Item.objects.filter(pk=item.id).update(
|
||||||
poster=item.poster.name,
|
poster=item.poster.name,
|
||||||
poster_height=item.poster.height,
|
poster_height=item.poster_height,
|
||||||
poster_width=item.poster.width,
|
poster_width=item.poster_width,
|
||||||
icon=item.icon.name
|
icon=item.icon.name,
|
||||||
|
json=item.get_json()
|
||||||
)
|
)
|
||||||
if item.poster:
|
if item.poster:
|
||||||
return image_to_response(item.poster, size)
|
return image_to_response(item.poster, size)
|
||||||
|
|
Loading…
Reference in a new issue