Author: dmeyer
Date: Wed Feb 13 13:48:01 2008
New Revision: 10365
Log:
rename yield_execution to coroutine
Modified:
trunk/core/src/ipc/tvserver.py
trunk/core/src/resources.py
trunk/tvserver/src/epg.py
trunk/tvserver/src/recorder.py
trunk/tvserver/src/server.py
trunk/ui/src/audio/player.py
trunk/ui/src/directory.py
trunk/ui/src/image/plugins/calendar.py
trunk/ui/src/tv/favorite.py
trunk/ui/src/tv/plugins/directory.py
trunk/ui/src/tv/plugins/genre.py
trunk/ui/src/tv/plugins/guide.py
trunk/ui/src/tv/plugins/testguide.py
trunk/ui/src/tv/program.py
Modified: trunk/core/src/ipc/tvserver.py
==============================================================================
--- trunk/core/src/ipc/tvserver.py (original)
+++ trunk/core/src/ipc/tvserver.py Wed Feb 13 13:48:01 2008
@@ -134,7 +134,7 @@
self.updating = 0
- @kaa.yield_execution()
+ @kaa.coroutine()
def new_entity(self, entity):
if not entity.matches(SERVER):
yield True
@@ -183,7 +183,7 @@
return True
- @kaa.yield_execution(synchronize = True)
+ @kaa.coroutine(synchronize = True)
def _request_description(self):
if not self.server:
self.updating = 0
@@ -251,7 +251,7 @@
return self._recordings.values()
- @kaa.yield_execution()
+ @kaa.coroutine()
def schedule(self, prog):
if not self.server:
yield _('tvserver unavailable')
@@ -269,7 +269,7 @@
yield self.SUCCESS
- @kaa.yield_execution()
+ @kaa.coroutine()
def remove(self, id):
if not self.server:
yield _('tvserver unavailable')
@@ -321,7 +321,7 @@
instance.signals['lost-entity'].connect(self.lost_entity)
- @kaa.yield_execution()
+ @kaa.coroutine()
def new_entity(self, entity):
if not entity.matches(SERVER):
return
@@ -356,7 +356,7 @@
self._favorites.append(Favorite(*f))
- @kaa.yield_execution()
+ @kaa.coroutine()
def add(self, title, channels, days, times, priority, once):
"""
add a favorite
@@ -386,7 +386,7 @@
yield self.SUCCESS
- @kaa.yield_execution()
+ @kaa.coroutine()
def remove(self, id):
"""
remove a favorite
@@ -401,7 +401,7 @@
yield self.SUCCESS
- @kaa.yield_execution()
+ @kaa.coroutine()
def modify(self, id, info):
"""
remove a favorite
@@ -475,7 +475,7 @@
self.signals['disconnected'].emit()
- @kaa.yield_execution()
+ @kaa.coroutine()
def connect(self):
if not self.server:
return
Modified: trunk/core/src/resources.py
==============================================================================
--- trunk/core/src/resources.py (original)
+++ trunk/core/src/resources.py Wed Feb 13 13:48:01 2008
@@ -40,7 +40,7 @@
"""
__resources = {}
- @kaa.yield_execution(synchronize = True)
+ @kaa.coroutine(synchronize = True)
def get_resources(self, *resources, **kwargs):
"""
Reserve a list of resources. If one or more resources can not be
Modified: trunk/tvserver/src/epg.py
==============================================================================
--- trunk/tvserver/src/epg.py (original)
+++ trunk/tvserver/src/epg.py Wed Feb 13 13:48:01 2008
@@ -85,7 +85,7 @@
return kaa.epg.get_channels()
- @kaa.yield_execution()
+ @kaa.coroutine()
def check(self, recordings, favorites):
"""
Check recordings
@@ -190,7 +190,7 @@
break
- @kaa.yield_execution()
+ @kaa.coroutine()
def update(self):
"""
Update the epg data in the epg server
Modified: trunk/tvserver/src/recorder.py
==============================================================================
--- trunk/tvserver/src/recorder.py (original)
+++ trunk/tvserver/src/recorder.py Wed Feb 13 13:48:01 2008
@@ -145,7 +145,7 @@
return self.recorder.__iter__()
- @kaa.yield_execution()
+ @kaa.coroutine()
def new_entity(self, entity):
"""
Update recorders on entity changes.
@@ -248,7 +248,7 @@
self.possible_bouquets[-1].append(chan_obj.name)
- @kaa.yield_execution()
+ @kaa.coroutine()
def _describe(self):
"""
"""
@@ -400,7 +400,7 @@
self.check_timer.start(0.1)
- @kaa.yield_execution(synchronize = True)
+ @kaa.coroutine(synchronize = True)
def check_recordings(self):
"""
Check the internal list of recordings and add or remove them from
Modified: trunk/tvserver/src/server.py
==============================================================================
--- trunk/tvserver/src/server.py (original)
+++ trunk/tvserver/src/server.py Wed Feb 13 13:48:01 2008
@@ -222,7 +222,7 @@
return True
- @kaa.yield_execution()
+ @kaa.coroutine()
def epg_update(self):
"""
Update recordings based on favorites and epg.
Modified: trunk/ui/src/audio/player.py
==============================================================================
--- trunk/ui/src/audio/player.py (original)
+++ trunk/ui/src/audio/player.py Wed Feb 13 13:48:01 2008
@@ -192,7 +192,7 @@
"""
return True
- @kaa.yield_execution()
+ @kaa.coroutine()
def suspend(self):
"""
Release the audio resource that others can use it.
@@ -209,7 +209,7 @@
self.free_resources()
- @kaa.yield_execution()
+ @kaa.coroutine()
def resume(self):
"""
Resume playing the audio, at the position before.
Modified: trunk/ui/src/directory.py
==============================================================================
--- trunk/ui/src/directory.py (original)
+++ trunk/ui/src/directory.py Wed Feb 13 13:48:01 2008
@@ -326,7 +326,7 @@
return
- @kaa.yield_execution()
+ @kaa.coroutine()
def browse(self):
"""
Show the items in the directory in the menu
Modified: trunk/ui/src/image/plugins/calendar.py
==============================================================================
--- trunk/ui/src/image/plugins/calendar.py (original)
+++ trunk/ui/src/image/plugins/calendar.py Wed Feb 13 13:48:01 2008
@@ -69,7 +69,7 @@
return kaa.beacon.query(timestamp=q, type='image', **query)
- @kaa.yield_execution()
+ @kaa.coroutine()
def select(self):
"""
Select the item and generate a new menu.
@@ -99,7 +99,7 @@
self._month = month
- @kaa.yield_execution()
+ @kaa.coroutine()
def get_items(self, result):
"""
Return days as Playlist items
Modified: trunk/ui/src/tv/favorite.py
==============================================================================
--- trunk/ui/src/tv/favorite.py (original)
+++ trunk/ui/src/tv/favorite.py Wed Feb 13 13:48:01 2008
@@ -168,7 +168,7 @@
self.get_menustack().pushmenu(s)
- @kaa.yield_execution()
+ @kaa.coroutine()
def add(self):
result = yield tvserver.favorites.add(self.title, self.channels,
self.days,
[self._time_to_str()], 50, False)
@@ -180,7 +180,7 @@
self.get_menustack().back_one_menu()
- @kaa.yield_execution()
+ @kaa.coroutine()
def remove(self):
result = yield tvserver.favorites.remove(self.id)
if result != tvserver.favorites.SUCCESS:
@@ -190,7 +190,7 @@
MessageWindow(text).show()
self.get_menustack().back_one_menu()
- @kaa.yield_execution()
+ @kaa.coroutine()
def modify(self, info):
result = yield tvserver.favorites.modify(self.id, info)
if result != tvserver.favorites.SUCCESS:
Modified: trunk/ui/src/tv/plugins/directory.py
==============================================================================
--- trunk/ui/src/tv/plugins/directory.py (original)
+++ trunk/ui/src/tv/plugins/directory.py Wed Feb 13 13:48:01 2008
@@ -46,7 +46,7 @@
return [ ActionItem(_('Recorded Shows'), parent, self.browse) ]
return []
- @kaa.yield_execution()
+ @kaa.coroutine()
def browse(self, parent):
record_dir = yield kaa.beacon.get(config.tv.plugin.directory.path)
d = DirItem(record_dir, parent, type='tv')
Modified: trunk/ui/src/tv/plugins/genre.py
==============================================================================
--- trunk/ui/src/tv/plugins/genre.py (original)
+++ trunk/ui/src/tv/plugins/genre.py Wed Feb 13 13:48:01 2008
@@ -68,7 +68,7 @@
return [ Action(_('Browse list'), self.browse) ]
- @kaa.yield_execution()
+ @kaa.coroutine()
def browse(self):
"""
Find all the programs with this genre
@@ -110,7 +110,7 @@
return [ Action(_('Browse list'), self.browse)]
- @kaa.yield_execution()
+ @kaa.coroutine()
def browse(self):
"""
Find all genres that are in this category
@@ -152,7 +152,7 @@
Add 'Browse by Genre' to the TV menu.
"""
- @kaa.yield_execution()
+ @kaa.coroutine()
def category(self, parent):
"""
Show all category.
Modified: trunk/ui/src/tv/plugins/guide.py
==============================================================================
--- trunk/ui/src/tv/plugins/guide.py (original)
+++ trunk/ui/src/tv/plugins/guide.py Wed Feb 13 13:48:01 2008
@@ -95,7 +95,7 @@
return self.channels[co]
- @kaa.yield_execution()
+ @kaa.coroutine()
def get_program(self, timestamp=None):
"""
return a program object based on timestamp and the current channel.
Modified: trunk/ui/src/tv/plugins/testguide.py
==============================================================================
--- trunk/ui/src/tv/plugins/testguide.py (original)
+++ trunk/ui/src/tv/plugins/testguide.py Wed Feb 13 13:48:01 2008
@@ -124,7 +124,7 @@
else:
return 'default'
- @kaa.yield_execution()
+ @kaa.coroutine()
def update(self):
"""
update the guide information
Modified: trunk/ui/src/tv/program.py
==============================================================================
--- trunk/ui/src/tv/program.py (original)
+++ trunk/ui/src/tv/program.py Wed Feb 13 13:48:01 2008
@@ -287,7 +287,7 @@
#### Actions
- @kaa.yield_execution()
+ @kaa.coroutine()
def schedule(self):
"""
schedule this item for recording
@@ -305,7 +305,7 @@
self.get_menustack().back_one_menu()
- @kaa.yield_execution()
+ @kaa.coroutine()
def remove(self):
"""
remove this item from schedule
@@ -323,7 +323,7 @@
self.get_menustack().back_one_menu()
- @kaa.yield_execution()
+ @kaa.coroutine()
def channel_details(self):
"""
Browse all programs on this channel
@@ -353,7 +353,7 @@
MessageWindow('Not implemented yet').show()
- @kaa.yield_execution()
+ @kaa.coroutine()
def search_similar(self):
"""
Search the database for more of this program
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog