diff options
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 30 | ||||
-rw-r--r-- | manual/plugins/pictureflow.tex | 1 |
3 files changed, 43 insertions, 2 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index ce31379bd0..68250743ba 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -16624,3 +16624,17 @@ | |||
16624 | *: "Show Tracks While Browsing" | 16624 | *: "Show Tracks While Browsing" |
16625 | </voice> | 16625 | </voice> |
16626 | </phrase> | 16626 | </phrase> |
16627 | <phrase> | ||
16628 | id: LANG_GOTO_LAST_ALBUM | ||
16629 | desc: in PictureFlow Main Menu | ||
16630 | user: core | ||
16631 | <source> | ||
16632 | *: "Go to Last Album" | ||
16633 | </source> | ||
16634 | <dest> | ||
16635 | *: "Go to Last Album" | ||
16636 | </dest> | ||
16637 | <voice> | ||
16638 | *: "Go to Last Album" | ||
16639 | </voice> | ||
16640 | </phrase> | ||
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 87db58aa34..9896ca45bf 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -3241,7 +3241,10 @@ static bool sort_albums(int new_sorting, bool from_settings) | |||
3241 | 3241 | ||
3242 | if(!rb->strcmp(pf_idx.album_names + album_idx, current_album_name) && | 3242 | if(!rb->strcmp(pf_idx.album_names + album_idx, current_album_name) && |
3243 | !rb->strcmp(pf_idx.artist_names + artist_idx, current_album_artist)) | 3243 | !rb->strcmp(pf_idx.artist_names + artist_idx, current_album_artist)) |
3244 | { | ||
3244 | set_current_slide(i); | 3245 | set_current_slide(i); |
3246 | pf_cfg.last_album = i; | ||
3247 | } | ||
3245 | } | 3248 | } |
3246 | return true; | 3249 | return true; |
3247 | } | 3250 | } |
@@ -3651,6 +3654,7 @@ static int settings_menu(void) | |||
3651 | */ | 3654 | */ |
3652 | enum { | 3655 | enum { |
3653 | PF_SHOW_TRACKS_WHILE_BROWSING, | 3656 | PF_SHOW_TRACKS_WHILE_BROWSING, |
3657 | PF_GOTO_LAST_ALBUM, | ||
3654 | PF_GOTO_WPS, | 3658 | PF_GOTO_WPS, |
3655 | #if PF_PLAYBACK_CAPABLE | 3659 | #if PF_PLAYBACK_CAPABLE |
3656 | PF_MENU_CLEAR_PLAYLIST, | 3660 | PF_MENU_CLEAR_PLAYLIST, |
@@ -3664,7 +3668,7 @@ enum { | |||
3664 | static int main_menu(void) | 3668 | static int main_menu(void) |
3665 | { | 3669 | { |
3666 | int selection = 0; | 3670 | int selection = 0; |
3667 | int result; | 3671 | int result, curr_album; |
3668 | 3672 | ||
3669 | #if LCD_DEPTH > 1 | 3673 | #if LCD_DEPTH > 1 |
3670 | rb->lcd_set_foreground(N_BRIGHT(255)); | 3674 | rb->lcd_set_foreground(N_BRIGHT(255)); |
@@ -3672,6 +3676,7 @@ static int main_menu(void) | |||
3672 | 3676 | ||
3673 | MENUITEM_STRINGLIST(main_menu, "PictureFlow Main Menu", NULL, | 3677 | MENUITEM_STRINGLIST(main_menu, "PictureFlow Main Menu", NULL, |
3674 | ID2P(LANG_SHOW_TRACKS_WHILE_BROWSING), | 3678 | ID2P(LANG_SHOW_TRACKS_WHILE_BROWSING), |
3679 | ID2P(LANG_GOTO_LAST_ALBUM), | ||
3675 | ID2P(LANG_GOTO_WPS), | 3680 | ID2P(LANG_GOTO_WPS), |
3676 | #if PF_PLAYBACK_CAPABLE | 3681 | #if PF_PLAYBACK_CAPABLE |
3677 | ID2P(LANG_CLEAR_PLAYLIST), | 3682 | ID2P(LANG_CLEAR_PLAYLIST), |
@@ -3692,6 +3697,24 @@ static int main_menu(void) | |||
3692 | } | 3697 | } |
3693 | show_tracks_while_browsing = true; | 3698 | show_tracks_while_browsing = true; |
3694 | return 0; | 3699 | return 0; |
3700 | case PF_GOTO_LAST_ALBUM: | ||
3701 | if (pf_state == pf_scrolling) | ||
3702 | curr_album = target; | ||
3703 | else | ||
3704 | curr_album = center_index; | ||
3705 | |||
3706 | if (pf_state == pf_show_tracks) | ||
3707 | free_borrowed_tracks(); | ||
3708 | if (pf_state == pf_show_tracks || | ||
3709 | pf_state == pf_cover_in || | ||
3710 | pf_state == pf_cover_out) | ||
3711 | skip_animation_to_idle_state(); | ||
3712 | |||
3713 | set_current_slide(pf_cfg.last_album); | ||
3714 | pf_cfg.last_album = curr_album; | ||
3715 | |||
3716 | pf_state = pf_idle; | ||
3717 | return 0; | ||
3695 | case PF_GOTO_WPS: /* WPS */ | 3718 | case PF_GOTO_WPS: /* WPS */ |
3696 | return -2; | 3719 | return -2; |
3697 | #if PF_PLAYBACK_CAPABLE | 3720 | #if PF_PLAYBACK_CAPABLE |
@@ -4848,7 +4871,10 @@ enum plugin_status plugin_start(const void *parameter) | |||
4848 | 4871 | ||
4849 | ret = file_id3 ? pictureflow_main(file) : pictureflow_main(NULL); | 4872 | ret = file_id3 ? pictureflow_main(file) : pictureflow_main(NULL); |
4850 | if ( ret == PLUGIN_OK || ret == PLUGIN_GOTO_WPS) { | 4873 | if ( ret == PLUGIN_OK || ret == PLUGIN_GOTO_WPS) { |
4851 | pf_cfg.last_album = center_index; | 4874 | if (pf_state == pf_scrolling) |
4875 | pf_cfg.last_album = target; | ||
4876 | else | ||
4877 | pf_cfg.last_album = center_index; | ||
4852 | if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, | 4878 | if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, |
4853 | CONFIG_VERSION)) | 4879 | CONFIG_VERSION)) |
4854 | { | 4880 | { |
diff --git a/manual/plugins/pictureflow.tex b/manual/plugins/pictureflow.tex index 2e4dcaca01..b00ccea8c7 100644 --- a/manual/plugins/pictureflow.tex +++ b/manual/plugins/pictureflow.tex | |||
@@ -201,6 +201,7 @@ reduces the time it takes for cover art to be displayed.}} | |||
201 | \subsubsection{Main Menu} | 201 | \subsubsection{Main Menu} |
202 | \begin{description} | 202 | \begin{description} |
203 | \item[Show Tracks While Browsing.] Scroll through albums from their track list. | 203 | \item[Show Tracks While Browsing.] Scroll through albums from their track list. |
204 | \item[Go to Last Album.] Go to selected album when PictureFlow was last quit or the sorting changed. | ||
204 | \item[Go to WPS.] Leave PictureFlow and enter the While Playing Screen. | 205 | \item[Go to WPS.] Leave PictureFlow and enter the While Playing Screen. |
205 | \item[Clear playlist] Removes all entries from the current playlist. | 206 | \item[Clear playlist] Removes all entries from the current playlist. |
206 | \item[Playback Control.] Control music playback from within the plugin. | 207 | \item[Playback Control.] Control music playback from within the plugin. |