From a29d464eb2fcd1338ffc3be5bb6d2183ff902f09 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 11 Mar 2015 18:34:50 -0400 Subject: [PATCH] SAAS-642: Files with doublequotes in their track titles fail to playout (pypo->LS communication bug) * Fixed it by escaping the command --- python_apps/pypo/telnetliquidsoap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_apps/pypo/telnetliquidsoap.py b/python_apps/pypo/telnetliquidsoap.py index 2f572ff13..391efe31d 100644 --- a/python_apps/pypo/telnetliquidsoap.py +++ b/python_apps/pypo/telnetliquidsoap.py @@ -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