pass item data to icon
This commit is contained in:
parent
49ef611bdb
commit
02b89c06dd
2 changed files with 10 additions and 2 deletions
|
@ -1614,6 +1614,13 @@ class Item(models.Model):
|
||||||
cmd += ['-l', timeline]
|
cmd += ['-l', timeline]
|
||||||
if frame:
|
if frame:
|
||||||
cmd += ['-f', frame]
|
cmd += ['-f', frame]
|
||||||
|
if settings.ITEM_POSTER_DATA:
|
||||||
|
cmd += '-d', '-'
|
||||||
|
data = self.json()
|
||||||
|
data = utils.normalize_dict('NFC', data)
|
||||||
|
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, close_fds=True)
|
||||||
|
p.communicate(json.dumps(data, default=to_json).encode('utf-8'))
|
||||||
|
else:
|
||||||
p = subprocess.Popen(cmd, close_fds=True)
|
p = subprocess.Popen(cmd, close_fds=True)
|
||||||
p.wait()
|
p.wait()
|
||||||
# remove cached versions
|
# remove cached versions
|
||||||
|
|
|
@ -264,6 +264,7 @@ SCRIPT_ROOT = normpath(join(PROJECT_ROOT, '..', 'scripts'))
|
||||||
#change script to customize
|
#change script to customize
|
||||||
ITEM_POSTER = join(SCRIPT_ROOT, 'poster.py')
|
ITEM_POSTER = join(SCRIPT_ROOT, 'poster.py')
|
||||||
ITEM_ICON = join(SCRIPT_ROOT, 'item_icon.py')
|
ITEM_ICON = join(SCRIPT_ROOT, 'item_icon.py')
|
||||||
|
ITEM_ICON_DATA = False
|
||||||
LIST_ICON = join(SCRIPT_ROOT, 'list_icon.py')
|
LIST_ICON = join(SCRIPT_ROOT, 'list_icon.py')
|
||||||
COLLECTION_ICON = join(SCRIPT_ROOT, 'list_icon.py')
|
COLLECTION_ICON = join(SCRIPT_ROOT, 'list_icon.py')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue