This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7898 - Fix for bug in "Insert Next" with multiple insertions
Attached to Project:
Rockbox
Opened by Costas Calamvokis (cc) - Sunday, 07 October 2007, 13:45 GMT+1
Opened by Costas Calamvokis (cc) - Sunday, 07 October 2007, 13:45 GMT+1
|
DetailsThis patch fixes a bug: When using "Insert Next" to insert multiple files to a playlist, last_insert_pos only gets updated for the first file inserted, so a subsequent "Insert" inserts in the wrong position.
Eg: Insert 1 2 3, Insert Next 4 5 6, Insert 7 8 9 gives: 1 4 7 8 9 5 6 2 3 Instead of 1 4 5 6 7 8 9 2 3 The problem is that for "Insert Next" the directory_search_callback function keeps track of the insert position and add_track_to_playlist does not update last_insert_pos when called with a specific insert position ahead of the last_insert_pos. This patch works by not keeping track of the insert position in directory_search_callback and instead just switching to "Insert" mode after the first file is inserted - which makes sure the next file gets put in the right place (after the first file) and that last_insert_pos gets updated correctly. The patch also fixes the same problem when inserting a playlist with "Insert next". |
This task depends upon
Many Thanks.
So after doing "insert next" of a directory containing 4 5 6 the playlist is:
1 4 5 6 2 3
Then doing an "Insert" (song 1 is still playing) inserts after 4 - so the initial "Insert Next" does move the position where the "Insert" occurs (otherwise it would have inserted after 1), but not to after the last track inserted.
Another possibility is that the "Insert Next" should not move the pointer ever (that is one interpretation of what the manual says at the moment) - but this is not what happens when inserting single tracks, and I think would be more confusing.
I was searching for something else and found this bug, which I think is the same problem that this
patch fixes:
http://www.rockbox.org/tracker/7363
My apologies for not finding it before I started this task.