forked from 0x2620/pandora
setPoster
This commit is contained in:
parent
8639f6322e
commit
a80f1f9515
5 changed files with 6 additions and 4 deletions
|
|
@ -813,7 +813,7 @@ class Item(models.Model):
|
|||
def make_poster(self, force=False):
|
||||
posters = glob(os.path.abspath(os.path.join(settings.MEDIA_ROOT,
|
||||
self.path('poster.*.jpg'))))
|
||||
for f in filter(posters, lambda p: not p.endswith('poster.local.jpg')):
|
||||
for f in filter(lambda p: not p.endswith('poster.local.jpg'), posters):
|
||||
os.unlink(f)
|
||||
if not self.poster or force:
|
||||
url = self.prefered_poster_url()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue