dont fail if sort is missing

This commit is contained in:
j 2012-11-16 02:03:39 +01:00
parent c364520226
commit 11ad4f9e2c

View file

@ -361,7 +361,7 @@ class Item(models.Model):
else: else:
self.poster_height = 128 self.poster_height = 128
self.poster_width = 80 self.poster_width = 80
if not settings.USE_IMDB: if not settings.USE_IMDB and self.sort:
if self.poster_frame == -1 and self.sort.duration: if self.poster_frame == -1 and self.sort.duration:
self.poster_frame = self.sort.duration/2 self.poster_frame = self.sort.duration/2
update_poster = True update_poster = True