Author: rshortt
Date: Wed Mar  8 16:21:41 2006
New Revision: 1252

Modified:
   trunk/WIP/epg2/src/client.py

Log:
Add channels_by_tuner_id.


Modified: trunk/WIP/epg2/src/client.py
==============================================================================
--- trunk/WIP/epg2/src/client.py        (original)
+++ trunk/WIP/epg2/src/client.py        Wed Mar  8 16:21:41 2006
@@ -34,6 +34,7 @@
     def _load(self):
         self._channels_by_name = {}
         self._channels_by_db_id = {}
+        self._channels_by_tuner_id = {}
         self._channels_list = []
         data = self._server.query(type="channel", __ipc_noproxy_result = True)
         for row in db.iter_raw_data(data, ("id", "tuner_id", "short_name", 
"long_name")):
@@ -42,6 +43,8 @@
             chan.db_id = db_id
             self._channels_by_name[short_name] = chan
             self._channels_by_db_id[db_id] = chan
+            if tuner_id:
+                self._channels_by_tuner_id[tuner_id] = chan
             self._channels_list.append(chan)
 
         self._max_program_length = self._server.get_max_program_length()
@@ -101,6 +104,11 @@
             return None
         return self._channels_by_db_id[db_id]
 
+    def get_channel_by_tuner_id(self, tuner_id):
+        if tuner_id not in self._channels_by_tuner_id:
+            return None
+        return self._channels_by_tuner_id[tuner_id]
+
     def get_max_program_length(self):
         return self._max_program_length
 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to