mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-22 23:48: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.
|
* Remove deleted scheduler codes from rdlogmanager(1) events.
|
||||||
* Changed empty scheduler code selection from "" to "[none]" in
|
* Changed empty scheduler code selection from "" to "[none]" in
|
||||||
rdlogmanager(1) event editor.
|
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):
|
def __openDb(self):
|
||||||
creds=self.__getDbCredentials()
|
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):
|
def setPadCallback(self,callback):
|
||||||
"""
|
"""
|
||||||
@ -906,8 +908,9 @@ class Receiver(object):
|
|||||||
c=sock.recv(1)
|
c=sock.recv(1)
|
||||||
line+=c
|
line+=c
|
||||||
if c[0]==10:
|
if c[0]==10:
|
||||||
msg+=line.decode('utf-8')
|
linebytes=line.decode('utf-8','replace')
|
||||||
if line.decode('utf-8')=="\r\n":
|
msg+=linebytes
|
||||||
|
if linebytes=='\r\n':
|
||||||
self.__pypad_Process(Update(json.loads(msg),self.__config_parser,rd_config))
|
self.__pypad_Process(Update(json.loads(msg),self.__config_parser,rd_config))
|
||||||
msg=""
|
msg=""
|
||||||
line=bytes()
|
line=bytes()
|
||||||
|
@ -31,31 +31,38 @@ import configparser
|
|||||||
|
|
||||||
def ProcessPad(update):
|
def ProcessPad(update):
|
||||||
if update.hasPadType(pypad.TYPE_NOW):
|
if update.hasPadType(pypad.TYPE_NOW):
|
||||||
section='Station'+str(n)
|
n=1
|
||||||
n=1
|
while(True):
|
||||||
while(update.config().has_section(section)):
|
section='Station'+str(n)
|
||||||
values={}
|
try:
|
||||||
values['id']=update.config().get(section,'StationID')
|
values={}
|
||||||
values['partnerId']=update.config().get(section,'PartnerID')
|
values['id']=update.config().get(section,'StationID')
|
||||||
values['partnerKey']=update.config().get(section,'PartnerKey')
|
values['partnerId']=update.config().get(section,'PartnerID')
|
||||||
values['title']=update.resolvePadFields(update.config().get(section,'TitleString'),pypad.ESCAPE_NONE)
|
values['partnerKey']=update.config().get(section,'PartnerKey')
|
||||||
values['artist']=update.resolvePadFields(update.config().get(section,'ArtistString'),pypad.ESCAPE_NONE)
|
values['title']=update.resolvePadFields(update.config().get(section,'TitleString'),pypad.ESCAPE_NONE)
|
||||||
values['album']=update.resolvePadFields(update.config().get(section,'AlbumString'),pypad.ESCAPE_NONE)
|
values['artist']=update.resolvePadFields(update.config().get(section,'ArtistString'),pypad.ESCAPE_NONE)
|
||||||
update.syslog(syslog.LOG_INFO,'Updating TuneIn: artist='+values['artist']+' title='+values['title']+' album='+values['album'])
|
values['album']=update.resolvePadFields(update.config().get(section,'AlbumString'),pypad.ESCAPE_NONE)
|
||||||
try:
|
except configparser.NoSectionError:
|
||||||
response=requests.get('http://air.radiotime.com/Playing.ashx',params=values)
|
if(n==1):
|
||||||
response.raise_for_status()
|
update.syslog(syslog.LOG_WARNING,'No station config found')
|
||||||
except requests.exceptions.RequestException as e:
|
return
|
||||||
update.syslog(syslog.LOG_WARNING,str(e))
|
|
||||||
else:
|
#
|
||||||
xml=ET.fromstring(response.text)
|
# Now, send the update
|
||||||
status=xml.find('./head/status')
|
#
|
||||||
if(status.text!='200'):
|
if update.shouldBeProcessed(section):
|
||||||
update.syslog(syslog.LOG_WARNING,'Update Failed: '+xml.find('./head/fault').text)
|
update.syslog(syslog.LOG_INFO,'Updating TuneIn: artist='+values['artist']+' title='+values['title']+' album='+values['album'])
|
||||||
n=n+1
|
try:
|
||||||
section='Station'+str(n)
|
response=requests.get('http://air.radiotime.com/Playing.ashx',params=values)
|
||||||
if(n==1):
|
response.raise_for_status()
|
||||||
update.syslog(syslog.LOG_WARNING,'No station config found')
|
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
|
# Program Name
|
||||||
|
@ -1239,18 +1239,6 @@ ze &souboru</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<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>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1230,18 +1230,6 @@ senden</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<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>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1230,18 +1230,6 @@ Color</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<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>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1116,17 +1116,13 @@ La Couleur</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<name>RDCueEdit</name>
|
||||||
<message>
|
|
||||||
<source>&Audition</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>&Pause</source>
|
<source>&Pause</source>
|
||||||
<translation>&Pause</translation>
|
<translation type="obsolete">&Pause</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Stop</source>
|
<source>&Stop</source>
|
||||||
<translation>&Stop</translation>
|
<translation type="obsolete">&Stop</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
|
@ -1229,18 +1229,6 @@ farge</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<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>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1229,18 +1229,6 @@ farge</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<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>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1230,18 +1230,6 @@ Cor</translation>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDCueEdit</name>
|
<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>
|
<message>
|
||||||
<source>Start</source>
|
<source>Start</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -118,7 +118,7 @@ RDCueEdit::RDCueEdit(RDCae *cae,int card,int port,QWidget *parent)
|
|||||||
edit_audition_button->
|
edit_audition_button->
|
||||||
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
||||||
edit_audition_button->setFont(button_font);
|
edit_audition_button->setFont(button_font);
|
||||||
edit_audition_button->setText(tr("&Audition"));
|
// edit_audition_button->setText(tr("&Audition"));
|
||||||
connect(edit_audition_button,SIGNAL(clicked()),
|
connect(edit_audition_button,SIGNAL(clicked()),
|
||||||
this,SLOT(auditionButtonData()));
|
this,SLOT(auditionButtonData()));
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ RDCueEdit::RDCueEdit(RDCae *cae,int card,int port,QWidget *parent)
|
|||||||
edit_pause_button->
|
edit_pause_button->
|
||||||
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
||||||
edit_pause_button->setFont(button_font);
|
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()));
|
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->
|
edit_stop_button->
|
||||||
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
setPalette(QPalette(backgroundColor(),QColor(Qt::gray)));
|
||||||
edit_stop_button->setFont(button_font);
|
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()));
|
connect(edit_stop_button,SIGNAL(clicked()),this,SLOT(stopButtonData()));
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user