From 95f516e0b9ba03372b2f2b89c9c8adf99b069913 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 21 Sep 2008 14:19:18 +0000 Subject: more slight playlist resume cleanuping... dont bother saving the playlist first index value. its reset to 0 before playlistcontrol is loaded anyway, and then reset to 0 after its finished so its completly useless in global_status. runtimes, resume info, etc will be reset again... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18561 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'apps/playlist.c') diff --git a/apps/playlist.c b/apps/playlist.c index 1d42ba3728..5d8d8495bf 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -297,9 +297,6 @@ static void empty_playlist(struct playlist_info* playlist, bool resume) /* start with fresh playlist control file when starting new playlist */ create_control(playlist); - - /* Reset resume settings */ - global_status.resume_first_index = 0; } } @@ -788,11 +785,6 @@ static int add_track_to_playlist(struct playlist_info* playlist, { playlist->first_index++; - if (seek_pos < 0 && playlist->current) - { - global_status.resume_first_index = playlist->first_index; - status_save(); - } } if (insert_position < playlist->last_insert_pos || @@ -903,12 +895,6 @@ static int remove_track_from_playlist(struct playlist_info* playlist, if (position < playlist->first_index) { playlist->first_index--; - - if (write) - { - global_status.resume_first_index = playlist->first_index; - status_save(); - } } if (position <= playlist->last_insert_pos) @@ -1191,12 +1177,6 @@ static void find_and_set_playlist_index(struct playlist_info* playlist, { playlist->index = playlist->first_index = i; - if (playlist->current) - { - global_status.resume_first_index = i; - status_save(); - } - break; } } @@ -2354,7 +2334,6 @@ int playlist_resume(void) /* Terminate on EOF */ if(nread <= 0) { - playlist->first_index = global_status.resume_first_index; break; } } @@ -2406,8 +2385,7 @@ int playlist_shuffle(int random_seed, int start_index) { /* store the seek position before the shuffle */ seek_pos = playlist->indices[start_index]; - playlist->index = global_status.resume_first_index = - playlist->first_index = start_index; + playlist->index = playlist->first_index = start_index; start_current = true; } @@ -2541,7 +2519,7 @@ int playlist_next(int steps) playlist->amount > 1) { /* Repeat shuffle mode. Re-shuffle playlist and resume play */ - playlist->first_index = global_status.resume_first_index = 0; + playlist->first_index = 0; sort_playlist(playlist, false, false); randomise_playlist(playlist, current_tick, false, true); #if CONFIG_CODEC != SWCODEC -- cgit v1.2.3