SAAS-642: Files with doublequotes in their track titles fail to playout

(pypo->LS communication bug)

* Fixed it by escaping the command
This commit is contained in:
Albert Santoni 2015-03-11 18:34:50 -04:00
parent b868e4cd46
commit a29d464eb2
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ def create_liquidsoap_annotation(media):
# which doesn't get saved back to the file.)
if 'metadata' in media:
if 'artist_name' in media['metadata']:
annotation += ',artist="%s"' % (media['metadata']['artist_name'])
annotation += ',artist="%s"' % (media['metadata']['artist_name'].replace('"', '\\"'))
if 'track_title' in media['metadata']:
annotation += ',title="%s"' % (media['metadata']['track_title'])
annotation += ',title="%s"' % (media['metadata']['track_title'].replace('"', '\\"'))
annotation += ":" + filename