summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorRichard Quirk <richard.quirk@gmail.com>2012-12-09 21:04:17 +0100
committerJonathan Gordon <rockbox@jdgordon.info>2013-01-02 08:29:38 +0100
commit212e7808d5f39e1d7fc1bd487de8f13c50d136f2 (patch)
treedc16ed3fc3a4857554e0d58d4a277d558eefab77 /apps/root_menu.c
parent17181ecf30d2f7c73eba73309a35e770fab2c7ca (diff)
downloadrockbox-212e7808d5f39e1d7fc1bd487de8f13c50d136f2.tar.gz
rockbox-212e7808d5f39e1d7fc1bd487de8f13c50d136f2.tar.bz2
rockbox-212e7808d5f39e1d7fc1bd487de8f13c50d136f2.zip
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>
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 2c72cc47f7..d03fee35f7 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -297,12 +297,14 @@ static int wpsscrn(void* param)
}
else if ( global_status.resume_index != -1 )
{
- DEBUGF("Resume index %X offset %lX\n",
+ DEBUGF("Resume index %X crc32 %lX offset %lX\n",
global_status.resume_index,
+ (unsigned long)global_status.resume_crc32,
(unsigned long)global_status.resume_offset);
if (playlist_resume() != -1)
{
- playlist_start(global_status.resume_index,
+ playlist_resume_track(global_status.resume_index,
+ global_status.resume_crc32,
global_status.resume_offset);
ret_val = gui_wps_show();
}