mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-07 17:32:20 +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:
parent
4a0ea00411
commit
a529ed4b24
@ -19409,3 +19409,8 @@
|
||||
2020-01-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Adjusted the position of the 'Matching Carts' readout on the
|
||||
main window of rdlibrary(1).
|
||||
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.
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# PAD processor for Rivendell
|
||||
#
|
||||
# (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
|
||||
@ -28,6 +28,7 @@ import socket
|
||||
import sys
|
||||
import syslog
|
||||
import json
|
||||
from urllib.parse import quote
|
||||
|
||||
#
|
||||
# Enumerated Constants (sort of)
|
||||
@ -102,27 +103,7 @@ class Update(object):
|
||||
return string
|
||||
|
||||
def __escapeWeb(self,string):
|
||||
string=string.replace("%","%25")
|
||||
string=string.replace(" ","%20")
|
||||
string=string.replace("<","%3C")
|
||||
string=string.replace(">","%3E")
|
||||
string=string.replace("#","%23")
|
||||
string=string.replace("\"","%22")
|
||||
string=string.replace("{","%7B")
|
||||
string=string.replace("}","%7D")
|
||||
string=string.replace("|","%7C")
|
||||
string=string.replace("\\","%5C")
|
||||
string=string.replace("^","%5E")
|
||||
string=string.replace("[","%5B")
|
||||
string=string.replace("]","%5D")
|
||||
string=string.replace("`","%60")
|
||||
string=string.replace("\a","%07")
|
||||
string=string.replace("\b","%08")
|
||||
string=string.replace("\f","%0C")
|
||||
string=string.replace("\n","%0A")
|
||||
string=string.replace("\r","%0D")
|
||||
string=string.replace("\t","%09")
|
||||
string=string.replace("\v","%0B")
|
||||
string=quote(string)
|
||||
return string
|
||||
|
||||
def __escapeJson(self,string):
|
||||
|
@ -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)
|
||||
|
@ -51,7 +51,7 @@ Requires: rivendell = @VERSION@, rivendell-webapi = @VERSION@
|
||||
|
||||
%package pypad
|
||||
Summary: PyPAD Program Associated Data script system for Rivendell
|
||||
Requires: python36, python36-pycurl, python36-requests, python36-pyserial, python36-mysql
|
||||
Requires: python36, python36-pycurl, python36-requests, python36-pyserial, python36-mysql python36-urllib3
|
||||
|
||||
%package select
|
||||
Summary: The RDSelect system selector tool for Rivendell.
|
||||
|
Loading…
x
Reference in New Issue
Block a user