Author: dmeyer
Date: Tue Apr 17 16:19:46 2007
New Revision: 9472

Modified:
   trunk/tvserver/src/config.py
   trunk/tvserver/src/epg.py

Log:
adjust to kaa.epg changes

Modified: trunk/tvserver/src/config.py
==============================================================================
--- trunk/tvserver/src/config.py        (original)
+++ trunk/tvserver/src/config.py        Tue Apr 17 16:19:46 2007
@@ -29,18 +29,17 @@
         desc=_('default filemask for recordings')),
     Var(name='dir', default='',
         desc=_('directory where to store recordings')) ]),
-
-    # epg group
-    Group(name='epg', desc=_('EPG settings'), schema=[
-    Var(name='database', default=freevo.conf.datafile('epg.sqlite'),
-        desc=_('epg database file'))
-    ])
     ])
-# Now add the source config
-sources = kaa.epg.sources.items()
-sources.sort(lambda x,y: cmp(x[0], y[0]))
-for name, module in sources:
-    config.epg.add_variable(name, module.config)
+
+
+# add kaa.epg data
+config.add_variable('epg', kaa.epg.config)
+
+# db location
+config.epg.add_variable('database', Var(
+    name='database',
+    default=freevo.conf.datafile('epg.sqlite'),
+    desc=_('epg database file')))
 
 # EPG mapping
 config.epg.add_variable('mapping', Dict(

Modified: trunk/tvserver/src/epg.py
==============================================================================
--- trunk/tvserver/src/epg.py   (original)
+++ trunk/tvserver/src/epg.py   Tue Apr 17 16:19:46 2007
@@ -204,24 +204,16 @@
             yield False
 
         self.updating = True
-        sources = kaa.epg.sources.items()[:]
-        sources.sort(lambda x,y: cmp(x[0], y[0]))
 
-        while sources:
-            name, module = sources.pop(0)
-            if not module.config.activate:
-                log.info('skip epg update on %s', name)
-                continue
-
-            if kaa.epg.guide.status == kaa.epg.CONNECTED:
-                log.info('start epg update on %s', name)
-                wait = kaa.epg.guide.update(name)
-                yield wait
-                try:
-                    wait()
-                except Exception, e:
-                    log.exception(e)
-            log.info('done epg update on %s', name)
+        # start update
+        # FIXME: latest kaa.epg changes do not block the rpc
+        # until the update is complete. That is a bug here!
+        wait = kaa.epg.guide.update(name)
+        yield wait
+        try:
+            wait()
+        except Exception, e:
+            log.exception(e)
 
         log.info('epg update complete')
         self.updating = False

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to