mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-14 14:41:13 +02:00
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:
@@ -1,5 +1,5 @@
|
||||
; This is the sample configuration for the 'pypad_shoutcast1.py' script for
|
||||
; Rivendell, which can be used to update the metadata on an Shoutcast 1.x
|
||||
; Rivendell, which can be used to update the metadata on a Shoutcast
|
||||
; server using Now & Next data.
|
||||
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
; 'Shoutcast1' and working up consecutively
|
||||
[Shoutcast1]
|
||||
|
||||
; Username
|
||||
;
|
||||
; The username for the Shoutcast server instance to which to send updates.
|
||||
; (This option is seldom required).
|
||||
Username=
|
||||
|
||||
; Password
|
||||
;
|
||||
; The password of the Shoutcast server instance to which to send updates.
|
||||
@@ -30,7 +36,7 @@ Tcpport=8000
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=%a%20-%20%t
|
||||
FormatString=%a - %t
|
||||
|
||||
; Log Selection
|
||||
;
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user