forked from 0x2620/pandora
update post after stream update
This commit is contained in:
parent
dbde1770f3
commit
c55cdf3a73
3 changed files with 6 additions and 4 deletions
|
@ -15,5 +15,5 @@ script
|
||||||
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora)
|
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora)
|
||||||
cd $VENV/pandora
|
cd $VENV/pandora
|
||||||
exec /usr/bin/sudo -u pandora $VENV/bin/python $VENV/pandora/manage.py celeryd \
|
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
|
end script
|
||||||
|
|
|
@ -652,7 +652,8 @@ class Item(models.Model):
|
||||||
#extract.timeline_strip(self, self.data['cuts'], stream.info, self.timeline_prefix[:-8])
|
#extract.timeline_strip(self, self.data['cuts'], stream.info, self.timeline_prefix[:-8])
|
||||||
|
|
||||||
stream.extract_derivatives()
|
stream.extract_derivatives()
|
||||||
#something with poster
|
self.make_local_posters()
|
||||||
|
self.make_poster()
|
||||||
self.available = True
|
self.available = True
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
|
@ -697,7 +698,7 @@ class Item(models.Model):
|
||||||
return u.url
|
return u.url
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def download_poster(self, force=False):
|
def make_poster(self, force=False):
|
||||||
if not self.poster or force:
|
if not self.poster or force:
|
||||||
url = self.prefered_poster_url()
|
url = self.prefered_poster_url()
|
||||||
if url:
|
if url:
|
||||||
|
|
|
@ -15,7 +15,7 @@ def cronjob(**kwargs):
|
||||||
@task(ignore_resulsts=True, queue='default')
|
@task(ignore_resulsts=True, queue='default')
|
||||||
def update_poster(itemId):
|
def update_poster(itemId):
|
||||||
item = models.Item.objects.get(itemId=itemId)
|
item = models.Item.objects.get(itemId=itemId)
|
||||||
item.download_poster(True)
|
item.make_poster(True)
|
||||||
|
|
||||||
@task(ignore_resulsts=True, queue='default')
|
@task(ignore_resulsts=True, queue='default')
|
||||||
def update_imdb(imdbId):
|
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:
|
if item.files.filter(is_main=True, is_video=True, available=False).count() == 0:
|
||||||
item.update_streams()
|
item.update_streams()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue