mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-22 07:28:04 +02:00
Merge remote-tracking branch 'upstream/master'
Conflicts: ChangeLog
This commit is contained in:
commit
930cd1749a
12
ChangeLog
12
ChangeLog
@ -19074,3 +19074,15 @@
|
||||
* Remove deleted scheduler codes from rdlogmanager(1) events.
|
||||
* Changed empty scheduler code selection from "" to "[none]" in
|
||||
rdlogmanager(1) event editor.
|
||||
2019-09-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed text labels from the transport button in the cue
|
||||
editor in rdairplay(1).
|
||||
2019-09-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the 'pypad' module that caused the DB connection
|
||||
to be opened in 'latin1' mode.
|
||||
2019-09-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the 'pypad' module so as not to throw a
|
||||
'UnicodeDecodeError' exception when processing a PAD update
|
||||
containing an invalid UTF-8 character.
|
||||
2019-09-02 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Refactored 'pypad_tunein.py' ProcessPad while loop.
|
||||
|
@ -797,7 +797,9 @@ class Receiver(object):
|
||||
|
||||
def __openDb(self):
|
||||
creds=self.__getDbCredentials()
|
||||
return MySQLdb.connect(creds[2],creds[0],creds[1],creds[3])
|
||||
return MySQLdb.connect(user=creds[0],password=creds[1],
|
||||
host=creds[2],database=creds[3],
|
||||
charset='utf8mb4')
|
||||
|
||||
def setPadCallback(self,callback):
|
||||
"""
|
||||
@ -906,8 +908,9 @@ class Receiver(object):
|
||||
c=sock.recv(1)
|
||||
line+=c
|
||||
if c[0]==10:
|
||||
msg+=line.decode('utf-8')
|
||||
if line.decode('utf-8')=="\r\n":
|
||||
linebytes=line.decode('utf-8','replace')
|
||||
msg+=linebytes
|
||||
if linebytes=='\r\n':
|
||||
self.__pypad_Process(Update(json.loads(msg),self.__config_parser,rd_config))
|
||||
msg=""
|
||||
line=bytes()
|
||||
|
@ -31,31 +31,38 @@ import configparser
|
||||
|
||||
def ProcessPad(update):
|
||||
if update.hasPadType(pypad.TYPE_NOW):
|
||||
section='Station'+str(n)
|
||||
n=1
|
||||
while(update.config().has_section(section)):
|
||||
values={}
|
||||
values['id']=update.config().get(section,'StationID')
|
||||
values['partnerId']=update.config().get(section,'PartnerID')
|
||||
values['partnerKey']=update.config().get(section,'PartnerKey')
|
||||
values['title']=update.resolvePadFields(update.config().get(section,'TitleString'),pypad.ESCAPE_NONE)
|
||||
values['artist']=update.resolvePadFields(update.config().get(section,'ArtistString'),pypad.ESCAPE_NONE)
|
||||
values['album']=update.resolvePadFields(update.config().get(section,'AlbumString'),pypad.ESCAPE_NONE)
|
||||
update.syslog(syslog.LOG_INFO,'Updating TuneIn: artist='+values['artist']+' title='+values['title']+' album='+values['album'])
|
||||
try:
|
||||
response=requests.get('http://air.radiotime.com/Playing.ashx',params=values)
|
||||
response.raise_for_status()
|
||||
except requests.exceptions.RequestException as e:
|
||||
update.syslog(syslog.LOG_WARNING,str(e))
|
||||
else:
|
||||
xml=ET.fromstring(response.text)
|
||||
status=xml.find('./head/status')
|
||||
if(status.text!='200'):
|
||||
update.syslog(syslog.LOG_WARNING,'Update Failed: '+xml.find('./head/fault').text)
|
||||
n=n+1
|
||||
section='Station'+str(n)
|
||||
if(n==1):
|
||||
update.syslog(syslog.LOG_WARNING,'No station config found')
|
||||
n=1
|
||||
while(True):
|
||||
section='Station'+str(n)
|
||||
try:
|
||||
values={}
|
||||
values['id']=update.config().get(section,'StationID')
|
||||
values['partnerId']=update.config().get(section,'PartnerID')
|
||||
values['partnerKey']=update.config().get(section,'PartnerKey')
|
||||
values['title']=update.resolvePadFields(update.config().get(section,'TitleString'),pypad.ESCAPE_NONE)
|
||||
values['artist']=update.resolvePadFields(update.config().get(section,'ArtistString'),pypad.ESCAPE_NONE)
|
||||
values['album']=update.resolvePadFields(update.config().get(section,'AlbumString'),pypad.ESCAPE_NONE)
|
||||
except configparser.NoSectionError:
|
||||
if(n==1):
|
||||
update.syslog(syslog.LOG_WARNING,'No station config found')
|
||||
return
|
||||
|
||||
#
|
||||
# Now, send the update
|
||||
#
|
||||
if update.shouldBeProcessed(section):
|
||||
update.syslog(syslog.LOG_INFO,'Updating TuneIn: artist='+values['artist']+' title='+values['title']+' album='+values['album'])
|
||||
try:
|
||||
response=requests.get('http://air.radiotime.com/Playing.ashx',params=values)
|
||||
response.raise_for_status()
|
||||
except requests.exceptions.RequestException as e:
|
||||
update.syslog(syslog.LOG_WARNING,str(e))
|
||||
else:
|
||||
xml=ET.fromstring(response.text)
|
||||
status=xml.find('./head/status')
|
||||
if(status.text!='200'):
|
||||
update.syslog(syslog.LOG_WARNING,'Update Failed: '+xml.find('./head/fault').text)
|
||||
n=n+1
|
||||
|
||||
#
|
||||
# Program Name
|
||||
|
@ -1239,18 +1239,6 @@ ze &souboru</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1230,18 +1230,6 @@ senden</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1230,18 +1230,6 @@ Color</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1116,17 +1116,13 @@ La Couleur</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation>&Pause</translation>
|
||||
<translation type="obsolete">&Pause</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation>&Stop</translation>
|
||||
<translation type="obsolete">&Stop</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
|
@ -1229,18 +1229,6 @@ farge</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1229,18 +1229,6 @@ farge</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1230,18 +1230,6 @@ Cor</translation>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDCueEdit</name>
|
||||
<message>
|
||||
<source>&Audition</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -118,7 +118,7 @@ RDCueEdit::RDCueEdit(RDCae *cae,int card,int port,QWidget *parent)
|
||||
edit_audition_button->
|
||||
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
||||
edit_audition_button->setFont(button_font);
|
||||
edit_audition_button->setText(tr("&Audition"));
|
||||
// edit_audition_button->setText(tr("&Audition"));
|
||||
connect(edit_audition_button,SIGNAL(clicked()),
|
||||
this,SLOT(auditionButtonData()));
|
||||
|
||||
@ -130,7 +130,7 @@ RDCueEdit::RDCueEdit(RDCae *cae,int card,int port,QWidget *parent)
|
||||
edit_pause_button->
|
||||
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
||||
edit_pause_button->setFont(button_font);
|
||||
edit_pause_button->setText(tr("&Pause"));
|
||||
// edit_pause_button->setText(tr("&Pause"));
|
||||
connect(edit_pause_button,SIGNAL(clicked()),this,SLOT(pauseButtonData()));
|
||||
|
||||
//
|
||||
@ -142,7 +142,7 @@ RDCueEdit::RDCueEdit(RDCae *cae,int card,int port,QWidget *parent)
|
||||
edit_stop_button->
|
||||
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
||||
edit_stop_button->setFont(button_font);
|
||||
edit_stop_button->setText(tr("&Stop"));
|
||||
// edit_stop_button->setText(tr("&Stop"));
|
||||
connect(edit_stop_button,SIGNAL(clicked()),this,SLOT(stopButtonData()));
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user