mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Use crc32 of filename to resume tracks
As well as using an index, which breaks when a file is added or removed, use the crc32 of the filename. When the crc32 check passes the index is used directly. When it fails, the slow path is taken checking each file name in the playlist until the right crc is found. If that fails the playlist is started from the beginning. See http://www.rockbox.org/tracker/6411 Bump plugin API and nvram version numbers Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10 Reviewed-on: http://gerrit.rockbox.org/372 Tested-by: Jonathan Gordon <rockbox@jdgordon.info> Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
This commit is contained in:
parent
17181ecf30
commit
212e7808d5
13 changed files with 74 additions and 27 deletions
|
@ -703,6 +703,8 @@ int ft_enter(struct tree_context* c)
|
|||
/* the resume_index must always be the index in the
|
||||
shuffled list in case shuffle is enabled */
|
||||
global_status.resume_index = start_index;
|
||||
global_status.resume_crc32 =
|
||||
playlist_get_filename_crc32(NULL, start_index);
|
||||
global_status.resume_offset = 0;
|
||||
status_save();
|
||||
rc = GO_TO_WPS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue