merging changes

This commit is contained in:
rolux 2011-08-07 22:15:44 +00:00
commit cbb55fca29

View file

@ -961,22 +961,21 @@ class Item(models.Model):
def make_icon(self): def make_icon(self):
frame = self.get_poster_frame_path() frame = self.get_poster_frame_path()
if frame:
icon = self.path('icon.jpg') icon = self.path('icon.jpg')
self.icon.name = icon self.icon.name = icon
timeline = self.path('timeline.64.png') timeline = self.path('timeline.64.png')
timeline = os.path.abspath(os.path.join(settings.MEDIA_ROOT, timeline)) timeline = os.path.abspath(os.path.join(settings.MEDIA_ROOT, timeline))
if os.path.exists(timeline):
cmd = [settings.ITEM_ICON, cmd = [settings.ITEM_ICON,
'-f', frame,
'-l', timeline,
'-i', self.icon.path '-i', self.icon.path
] ]
if os.path.exists(timeline):
cmd += ['-l', timeline]
if frame:
cmd += ['-f', frame]
p = subprocess.Popen(cmd) p = subprocess.Popen(cmd)
p.wait() p.wait()
self.save() self.save()
return icon return icon
return None
def delete_item(sender, **kwargs): def delete_item(sender, **kwargs):
i = kwargs['instance'] i = kwargs['instance']