From c55cdf3a730ca60741dfe046c614336d9f2ce2dc Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Dec 2010 01:00:33 +0100 Subject: [PATCH] update post after stream update --- etc/init/pandora-tasks.conf | 2 +- pandora/item/models.py | 5 +++-- pandora/item/tasks.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/init/pandora-tasks.conf b/etc/init/pandora-tasks.conf index f6d1840cc..6928ccce9 100644 --- a/etc/init/pandora-tasks.conf +++ b/etc/init/pandora-tasks.conf @@ -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 diff --git a/pandora/item/models.py b/pandora/item/models.py index 4c655cdd7..3c2cc4160 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -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: diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index 029efebf9..57b13d6e1 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -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() +