diff options
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 2928db8a4f..56ffccc474 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -243,8 +243,8 @@ static void empty_playlist(struct playlist_info* playlist, bool resume) | |||
243 | create_control(playlist); | 243 | create_control(playlist); |
244 | 244 | ||
245 | /* Reset resume settings */ | 245 | /* Reset resume settings */ |
246 | global_settings.resume_first_index = 0; | 246 | global_status.resume_first_index = 0; |
247 | global_settings.resume_seed = -1; | 247 | global_status.resume_seed = -1; |
248 | } | 248 | } |
249 | } | 249 | } |
250 | 250 | ||
@@ -386,8 +386,8 @@ static int recreate_control(struct playlist_info* playlist) | |||
386 | 386 | ||
387 | if (playlist->current) | 387 | if (playlist->current) |
388 | { | 388 | { |
389 | global_settings.resume_seed = -1; | 389 | global_status.resume_seed = -1; |
390 | settings_save(); | 390 | status_save(); |
391 | } | 391 | } |
392 | 392 | ||
393 | for (i=0; i<playlist->amount; i++) | 393 | for (i=0; i<playlist->amount; i++) |
@@ -710,8 +710,8 @@ static int add_track_to_playlist(struct playlist_info* playlist, | |||
710 | 710 | ||
711 | if (seek_pos < 0 && playlist->current) | 711 | if (seek_pos < 0 && playlist->current) |
712 | { | 712 | { |
713 | global_settings.resume_first_index = playlist->first_index; | 713 | global_status.resume_first_index = playlist->first_index; |
714 | settings_save(); | 714 | status_save(); |
715 | } | 715 | } |
716 | } | 716 | } |
717 | 717 | ||
@@ -826,8 +826,8 @@ static int remove_track_from_playlist(struct playlist_info* playlist, | |||
826 | 826 | ||
827 | if (write) | 827 | if (write) |
828 | { | 828 | { |
829 | global_settings.resume_first_index = playlist->first_index; | 829 | global_status.resume_first_index = playlist->first_index; |
830 | settings_save(); | 830 | status_save(); |
831 | } | 831 | } |
832 | } | 832 | } |
833 | 833 | ||
@@ -902,8 +902,8 @@ static int randomise_playlist(struct playlist_info* playlist, | |||
902 | { | 902 | { |
903 | update_control(playlist, PLAYLIST_COMMAND_SHUFFLE, seed, | 903 | update_control(playlist, PLAYLIST_COMMAND_SHUFFLE, seed, |
904 | playlist->first_index, NULL, NULL, NULL); | 904 | playlist->first_index, NULL, NULL, NULL); |
905 | global_settings.resume_seed = seed; | 905 | global_status.resume_seed = seed; |
906 | settings_save(); | 906 | status_save(); |
907 | } | 907 | } |
908 | 908 | ||
909 | return 0; | 909 | return 0; |
@@ -942,8 +942,8 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current, | |||
942 | { | 942 | { |
943 | update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, | 943 | update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, |
944 | playlist->first_index, -1, NULL, NULL, NULL); | 944 | playlist->first_index, -1, NULL, NULL, NULL); |
945 | global_settings.resume_seed = 0; | 945 | global_status.resume_seed = 0; |
946 | settings_save(); | 946 | status_save(); |
947 | } | 947 | } |
948 | 948 | ||
949 | return 0; | 949 | return 0; |
@@ -1117,8 +1117,8 @@ static void find_and_set_playlist_index(struct playlist_info* playlist, | |||
1117 | 1117 | ||
1118 | if (playlist->current) | 1118 | if (playlist->current) |
1119 | { | 1119 | { |
1120 | global_settings.resume_first_index = i; | 1120 | global_status.resume_first_index = i; |
1121 | settings_save(); | 1121 | status_save(); |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | break; | 1124 | break; |
@@ -1742,10 +1742,10 @@ static int flush_cached_control(struct playlist_info* playlist) | |||
1742 | 1742 | ||
1743 | if (result > 0) | 1743 | if (result > 0) |
1744 | { | 1744 | { |
1745 | if (global_settings.resume_seed >= 0) | 1745 | if (global_status.resume_seed >= 0) |
1746 | { | 1746 | { |
1747 | global_settings.resume_seed = -1; | 1747 | global_status.resume_seed = -1; |
1748 | settings_save(); | 1748 | status_save(); |
1749 | } | 1749 | } |
1750 | 1750 | ||
1751 | playlist->num_cached = 0; | 1751 | playlist->num_cached = 0; |
@@ -2294,22 +2294,22 @@ int playlist_resume(void) | |||
2294 | /* Terminate on EOF */ | 2294 | /* Terminate on EOF */ |
2295 | if(nread <= 0) | 2295 | if(nread <= 0) |
2296 | { | 2296 | { |
2297 | if (global_settings.resume_seed >= 0) | 2297 | if (global_status.resume_seed >= 0) |
2298 | { | 2298 | { |
2299 | /* Apply shuffle command saved in settings */ | 2299 | /* Apply shuffle command saved in settings */ |
2300 | if (global_settings.resume_seed == 0) | 2300 | if (global_status.resume_seed == 0) |
2301 | sort_playlist(playlist, false, true); | 2301 | sort_playlist(playlist, false, true); |
2302 | else | 2302 | else |
2303 | { | 2303 | { |
2304 | if (!sorted) | 2304 | if (!sorted) |
2305 | sort_playlist(playlist, false, false); | 2305 | sort_playlist(playlist, false, false); |
2306 | 2306 | ||
2307 | randomise_playlist(playlist, global_settings.resume_seed, | 2307 | randomise_playlist(playlist, global_status.resume_seed, |
2308 | false, true); | 2308 | false, true); |
2309 | } | 2309 | } |
2310 | } | 2310 | } |
2311 | 2311 | ||
2312 | playlist->first_index = global_settings.resume_first_index; | 2312 | playlist->first_index = global_status.resume_first_index; |
2313 | break; | 2313 | break; |
2314 | } | 2314 | } |
2315 | } | 2315 | } |
@@ -2361,7 +2361,7 @@ int playlist_shuffle(int random_seed, int start_index) | |||
2361 | { | 2361 | { |
2362 | /* store the seek position before the shuffle */ | 2362 | /* store the seek position before the shuffle */ |
2363 | seek_pos = playlist->indices[start_index]; | 2363 | seek_pos = playlist->indices[start_index]; |
2364 | playlist->index = global_settings.resume_first_index = | 2364 | playlist->index = global_status.resume_first_index = |
2365 | playlist->first_index = start_index; | 2365 | playlist->first_index = start_index; |
2366 | start_current = true; | 2366 | start_current = true; |
2367 | } | 2367 | } |
@@ -2508,7 +2508,7 @@ int playlist_next(int steps) | |||
2508 | playlist->amount > 1) | 2508 | playlist->amount > 1) |
2509 | { | 2509 | { |
2510 | /* Repeat shuffle mode. Re-shuffle playlist and resume play */ | 2510 | /* Repeat shuffle mode. Re-shuffle playlist and resume play */ |
2511 | playlist->first_index = global_settings.resume_first_index = 0; | 2511 | playlist->first_index = global_status.resume_first_index = 0; |
2512 | sort_playlist(playlist, false, false); | 2512 | sort_playlist(playlist, false, false); |
2513 | randomise_playlist(playlist, current_tick, false, true); | 2513 | randomise_playlist(playlist, current_tick, false, true); |
2514 | #if CONFIG_CODEC != SWCODEC | 2514 | #if CONFIG_CODEC != SWCODEC |
@@ -2651,19 +2651,19 @@ int playlist_update_resume_info(const struct mp3entry* id3) | |||
2651 | 2651 | ||
2652 | if (id3) | 2652 | if (id3) |
2653 | { | 2653 | { |
2654 | if (global_settings.resume_index != playlist->index || | 2654 | if (global_status.resume_index != playlist->index || |
2655 | global_settings.resume_offset != id3->offset) | 2655 | global_status.resume_offset != id3->offset) |
2656 | { | 2656 | { |
2657 | global_settings.resume_index = playlist->index; | 2657 | global_status.resume_index = playlist->index; |
2658 | global_settings.resume_offset = id3->offset; | 2658 | global_status.resume_offset = id3->offset; |
2659 | settings_save(); | 2659 | status_save(); |
2660 | } | 2660 | } |
2661 | } | 2661 | } |
2662 | else | 2662 | else |
2663 | { | 2663 | { |
2664 | global_settings.resume_index = -1; | 2664 | global_status.resume_index = -1; |
2665 | global_settings.resume_offset = -1; | 2665 | global_status.resume_offset = -1; |
2666 | settings_save(); | 2666 | status_save(); |
2667 | } | 2667 | } |
2668 | 2668 | ||
2669 | return 0; | 2669 | return 0; |