I sent an earlier reply to this email which hasn't made it through to 
the list, perhaps because I attached a diff.  That message may or may 
not eventually make it through to the list, but I resend my one-line 
fixes to the two bugs in-line as plain text below...

--Brett


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.
> 

Fix:  In line 573 of src/tv/tvguide.py, change:

if value < 0 and channel_pos and channel_pos <= start_pos:

to:

if value < 0 and channel_pos >= 0 and channel_pos <= start_pos

This allows a channel_pos of 0 (i.e. index 0) without failing the if 
statement and disallowing the channel change.

> 
> 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.
> 

Fix: in line 575 of src/tv/tvguide.py, change:

chan_list[start_pos + value]

to:

chan_list[max(0, start_pos + value)]

This prevents the case where start_pos + value is less than 0, giving a 
negative index into the chan_list array.


> 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


-------------------------------------------------------------------------
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