This commit is contained in:
rolux 2011-10-28 19:43:28 +00:00
commit 9b6b5e8176
3 changed files with 4 additions and 8 deletions

View file

@ -218,8 +218,8 @@ class Item(models.Model):
response = external_data('getData', {'id': self.itemId})
if response['status']['code'] == 200:
self.external_data = response['data']
self.save()
self.make_poster(True)
self.save()
def expand_connections(self):
c = self.get('connections')
@ -817,7 +817,6 @@ class Item(models.Model):
update = True
if update:
self.rendered = False
self.save()
self.update_timeline()
break
@ -943,7 +942,6 @@ class Item(models.Model):
if url:
data = ox.net.readUrl(url)
self.poster.save('poster.jpg', ContentFile(data))
self.save()
elif os.path.exists(poster):
with open(poster) as f:
data = f.read()
@ -1006,7 +1004,6 @@ class Item(models.Model):
if frames:
heat = [ox.image.getImageHeat(f['path']) for f in frames]
self.poster_frame = heat.index(max(heat))
self.save()
def get_poster_frame_path(self):
frames = self.poster_frames()
@ -1034,7 +1031,6 @@ class Item(models.Model):
cmd += ['-f', frame]
p = subprocess.Popen(cmd)
p.wait()
self.save()
icons = os.path.abspath(os.path.join(settings.MEDIA_ROOT, icon))
icons = glob(icons.replace('.jpg', '*.jpg'))
for f in filter(lambda p: not p.endswith('/icon.jpg'), icons):

View file

@ -17,7 +17,7 @@ def update_poster(itemId):
item = models.Item.objects.get(itemId=itemId)
item.make_poster(True)
item.make_icon()
item.save()
@task(ignore_resulsts=True, queue='default')
def update_external(itemId):

View file

@ -340,10 +340,10 @@ pandora.ui.infoView = function(data) {
)
.appendTo($text);
data.releaseDate && $('<div>')
data.releasedate && $('<div>')
.css(css)
.html(
formatKey('Release Date') + Ox.formatDate(data.releaseDate, '%A, %B %e, %Y')
formatKey('Release Date') + Ox.formatDate(data.releasedate, '%A, %B %e, %Y')
)
.appendTo($text);