Skip to content

Commit

Permalink
remove subtitle node when parameter empty
Browse files Browse the repository at this point in the history
  • Loading branch information
saerdnaer committed Oct 27, 2017
1 parent dae32c4 commit 7760bc9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions renderlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def rendertask(task):
parser = etree.XMLParser(huge_tree=True)
svg = etree.fromstring(svgstr.encode('utf-8'), parser)

if task.parameters['$subtitle'] == '':
child = svg.findall(".//*[@id='subtitle']")[0]
child.getparent().remove(child)

# frame-number counter
frameNr = 0

Expand Down

0 comments on commit 7760bc9

Please sign in to comment.