From 8ac78f3bd6c782b779c3d630eb11717e5a627026 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 26 Jun 2016 23:24:11 +0200 Subject: [PATCH] remove unused force flag from make_poster, update_timeline --- pandora/archive/views.py | 2 +- pandora/item/models.py | 8 ++++---- pandora/item/views.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index ec12a9a2a..cb138ad3e 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -200,7 +200,7 @@ def addMedia(request, data): } i.user = request.user i.save() - i.make_poster(True) + i.make_poster() f = models.File(oshash=oshash, item=i) f.path = data.get('filename', 'Untitled') extension = f.path.split('.') diff --git a/pandora/item/models.py b/pandora/item/models.py index b8aa1be1e..b2a122a83 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1310,7 +1310,7 @@ class Item(models.Model): qs = qs.order_by('file__part', 'file__sort_path') return qs - def update_timeline(self, force=False, async=True): + def update_timeline(self, async=True): streams = self.streams() self.make_timeline() if streams.count() == 1: @@ -1334,7 +1334,7 @@ class Item(models.Model): self.json = self.get_json() self.update_sort() self.select_frame() - self.make_poster(True) + self.make_poster() self.make_icon() self.make_torrent() self.rendered = streams.count() > 0 @@ -1385,9 +1385,9 @@ class Item(models.Model): for f in glob(os.path.join(settings.MEDIA_ROOT, self.path(), 'timeline*.jpg')): os.unlink(f) - def make_poster(self, force=False): + def make_poster(self): ox.makedirs(os.path.join(settings.MEDIA_ROOT, self.path())) - if not self.poster or force: + if not self.poster: poster = self.make_siteposter() url = self.prefered_poster_url() if url: diff --git a/pandora/item/views.py b/pandora/item/views.py index e083caec7..d79b00772 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -520,7 +520,7 @@ def add(request, data): if p: p.wait() else: - i.make_poster(True) + i.make_poster() response = json_response(status=200, text='created') response['data'] = i.get_json() add_changelog(request, data, i.public_id)