diff --git a/apps/playlist.c b/apps/playlist.c index 9c494778a3..1d42ba3728 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -300,7 +300,6 @@ static void empty_playlist(struct playlist_info* playlist, bool resume) /* Reset resume settings */ global_status.resume_first_index = 0; - global_status.resume_seed = -1; } } @@ -443,12 +442,6 @@ static int recreate_control(struct playlist_info* playlist) playlist->deleted = false; playlist->num_inserted_tracks = 0; - if (playlist->current) - { - global_status.resume_seed = -1; - status_save(); - } - for (i=0; iamount; i++) { if (playlist->indices[i] & PLAYLIST_INSERT_TYPE_MASK) @@ -989,8 +982,6 @@ static int randomise_playlist(struct playlist_info* playlist, { update_control(playlist, PLAYLIST_COMMAND_SHUFFLE, seed, playlist->first_index, NULL, NULL, NULL); - global_status.resume_seed = seed; - status_save(); } return 0; @@ -1029,8 +1020,6 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current, { update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, playlist->first_index, -1, NULL, NULL, NULL); - global_status.resume_seed = 0; - status_save(); } return 0; @@ -1819,12 +1808,6 @@ static int flush_cached_control(struct playlist_info* playlist) if (result > 0) { - if (global_status.resume_seed >= 0) - { - global_status.resume_seed = -1; - status_save(); - } - playlist->num_cached = 0; playlist->pending_control_sync = true; @@ -2207,7 +2190,6 @@ int playlist_resume(void) if (randomise_playlist(playlist, seed, false, false) < 0) return -1; - sorted = false; break; } @@ -2372,21 +2354,6 @@ int playlist_resume(void) /* Terminate on EOF */ if(nread <= 0) { - if (global_status.resume_seed >= 0) - { - /* Apply shuffle command saved in settings */ - if (global_status.resume_seed == 0) - sort_playlist(playlist, false, true); - else - { - if (!sorted) - sort_playlist(playlist, false, false); - - randomise_playlist(playlist, global_status.resume_seed, - false, true); - } - } - playlist->first_index = global_status.resume_first_index; break; } diff --git a/apps/settings.h b/apps/settings.h index 9ef8323276..855072a428 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -271,8 +271,6 @@ struct system_status int resume_index; /* index in playlist (-1 for no active resume) */ int resume_first_index; /* index of first track in playlist */ uint32_t resume_offset; /* byte offset in mp3 file */ - int resume_seed; /* shuffle seed (-1=no resume shuffle 0=sorted - >0=shuffled) */ int runtime; /* current runtime since last charge */ int topruntime; /* top known runtime */ #ifdef HAVE_DIRCACHE diff --git a/apps/settings_list.c b/apps/settings_list.c index 0addf5ceff..f94338cc48 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -427,7 +427,6 @@ const struct settings_list settings[] = { SYSTEM_SETTING(NVRAM(4), resume_index, -1), SYSTEM_SETTING(NVRAM(4), resume_first_index, 0), SYSTEM_SETTING(NVRAM(4), resume_offset, -1), - SYSTEM_SETTING(NVRAM(4), resume_seed, -1), CHOICE_SETTING(0, repeat_mode, LANG_REPEAT, REPEAT_ALL, "repeat", "off,all,one,shuffle" #ifdef AB_REPEAT_ENABLE diff --git a/apps/settings_list.h b/apps/settings_list.h index f8ce4fd266..7d0f750ff9 100644 --- a/apps/settings_list.h +++ b/apps/settings_list.h @@ -111,7 +111,7 @@ struct table_setting { #define F_NVRAM_BYTES_MASK 0xE0000 /*0-4 bytes can be stored */ #define F_NVRAM_MASK_SHIFT 17 -#define NVRAM_CONFIG_VERSION 4 +#define NVRAM_CONFIG_VERSION 5 /* Above define should be bumped if - a new NVRAM setting is added between 2 other NVRAM settings - number of bytes for a NVRAM setting is changed