Permalink
Browse files

add favorites.update

git-svn-id: svn://svn.freevo.org/freevo/trunk/tvserver@11066 cc3e1ea1-1e01-0410-8d68-8b121e83a9d5
  • Loading branch information...
Dischi committed Sep 22, 2008
1 parent 314b3ac commit d89be39f8c7217f28e73e7c8091daf5fe949d463
Showing with 19 additions and 5 deletions.
  1. +6 −0 src/favorite.py
  2. +12 −4 src/rpc.py
  3. +1 −1 test/test.py
View
@@ -100,6 +100,12 @@ def get(self, title, channel, start, stop):
return f
return None
+ def update(self):
+ """
+ Check list of favorites against EPG and update
+ """
+ return self._link.favorite_update()
+
def add(self, title, channels, days, times, priority, once):
"""
add a favorite
View
@@ -117,6 +117,14 @@ def recording_remove(self, id):
raise RuntimeError('not connected to tvserver')
return self.rpc('recording_remove', id)
+ def favorite_update(self):
+ """
+ Check list of favorites against EPG and update
+ """
+ if not self.connected:
+ raise RuntimeError('not connected to tvserver')
+ return self.rpc('favorite_update')
+
def favorite_add(self, title, channels, days, times, priority, once):
"""
add a favorite
@@ -159,12 +167,12 @@ def favorite_modify(self, id, **kwargs):
def identify(self):
return 'client'
- @kaa.rpc.expose()
- def recording_update(self, *recordings):
+ @kaa.rpc.expose('recording_update')
+ def _recording_update(self, *recordings):
self.recordings._update(recordings)
self.signals['changed'].emit()
- @kaa.rpc.expose()
- def favorite_update(self, *fav):
+ @kaa.rpc.expose('favorite_update')
+ def _favorite_update(self, *fav):
self.recordings._update(fav)
self.signals['changed'].emit()
View
@@ -13,7 +13,7 @@ def main():
yield tvserver.wait()
if 0:
yield kaa.epg.update()
- yield server.favorite_update()
+ yield tvserver.favorites.update()
if 0:
for r in tvserver.recordings:
print r

0 comments on commit d89be39

Please sign in to comment.