diff --git a/pandora/item/models.py b/pandora/item/models.py index dc8ace5d1..ec54b5f49 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -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): diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index ad1ab12a6..f1a7dacc2 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -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): diff --git a/static/js/pandora/infoView.js b/static/js/pandora/infoView.js index 92382a49b..0ef654a85 100644 --- a/static/js/pandora/infoView.js +++ b/static/js/pandora/infoView.js @@ -340,10 +340,10 @@ pandora.ui.infoView = function(data) { ) .appendTo($text); - data.releaseDate && $('
') + data.releasedate && $('
') .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);