forked from 0x2620/pandora
icon without frame
This commit is contained in:
parent
881ce6513d
commit
6c25558c82
1 changed files with 14 additions and 15 deletions
|
@ -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()
|
||||||
|
icon = self.path('icon.jpg')
|
||||||
|
self.icon.name = icon
|
||||||
|
timeline = self.path('timeline.64.png')
|
||||||
|
timeline = os.path.abspath(os.path.join(settings.MEDIA_ROOT, timeline))
|
||||||
|
cmd = [settings.ITEM_ICON,
|
||||||
|
'-i', self.icon.path
|
||||||
|
]
|
||||||
|
if os.path.exists(timeline):
|
||||||
|
cmd += ['-l', timeline]
|
||||||
if frame:
|
if frame:
|
||||||
icon = self.path('icon.jpg')
|
cmd += ['-f', frame]
|
||||||
self.icon.name = icon
|
p = subprocess.Popen(cmd)
|
||||||
timeline = self.path('timeline.64.png')
|
p.wait()
|
||||||
timeline = os.path.abspath(os.path.join(settings.MEDIA_ROOT, timeline))
|
self.save()
|
||||||
if os.path.exists(timeline):
|
return icon
|
||||||
cmd = [settings.ITEM_ICON,
|
|
||||||
'-f', frame,
|
|
||||||
'-l', timeline,
|
|
||||||
'-i', self.icon.path
|
|
||||||
]
|
|
||||||
p = subprocess.Popen(cmd)
|
|
||||||
p.wait()
|
|
||||||
self.save()
|
|
||||||
return icon
|
|
||||||
return None
|
|
||||||
|
|
||||||
def delete_item(sender, **kwargs):
|
def delete_item(sender, **kwargs):
|
||||||
i = kwargs['instance']
|
i = kwargs['instance']
|
||||||
|
|
Loading…
Reference in a new issue