-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi,
I am trying the latest SVN; I got backtraces when trying to record, or
to play, TV channels; the attched patch fixed those. The backtraces were
like:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/freevo/main.py", line 307, in
eventhandler
app.eventhandler(event)
File "/usr/share/pyshared/freevo/menu.py", line 779, in eventhandler
if not isinstance(menu, Menu) and menu.eventhandler(event):
File "/usr/share/pyshared/freevo/tv/tvguide.py", line 229, in eventhandler
pi.actions()[0][0](menuw=self.menuw)
File "/usr/share/pyshared/freevo/tv/programitem.py", line 172, in play
self.parent.player('tv', self.prog.channel_id)
File "/usr/share/pyshared/freevo/tv/tvmenu.py", line 82, in start_tv
p.Play(mode, tuner_id)
File "/usr/share/pyshared/freevo/tv/plugins/mplayer.py", line 83, in Play
vg = self.current_vg = self.fc.getVideoGroup(tuner_channel, True)
File "/usr/share/pyshared/freevo/tv/channels.py", line 125, in
getVideoGroup
return config.TV_VIDEO_GROUPS[group]
IndexError: list index out of range
adding some print statements, I saw that getVideoGroup was called with
chan=19, and was setting group=-19
a.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknkwtcACgkQ9B/tjjP8QKQDcACfQrW+AtX0fC82WrUg9XkUntg0
xQMAn3FlXhcqNLGzmJ+UoXBB/ihfqq6b
=3gBY
-----END PGP SIGNATURE-----
--- /usr/src/freevo/svn/freevo-1.x/freevo/src/tv/channels.py 2009-04-11 10:57:55.000000000 +0200
+++ /usr/share/pyshared/freevo/tv/channels.py 2009-04-14 18:33:29.000000000 +0200
@@ -89,28 +89,25 @@
_debug_('getVideoGroup(chan=%r, isplayer=%r, chan_index=%r)' % (chan, isplayer, chan_index), 1)
self.lock.acquire()
try:
- try:
- group = -int(chan)
- except ValueError:
- group = 0
- if group <= 0:
- for i in range(len(config.TV_CHANNELS)):
+ group = None
+ for i in range(len(config.TV_CHANNELS)):
chan_info = config.TV_CHANNELS[i]
if chan_info[chan_index] == chan:
if len(chan_info) > 4:
group = chan_info[4]
+ else:
+ group = 0
try:
group = int(group)
except ValueError:
group = 0
break
-
- else: # Channel not found
- #DJW this should be noticed
- import traceback
- traceback.print_stack()
- #DJW
- if not isplayer:
+ debug_level = 1
+ if group == None:
+ #DJW this should be noticed
+ debug_level = DERROR
+ #DJW
+ elif not isplayer:
record_group = config.TV_VIDEO_GROUPS[group].record_group
if record_group:
try:
@@ -119,6 +116,9 @@
record_vg = config.TV_VIDEO_GROUPS[group]
except:
_debug_('TV_VIDEO_GROUPS[%s].record_group=%s is invalid' % (group, record_group), DWARNING)
+
+ _debug_('getVideoGroup(chan=%r, isplayer=%r, chan_index=%r) -> group=%r' % (chan, isplayer, chan_index, group), debug_level)
+
finally:
self.lock.release()
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel