mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-22 15:38:03 +02:00
2018-12-20 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'pypad_ando.py' script that caused duplicate PAD updates to be generated.
This commit is contained in:
parent
71102036f2
commit
8d1660d13f
@ -18253,3 +18253,6 @@
|
||||
* Removed the 'rlm_liqcomp' RLM.
|
||||
2018-12-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a typo in 'pypad_liqcomp.exemplar'.
|
||||
2018-12-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the 'pypad_ando.py' script that caused duplicate
|
||||
PAD updates to be generated.
|
||||
|
@ -25,15 +25,23 @@ import socket
|
||||
import configparser
|
||||
import PyPAD
|
||||
|
||||
last_updates={}
|
||||
|
||||
def eprint(*args,**kwargs):
|
||||
print(*args,file=sys.stderr,**kwargs)
|
||||
|
||||
def ProcessPad(update):
|
||||
try:
|
||||
last_updates[update.machine()]
|
||||
except KeyError:
|
||||
last_updates[update.machine()]=None
|
||||
|
||||
n=1
|
||||
while(True):
|
||||
section='System'+str(n)
|
||||
try:
|
||||
if update.shouldBeProcessed(section) and update.hasPadType(PyPAD.TYPE_NOW):
|
||||
if update.shouldBeProcessed(section) and update.hasPadType(PyPAD.TYPE_NOW) and (last_updates[update.machine()] != update.startDateTimeString(PyPAD.TYPE_NOW)):
|
||||
last_updates[update.machine()]=update.startDateTimeString(PyPAD.TYPE_NOW)
|
||||
title=update.resolvePadFields(update.config().get(section,'Title'),PyPAD.ESCAPE_NONE)
|
||||
artist=update.resolvePadFields(update.config().get(section,'Artist'),PyPAD.ESCAPE_NONE)
|
||||
album=update.resolvePadFields(update.config().get(section,'Album'),PyPAD.ESCAPE_NONE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user