CC-2838: Character encoding errors with telnet'ing

show name to Liquidsoap

-fixed
This commit is contained in:
martin 2011-09-18 19:32:39 -04:00
parent d824eb7622
commit 0e503517f5
2 changed files with 7 additions and 3 deletions

View file

@ -58,6 +58,7 @@ if output_icecast_mp3 then
#format = %mp3(bitrate=192, samplerate=44100, stereo=false)
ignore(output.icecast(%mp3,
encoding = "UTF-8",
host = icecast_host,
port = icecast_port,
password = icecast_pass,
@ -75,6 +76,7 @@ end
if output_icecast_vorbis then
if output_icecast_vorbis_metadata then
ignore(output.icecast(%vorbis,
encoding = "UTF-8",
host = icecast_host,
port = icecast_port,
password = icecast_pass,

View file

@ -162,9 +162,11 @@ class PypoPush(Thread):
logger.debug('Preparing to push playlist %s' % pkey)
for item in playlist:
annotate = str(item['annotate'])
tn.write(('queue.push %s\n' % annotate).encode('latin-1'))
tn.write(('vars.show_name %s\n' % item['show_name']).encode('latin-1'))
annotate = item['annotate']
tn.write(str('queue.push %s\n' % annotate.encode('utf-8')))
show_name = item['show_name']
tn.write(str('vars.show_name %s\n' % show_name.encode('utf-8')))
tn.write("exit\n")
logger.debug(tn.read_all())