- Status Closed
- Percent Complete
- Task Type Patches
- Category Playlists
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes 2
- Private
FS#7898 - Fix for bug in "Insert Next" with multiple insertions
This 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”.
2009-10-16 22:15
Reason for closing: Out of Date
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Should work fine nowadays.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I asked the devs in irc to look at this patch and 7911, they voiced objections to both patches, 7898 and 7911, would you mind popping in to irc and chatting to them about their issues, perhaps it might speed up the incorporation of the patches to svn.
Many Thanks.
OK, while I’m waiting on irc - maybe I should point out that in my examples I am talking about inserting directories (each containing 3 files). Also during the insertions song 1 is playing.
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.