2020-01-23 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the 'pypad-shoutcast1.py' script that threw an
	exception when processing PAD containing multi-type UTF-8 characters.
	* Added a 'python36-urllib3' dependency to the 'rivendell-pypad'
	RPM package.
This commit is contained in:
Fred Gleason
2020-01-23 08:32:21 -05:00
parent 4a0ea00411
commit a529ed4b24
5 changed files with 19 additions and 27 deletions

View File

@@ -4,7 +4,7 @@
#
# Write PAD updates to a Shoutcast 1 instance
#
# (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
# (C) Copyright 2018-2020 Fred Gleason <fredg@paravelsystems.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -39,7 +39,7 @@ def ProcessPad(update):
#
section='Shoutcast'+str(n)
try:
song=update.resolvePadFields(update.config().get(section,'FormatString'),pypad.ESCAPE_URL)
song=update.escape(update.resolvePadFields(update.config().get(section,'FormatString'),pypad.ESCAPE_NONE),pypad.ESCAPE_URL)
url='http://'+update.config().get(section,'Hostname')+':'+str(update.config().get(section,'Tcpport'))+'/admin.cgi?pass='+update.escape(update.config().get(section,'Password'),pypad.ESCAPE_URL)+'&mode=updinfo&song='+song
curl=pycurl.Curl()
curl.setopt(curl.URL,url)