Michael Beal wrote:
Behaviour:
When scrolling through TV Guide, cannot return to channel contained in TV_CHANNELS[0].id when using MENU_DOWN. Paging also fails with MENU_PAGEUP.


Hi Michael,

Attached is a diff which fixes that bug for me (it also happens in 1.7.2, and probably earlier). The problem is in the change_channel method in src/tv/tvguide.py at line 573 -- if channel_pos (the desired next channel) is 0, then the "and channel_pos" part of the if statement fails and disallows the change. Making it "and channel_pos >= 0" allows the guide to get back to the first channel in the list (i.e. index 0).

This patch also fixes a different issue for me which happens when using MENU_PAGEUP on the first page of channel listings, but when the currently selected channel is not the first channel on the page -- it "wraps around" and jumps the guide to the very end of the list. Very annoying! It happens because start_pos + value can be less than 0, giving a negative index in the chan_list array.

--Brett


Steps to repeat bug with MENU_DOWN:
1) Go to TV Guide
2) Press MENU_DOWN until TV Guide scrolls one line.
3) Press MENU_UP until TV Guide returns to start_channel. Always fails, giving start_channel+1(TV_CHANNELS[1].id) when start_channel == TV_CHANNELS[0].id


Steps to repeat bug with MENU_PAGEDOWN:
1) Go to TV Guide
2) Press MENU_PAGEDOWN once when start_channel == TV_CHANNELS[0].id
3) Press MENU_PAGEUP.  Always fails, keeping TV Guide unchanged.


Similar to expected behaviour:
1) Go to TV Guide
2) Press MENU_PAGEDOWN once when start_channel  == TV_CHANNELS[0].id
3) Press MENU_DOWN once.
4) Press MENU_PAGEUP. Returns TV Guide showing start_channel == TV_CHANNELS[0].id (while highlighting start_channel+1.) TV_CHANNELS[0] can now be reached from TV Guide

Other behaviours:
TV Guide sometimes wraps around unexpectedly when viewing first page (TV_CHANNELS[0] -> TV_CHANNELS[0+n_items] && selected != TV_CHANNEL[0]) and then pressing MENU_PAGEUP.

Will add these to the bug tracker when I get a moment.

------------------------------------------------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search. <http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>


------------------------------------------------------------------------

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php


------------------------------------------------------------------------

_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel
--- tvguide.py  2007-12-07 15:42:57.000000000 -0500
+++ tvguide.py-bdg      2007-12-07 15:48:15.000000000 -0500
@@ -570,9 +570,9 @@
         # calc real changed value
         value = channel_pos - i
 
-        if value < 0 and channel_pos and channel_pos <= start_pos:
+        if value < 0 and channel_pos >= 0 and channel_pos <= start_pos:
             # move start channel up
-            start_channel = self.guide.chan_list[start_pos + value].id
+            start_channel = self.guide.chan_list[max(0, start_pos + value)].id
 
         if value > 0 and channel_pos < len(self.guide.chan_list)-1 and \
                channel_pos + 1 >= end_pos:
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to