Author: dmeyer
Date: Sun Mar 18 11:35:52 2007
New Revision: 2569
Modified:
trunk/epg/src/__init__.py
trunk/epg/src/client.py
Log:
fix channel listing when connecting
Modified: trunk/epg/src/__init__.py
==============================================================================
--- trunk/epg/src/__init__.py (original)
+++ trunk/epg/src/__init__.py Sun Mar 18 11:35:52 2007
@@ -45,9 +45,6 @@
from server import Server
from sources import *
-# kaa.epg import for internal use
-from util import cmp_channel
-
# get logging object
log = logging.getLogger('epg')
@@ -70,12 +67,7 @@
Return a list of all channels.
"""
if not guide.status == DISCONNECTED:
- if sort:
- channels = guide.get_channels()[:]
- channels.sort(lambda a, b: cmp(a.name, b.name))
- channels.sort(lambda a, b: cmp_channel(a, b))
- return channels
- return guide.get_channels()
+ return guide.get_channels(sort)
return []
Modified: trunk/epg/src/client.py
==============================================================================
--- trunk/epg/src/client.py (original)
+++ trunk/epg/src/client.py Sun Mar 18 11:35:52 2007
@@ -41,6 +41,7 @@
# kaa.epg imports
from channel import Channel
from program import Program
+from util import cmp_channel
# get logging object
log = logging.getLogger('epg')
@@ -265,10 +266,15 @@
@yield_execution_while_connecting()
- def get_channels(self):
+ def get_channels(self, sort=False):
"""
Get all channels
"""
+ if sort:
+ channels = self._channels_list[:]
+ channels.sort(lambda a, b: cmp(a.name, b.name))
+ channels.sort(lambda a, b: cmp_channel(a, b))
+ return channels
return self._channels_list
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog