Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26861/tv
Modified Files:
program.py recordings.py tvguide.py
Removed Files:
channels.py
Log Message:
Merged tv/channels into pyepg. It returns now nice channel and program
items. Much cleanup is needed were pyepg is used. I also removed
config.TV_CHANNELLIST, you can use pyepg.channels or pyepg.guide to
access the channel listing / guide
Index: program.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/program.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** program.py 5 Dec 2004 17:10:06 -0000 1.2
--- program.py 9 Dec 2004 20:26:33 -0000 1.3
***************
*** 44,48 ****
import recordings
import favorite
! import channels
class ProgramItem(Item):
--- 44,48 ----
import recordings
import favorite
! import pyepg
class ProgramItem(Item):
***************
*** 63,67 ****
self.info['description'] = program.description
! key = '%s%s%s' % (program.channel.chan_id, program.start,
program.stop)
if recordings.recordings.has_key(key):
self.scheduled = recordings.recordings[key]
--- 63,67 ----
self.info['description'] = program.description
! key = '%s%s%s' % (program.channel.id, program.start, program.stop)
if recordings.recordings.has_key(key):
self.scheduled = recordings.recordings[key]
***************
*** 98,102 ****
compare function, return 0 if the objects are identical, 1 otherwise
"""
! if not isinstance(other, (ProgramItem, channels.Program)):
return 1
--- 98,102 ----
compare function, return 0 if the objects are identical, 1 otherwise
"""
! if not isinstance(other, (ProgramItem, pyepg.Program)):
return 1
Index: recordings.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/recordings.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** recordings.py 3 Dec 2004 20:30:26 -0000 1.9
--- recordings.py 9 Dec 2004 20:26:33 -0000 1.10
***************
*** 46,50 ****
channel.append(c[0])
else:
! channel = [ prog.channel.chan_id ]
days = (_('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'),
_('Sat'), _('Sun'))
--- 46,50 ----
channel.append(c[0])
else:
! channel = [ prog.channel.id ]
days = (_('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'),
_('Sat'), _('Sun'))
***************
*** 73,77 ****
info['subtitle'] = prog['subtitle']
try:
! return server.recording_add(prog.title, prog.channel.chan_id, 1000,
prog.start, prog.stop, info)
except mcomm.MException, e:
--- 73,77 ----
info['subtitle'] = prog['subtitle']
try:
! return server.recording_add(prog.title, prog.channel.id, 1000,
prog.start, prog.stop, info)
except mcomm.MException, e:
Index: tvguide.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/tvguide.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** tvguide.py 5 Dec 2004 17:10:06 -0000 1.64
--- tvguide.py 9 Dec 2004 20:26:33 -0000 1.65
***************
*** 10,13 ****
--- 10,19 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.65 2004/12/09 20:26:33 dischi
+ # Merged tv/channels into pyepg. It returns now nice channel and program
+ # items. Much cleanup is needed were pyepg is used. I also removed
+ # config.TV_CHANNELLIST, you can use pyepg.channels or pyepg.guide to
+ # access the channel listing / guide
+ #
# Revision 1.64 2004/12/05 17:10:06 dischi
# start extract channellist to be independed
***************
*** 123,126 ****
--- 129,134 ----
import traceback
+ import pyepg
+
import config
import util
***************
*** 169,177 ****
box.show()
- if not config.TV_CHANNELLIST:
- box.destroy()
- gui.AlertBox(text=_('TV Guide is corrupt!')).show()
- return False
-
self.current_time = int(time.time())
start_time = self.current_time - 1800
--- 177,180 ----
***************
*** 179,186 ****
# current channel is the first one
! self.channel = config.TV_CHANNELLIST[0]
# current program is the current running
! self.selected = ProgramItem(self.channel.get(self.current_time)[0])
box.destroy()
--- 182,189 ----
# current channel is the first one
! self.channel = pyepg.channels[0]
# current program is the current running
! self.selected = ProgramItem(self.channel.get(self.current_time))
box.destroy()
***************
*** 226,236 ****
if event == MENU_UP:
! self.channel = config.TV_CHANNELLIST.get(-1, self.channel)
! self.selected =
ProgramItem(self.channel.get(self.current_time)[0])
self.refresh()
elif event == MENU_DOWN:
! self.channel = config.TV_CHANNELLIST.get(1, self.channel)
! self.selected =
ProgramItem(self.channel.get(self.current_time)[0])
self.refresh()
--- 229,239 ----
if event == MENU_UP:
! self.channel = pyepg.guide.get_channel(-1, self.channel)
! self.selected = ProgramItem(self.channel.get(self.current_time))
self.refresh()
elif event == MENU_DOWN:
! self.channel = pyepg.guide.get_channel(1, self.channel)
! self.selected = ProgramItem(self.channel.get(self.current_time))
self.refresh()
--- channels.py DELETED ---
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog