Author: rshortt
Date: Wed Mar 8 16:26:10 2006
New Revision: 8056
Modified:
trunk/WIP/RobShortt/webserver-epg2/src/pages/proginfo.py
trunk/WIP/RobShortt/webserver-epg2/src/pages/recordings.py
trunk/WIP/RobShortt/webserver-epg2/src/pages/search.py
Log:
Updates for epg2 changes.
Modified: trunk/WIP/RobShortt/webserver-epg2/src/pages/proginfo.py
==============================================================================
--- trunk/WIP/RobShortt/webserver-epg2/src/pages/proginfo.py (original)
+++ trunk/WIP/RobShortt/webserver-epg2/src/pages/proginfo.py Wed Mar 8
16:26:10 2006
@@ -62,11 +62,11 @@
prog = guide().search(channel = chan, time = starttime)[0]
log.debug('program: %s', prog.title)
- if prog.desc == '' or prog.desc == None:
+ if prog.description == u'':
desc = (_('Sorry, the program description for ' \
'%s is unavailable.')) % ('<b>'+prog.title+'</b>')
else:
- desc = prog.desc.replace("\n","<br />")
+ desc = prog.description.replace("\n","<br />")
desc = desc.lstrip()
if MAX_DESCRIPTION_CHAR and len(desc) > MAX_DESCRIPTION_CHAR:
Modified: trunk/WIP/RobShortt/webserver-epg2/src/pages/recordings.py
==============================================================================
--- trunk/WIP/RobShortt/webserver-epg2/src/pages/recordings.py (original)
+++ trunk/WIP/RobShortt/webserver-epg2/src/pages/recordings.py Wed Mar 8
16:26:10 2006
@@ -34,11 +34,9 @@
import traceback
import logging
-# epg support
-import kaa.epg
-
# freevo core imports
import freevo.ipc
+from freevo.ipc.epg import connect as guide
# webserver includes
from freevo.webserver import *
@@ -80,7 +78,7 @@
prog = None
for p in progs:
if Unicode(chan) == \
- kaa.epg.get_channel_by_id(p.channel).id \
+ guide().get_channel(p.channel).short_name \
and int(start) == p.start:
prog = p
@@ -91,7 +89,8 @@
elif action == 'add':
try:
- prog = kaa.epg.get_channel(chan)[int(start)]
+ prog = guide().search(channel=guide().get_channel(chan),
+ time=int(start))[0]
except:
self.printHeader('Scheduled Recordings', 'styles/main.css')
self.printMessages(
@@ -146,7 +145,7 @@
status = 'basic'
colspan = 'class="' + status + '" colspan="1"'
- channel = kaa.epg.get_channel_by_id(prog.channel).title
+ channel = prog.channel
self.tableRowOpen('class="chanrow"')
t = time.strftime('%b %d ' + config.style.timeformat,
time.localtime(prog.start))
Modified: trunk/WIP/RobShortt/webserver-epg2/src/pages/search.py
==============================================================================
--- trunk/WIP/RobShortt/webserver-epg2/src/pages/search.py (original)
+++ trunk/WIP/RobShortt/webserver-epg2/src/pages/search.py Wed Mar 8
16:26:10 2006
@@ -112,12 +112,12 @@
self.tableCell(Unicode(p.title), 'class="'+status+'"
colspan="1"')
# self.tableCell(Unicode(p.subtitle), 'class="'+status+'"
colspan="1"')
- if Unicode(p.desc) == u'' or p.desc == None:
+ if p.description == u'':
cell = \
_('Sorry, the program description for %s is
unavailable.')\
% ('<b>'+p.title+'</b>')
else:
- cell = Unicode(p.desc)
+ cell = p.description
self.tableCell(cell, 'class="'+status+'" colspan="1"')
-------------------------------------------------------
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