Skip to content

Commit

Permalink
Fix libraries sync when jellyfin library has apostrophes in name
Browse files Browse the repository at this point in the history
  • Loading branch information
loidy committed Nov 4, 2019
1 parent 3775f4a commit b3b33c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/lib/helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ def indent(elem, level=0):
def write_xml(content, file):
with open(file, 'w') as infile:

content = content.replace("'", '"')
def replace_apostrophes(match):
return match.group(0).replace("'", '"')

content = re.sub("<(.*?)>", replace_apostrophes, content)

content = content.replace('?>', ' standalone="yes" ?>', 1)
infile.write(content)

Expand Down

0 comments on commit b3b33c9

Please sign in to comment.