modify nectarine 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:13:56 +01:00 committed by Florent
commit 5f76ea4eef
2 changed files with 17 additions and 7 deletions

View file

@ -56,3 +56,10 @@ class NectarineBackend(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}