poster_path is local

This commit is contained in:
j 2012-07-05 15:45:01 +02:00
parent 5556d60ace
commit 752242e40c

View file

@ -75,7 +75,7 @@ class PosterCache(models.Model):
name = hashlib.sha1(url).hexdigest() name = hashlib.sha1(url).hexdigest()
try: try:
data = ox.net.readUrl(url) data = ox.net.readUrl(url)
self.image.name = poster.models.poster_path(self.url, 'image.jpg') self.image.name = poster_path(self.url, 'image.jpg')
with open(self.image.path, 'w') as f: with open(self.image.path, 'w') as f:
f.write(data) f.write(data)
self.save() self.save()