diff options
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 33 |
1 files changed, 0 insertions, 33 deletions
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) | |||
300 | 300 | ||
301 | /* Reset resume settings */ | 301 | /* Reset resume settings */ |
302 | global_status.resume_first_index = 0; | 302 | global_status.resume_first_index = 0; |
303 | global_status.resume_seed = -1; | ||
304 | } | 303 | } |
305 | } | 304 | } |
306 | 305 | ||
@@ -443,12 +442,6 @@ static int recreate_control(struct playlist_info* playlist) | |||
443 | playlist->deleted = false; | 442 | playlist->deleted = false; |
444 | playlist->num_inserted_tracks = 0; | 443 | playlist->num_inserted_tracks = 0; |
445 | 444 | ||
446 | if (playlist->current) | ||
447 | { | ||
448 | global_status.resume_seed = -1; | ||
449 | status_save(); | ||
450 | } | ||
451 | |||
452 | for (i=0; i<playlist->amount; i++) | 445 | for (i=0; i<playlist->amount; i++) |
453 | { | 446 | { |
454 | if (playlist->indices[i] & PLAYLIST_INSERT_TYPE_MASK) | 447 | if (playlist->indices[i] & PLAYLIST_INSERT_TYPE_MASK) |
@@ -989,8 +982,6 @@ static int randomise_playlist(struct playlist_info* playlist, | |||
989 | { | 982 | { |
990 | update_control(playlist, PLAYLIST_COMMAND_SHUFFLE, seed, | 983 | update_control(playlist, PLAYLIST_COMMAND_SHUFFLE, seed, |
991 | playlist->first_index, NULL, NULL, NULL); | 984 | playlist->first_index, NULL, NULL, NULL); |
992 | global_status.resume_seed = seed; | ||
993 | status_save(); | ||
994 | } | 985 | } |
995 | 986 | ||
996 | return 0; | 987 | return 0; |
@@ -1029,8 +1020,6 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current, | |||
1029 | { | 1020 | { |
1030 | update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, | 1021 | update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, |
1031 | playlist->first_index, -1, NULL, NULL, NULL); | 1022 | playlist->first_index, -1, NULL, NULL, NULL); |
1032 | global_status.resume_seed = 0; | ||
1033 | status_save(); | ||
1034 | } | 1023 | } |
1035 | 1024 | ||
1036 | return 0; | 1025 | return 0; |
@@ -1819,12 +1808,6 @@ static int flush_cached_control(struct playlist_info* playlist) | |||
1819 | 1808 | ||
1820 | if (result > 0) | 1809 | if (result > 0) |
1821 | { | 1810 | { |
1822 | if (global_status.resume_seed >= 0) | ||
1823 | { | ||
1824 | global_status.resume_seed = -1; | ||
1825 | status_save(); | ||
1826 | } | ||
1827 | |||
1828 | playlist->num_cached = 0; | 1811 | playlist->num_cached = 0; |
1829 | playlist->pending_control_sync = true; | 1812 | playlist->pending_control_sync = true; |
1830 | 1813 | ||
@@ -2207,7 +2190,6 @@ int playlist_resume(void) | |||
2207 | if (randomise_playlist(playlist, seed, false, | 2190 | if (randomise_playlist(playlist, seed, false, |
2208 | false) < 0) | 2191 | false) < 0) |
2209 | return -1; | 2192 | return -1; |
2210 | |||
2211 | sorted = false; | 2193 | sorted = false; |
2212 | break; | 2194 | break; |
2213 | } | 2195 | } |
@@ -2372,21 +2354,6 @@ int playlist_resume(void) | |||
2372 | /* Terminate on EOF */ | 2354 | /* Terminate on EOF */ |
2373 | if(nread <= 0) | 2355 | if(nread <= 0) |
2374 | { | 2356 | { |
2375 | if (global_status.resume_seed >= 0) | ||
2376 | { | ||
2377 | /* Apply shuffle command saved in settings */ | ||
2378 | if (global_status.resume_seed == 0) | ||
2379 | sort_playlist(playlist, false, true); | ||
2380 | else | ||
2381 | { | ||
2382 | if (!sorted) | ||
2383 | sort_playlist(playlist, false, false); | ||
2384 | |||
2385 | randomise_playlist(playlist, global_status.resume_seed, | ||
2386 | false, true); | ||
2387 | } | ||
2388 | } | ||
2389 | |||
2390 | playlist->first_index = global_status.resume_first_index; | 2357 | playlist->first_index = global_status.resume_first_index; |
2391 | break; | 2358 | break; |
2392 | } | 2359 | } |