modify nihonnooto module to use the modified ICapRadio

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2013-12-15 20:14:17 +01:00 committed by Florent
commit 6716787ad9
2 changed files with 19 additions and 6 deletions

View file

@ -57,3 +57,10 @@ class NihonNoOtoBackend(BaseBackend, ICapRadio, ICapCollection):
if rad.id == radio:
return rad
return None
def fill_radio(self, radio, fields):
if 'current' in fields:
return self.get_radio(radio.id)
return radio
OBJECTS = {Radio: fill_radio}