update post after stream update

This commit is contained in:
j 2010-12-01 01:00:33 +01:00
parent dbde1770f3
commit c55cdf3a73
3 changed files with 6 additions and 4 deletions

View file

@ -15,5 +15,5 @@ script
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora)
cd $VENV/pandora
exec /usr/bin/sudo -u pandora $VENV/bin/python $VENV/pandora/manage.py celeryd \
-Q tasks -f /var/log/pandora/pandora-tasks.log -l INFO
-Q default -f /var/log/pandora/pandora-tasks.log -l INFO
end script

View file

@ -652,7 +652,8 @@ class Item(models.Model):
#extract.timeline_strip(self, self.data['cuts'], stream.info, self.timeline_prefix[:-8])
stream.extract_derivatives()
#something with poster
self.make_local_posters()
self.make_poster()
self.available = True
self.save()
@ -697,7 +698,7 @@ class Item(models.Model):
return u.url
return None
def download_poster(self, force=False):
def make_poster(self, force=False):
if not self.poster or force:
url = self.prefered_poster_url()
if url:

View file

@ -15,7 +15,7 @@ def cronjob(**kwargs):
@task(ignore_resulsts=True, queue='default')
def update_poster(itemId):
item = models.Item.objects.get(itemId=itemId)
item.download_poster(True)
item.make_poster(True)
@task(ignore_resulsts=True, queue='default')
def update_imdb(imdbId):
@ -36,3 +36,4 @@ def update_streams(itemId):
if item.files.filter(is_main=True, is_video=True, available=False).count() == 0:
item.update_streams()