fix sort check

This commit is contained in:
j 2012-11-16 02:27:09 +01:00
parent 11ad4f9e2c
commit ead22ed222
2 changed files with 11 additions and 5 deletions

2
README
View file

@ -146,6 +146,8 @@ Now you can open pandora in your browser, the first user to sign up will become
=== Updating ===
To update a pandora installation get the latest version from bzr by running
su pandora
cd /srv/pandora
./update.py
this will update pandora/oxjs/python-ox and list possible upgrades to the db

View file

@ -361,10 +361,14 @@ class Item(models.Model):
else:
self.poster_height = 128
self.poster_width = 80
if not settings.USE_IMDB and self.sort:
if self.poster_frame == -1 and self.sort.duration:
if not settings.USE_IMDB:
if self.poster_frame == -1:
try:
if self.sort.duration:
self.poster_frame = self.sort.duration/2
update_poster = True
except ItemSort.DoesNotExist:
pass
self.json = self.get_json()
self.json['modified'] = datetime.now()
super(Item, self).save(*args, **kwargs)