diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-04-16 01:15:09 +0200 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-04-16 10:13:50 -0400 |
commit | 68ac93258555b84f31cdbd8cdbd0f126045da352 (patch) | |
tree | ba92d0ad99997822ceddda59437e357ceb64d495 | |
parent | e3bf6f08e391213e8b3c49dab923a25f77983063 (diff) | |
download | rockbox-68ac93258555b84f31cdbd8cdbd0f126045da352.tar.gz rockbox-68ac93258555b84f31cdbd8cdbd0f126045da352.zip |
PictureFlow: Disable 'Album Not Found' splash when stopped
...and go to last album, even if it hadn't
been selected for playback
Change-Id: I44013e930a1feb873f128c2885ecb8ddaf4ae3ff
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 97b71ee9d0..5136fc56e9 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -4082,7 +4082,9 @@ static bool start_playback(bool return_to_WPS) | |||
4082 | #endif | 4082 | #endif |
4083 | rb->lcd_clear_display(); | 4083 | rb->lcd_clear_display(); |
4084 | rb->lcd_update(); | 4084 | rb->lcd_update(); |
4085 | #endif /* USEGSLIB */ | 4085 | #else /* if !USEGSLIB */ |
4086 | (void) return_to_WPS; | ||
4087 | #endif | ||
4086 | 4088 | ||
4087 | if (!rb->warn_on_pl_erase() || !track_list_ready()) | 4089 | if (!rb->warn_on_pl_erase() || !track_list_ready()) |
4088 | { | 4090 | { |
@@ -4112,10 +4114,8 @@ static bool start_playback(bool return_to_WPS) | |||
4112 | rb->playlist_start(start_index, 0, 0); | 4114 | rb->playlist_start(start_index, 0, 0); |
4113 | rb->playlist_get_current()->num_inserted_tracks = 0; /* prevent warn_on_pl_erase */ | 4115 | rb->playlist_get_current()->num_inserted_tracks = 0; /* prevent warn_on_pl_erase */ |
4114 | old_shuffle = shuffle; | 4116 | old_shuffle = shuffle; |
4115 | if (return_to_WPS) | ||
4116 | pf_cfg.last_album = center_index; | ||
4117 | #ifdef USEGSLIB | 4117 | #ifdef USEGSLIB |
4118 | else | 4118 | if (!return_to_WPS) |
4119 | grey_show(true); | 4119 | grey_show(true); |
4120 | #endif | 4120 | #endif |
4121 | return true; | 4121 | return true; |
@@ -4213,7 +4213,9 @@ static void draw_album_text(void) | |||
4213 | static void set_initial_slide(const char* selected_file) | 4213 | static void set_initial_slide(const char* selected_file) |
4214 | { | 4214 | { |
4215 | if (selected_file == NULL) | 4215 | if (selected_file == NULL) |
4216 | set_current_slide(id3_get_index(rb->audio_current_track())); | 4216 | set_current_slide(rb->audio_status() ? |
4217 | id3_get_index(rb->audio_current_track()) : | ||
4218 | pf_cfg.last_album); | ||
4217 | else | 4219 | else |
4218 | { | 4220 | { |
4219 | struct mp3entry id3; | 4221 | struct mp3entry id3; |
@@ -4687,6 +4689,7 @@ enum plugin_status plugin_start(const void *parameter) | |||
4687 | 4689 | ||
4688 | ret = file_id3 ? pictureflow_main(file) : pictureflow_main(NULL); | 4690 | ret = file_id3 ? pictureflow_main(file) : pictureflow_main(NULL); |
4689 | if ( ret == PLUGIN_OK || ret == PLUGIN_GOTO_WPS) { | 4691 | if ( ret == PLUGIN_OK || ret == PLUGIN_GOTO_WPS) { |
4692 | pf_cfg.last_album = center_index; | ||
4690 | if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, | 4693 | if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, |
4691 | CONFIG_VERSION)) | 4694 | CONFIG_VERSION)) |
4692 | { | 4695 | { |