diff options
author | Dana Conrad <dconrad@fastmail.com> | 2021-04-18 13:00:41 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-05-03 20:10:27 +0000 |
commit | 4f83e66cd4e00bfa225f54b2c314a3d42d09ca7a (patch) | |
tree | 186717c39b55272249efc681091912a49e4872f2 /apps/filetree.c | |
parent | 49edfc237ba9ae27eee5e915e86989d9ee01b1da (diff) | |
download | rockbox-4f83e66cd4e00bfa225f54b2c314a3d42d09ca7a.tar.gz rockbox-4f83e66cd4e00bfa225f54b2c314a3d42d09ca7a.zip |
FS#13287 - Load a newly saved playlist and resume where it was
Works from any playlist saving operation accessed from the
While Playing Screen, all other playlist saving operations
are unchanged.
Now a user-selectable setting! Located in
General Settings -> Playlists -> Current Playlist ->
Reload After Saving (Yes/No)
Change-Id: I5085c3f4c56c518a812d5ee015d15cc4dca19a28
Diffstat (limited to 'apps/filetree.c')
-rw-r--r-- | apps/filetree.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/filetree.c b/apps/filetree.c index f8a1263e7f..5c6443cc34 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -86,12 +86,12 @@ int ft_build_playlist(struct tree_context* c, int start_index) * or started via bookmark autoload, true otherwise. * * Pointers to both the full pathname and the separated parts needed to - * avoid allocating yet another path buffer on the stack (and save some + * avoid allocating yet another path buffer on the stack (and save some * code; the caller typically needs to create the full pathname anyway)... */ -bool ft_play_playlist(char* pathname, char* dirname, char* filename) +bool ft_play_playlist(char* pathname, char* dirname, char* filename, bool skip_dyn_warning) { - if (global_settings.party_mode && audio_status()) + if (global_settings.party_mode && audio_status()) { splash(HZ, ID2P(LANG_PARTY_MODE)); return false; @@ -105,9 +105,13 @@ bool ft_play_playlist(char* pathname, char* dirname, char* filename) splash(0, ID2P(LANG_WAIT)); /* about to create a new current playlist... - allow user to cancel the operation */ - if (!warn_on_pl_erase()) - return false; + * allow user to cancel the operation. + * Do not show if skip_dyn_warning is true */ + if (!skip_dyn_warning) + { + if (!warn_on_pl_erase()) + return false; + } if (playlist_create(dirname, filename) != -1) { @@ -115,11 +119,11 @@ bool ft_play_playlist(char* pathname, char* dirname, char* filename) { playlist_shuffle(current_tick, -1); } - + playlist_start(0, 0, 0); return true; } - + return false; } @@ -465,7 +469,7 @@ int ft_enter(struct tree_context* c) switch ( file_attr & FILE_ATTR_MASK ) { case FILE_ATTR_M3U: - play = ft_play_playlist(buf, c->currdir, file->name); + play = ft_play_playlist(buf, c->currdir, file->name, false); if (play) { |