summaryrefslogtreecommitdiffstats
path: root/apps/menus/playlist_menu.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-30Fix bookmarking/reloading after saving shuffled playlistChristian Soffke1-1/+1
The resume index into the playlist file that was used for bookmarks created immediately after saving a shuffled playlist, or for reloading the saved playlist (in case "Reload After Saving" was enabled), tended to be incorrect. The playlist file effectively isn't shuffled anymore after saving it to a file, but the resume index may still have to be rotated unless playback has been stopped and resumed before bookmarking, due to indices that are shifted by first_index. Change-Id: Id335a7a71adc216989d7b415bfa48237d92fd7b0
2023-10-28Suggest numbered filename when saving untitled playlistChristian Soffke1-8/+7
+ update misleading comment for catalog_add_to_a_playlist's m3u8name parameter (the keyboard picker will be shown even if it's not NULL) Change-Id: I7576a83fd40cdcdb7a912c90d8c1d9a8f25e277c
2023-10-28playlist: Rewrite playlist_save(), optimization & fixesAidan MacDonald1-1/+1
playlist_save() was a poorly thought out mess. This fixes the glaring issues and hopefully ensures that saving the playlist never loses state (such as queued tracks or modified status) after save+resume. Indices are now updated on the fly, which is faster and needs no extra memory. But if an error occurs, the playlist will be corrupted. There is currently no attempt to handle this since errors should be unlikely, but some error handling needs to be added in the future. Change-Id: If8a5dbd6a596460be08ee0b7bab9f24337886ea4
2023-09-21Fix suggested file name when saving dirplay playlistChristian Soffke1-3/+17
The suggested name was identical to the complete path of the played folder, with a slash at the end, which, if accepted, resulted in a file called only ".m3u8" being saved there. In case the path contained one or more dots, the string was also stripped of the last dot and all chars following it. Use Playlist Catalogue as the destination folder instead, and pick last path component as the file name. Change-Id: Ia2b7f7ebca746613d650bbab6d7a62ca1106efc6
2023-06-21Warn before overwriting another playlist on diskChristian Soffke1-11/+3
When saving a playlist to an existing file on disk, warn user, unless the playlist's file name remains unchanged. Change-Id: I10d82667de5fadb5323be4f981bea9263849f07a
2022-12-17menus remove reserved 'param' parameterWilliam Wilgus1-4/+4
-- missed the plugin menu -- Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17menus move functions with parameters to their own typeWilliam Wilgus1-1/+1
left the union with function(void) and function_w_param(param) as a few areas might still need to use both (onplay.c) there might be a few I missed yet.. Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
2022-12-11Eliminate skin updates in between activitiesChristian Soffke1-0/+2
1) Adds way to pop activity without refreshing the skin at the same time. Activities are sometimes popped in immediate succession, or one activity is popped before another one is pushed right away. This can lead to the UI appearing glitchy, due to an activity only appearing for a split-second, which is especially noticeable with complex skins that change the dimensions of the UI viewport depending on the current activity To fix this, prevent superfluous skin updates * when switching between: - WPS and browser - WPS and Playlist Catalogue - WPS and playlist - WPS and Settings/System/Plugins * when accessing Track Info or when displaying bookmarks using the context menu on the WPS * when switching from QuickScreen to Shortcuts Menu 2) The playlist viewer activity was pushed & popped redundantly by playlist_view. ---- NB: Behavior has remained unchanged in all instances of the code where pop_current_activity() has been replaced by pop_current_activity(ACTIVITY_REFRESH_NOW). Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-12-01playlist_catalog remove static playlist_dir in favor of generation at runtimeWilliam Wilgus1-2/+2
this needs tested by the heavy playlist users with the addition of initialize_catalog_buf there shouldn't be any stack overflow concerns since we are no longer creating another max_path sized buffer when one is already available this also simplifies the code a bit rather than carrying around the playlist directory just generate it on the fly copies the directory to the supplied buffer add catbroswe_status to keep track of what browse context(s) are currently in use Change-Id: I145ec501f601c84bb52f2241ed28c6aefab6897b
2022-11-26Playlist Catalogue: Restore selection in playlistChristian Soffke1-1/+1
Saves and restores the selected item in your most-recently accessed playlist, similar to Database and File Browser. Change-Id: I00afca41e33470cb458c4b87baccd6fd4016887a
2022-05-14apps: Add "keep current track when replacing playlist" settingAidan MacDonald1-1/+6
Add a setting that makes Play and Play Shuffled in the playlist context menu leave the current song (if any) playing when they replace the playlist. Default to on, since this was the behavior of the old "Clear List & Play Next" option. Change-Id: I1340aed5c28bb3244e36d0953b3308ae59681c97
2021-05-03FS#13287 - Load a newly saved playlist and resume where it wasDana Conrad1-1/+61
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
2021-04-10misc: Only include rbpaths.h and string-extra.h in places that need itSolomon Peachy1-0/+1
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h) Build-tested on rocker, erosq, mini2g, nano2g, xduoox3, clipzip, dx50, and uisim Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
2021-03-14Customizable Current Playlist SubmenuChristian Soffke1-8/+14
Options to add shuffled tracks and to queue tracks in the Current Playlist Submenu can now be hidden, or the latter can also be put into its own submenu. Users can customize this in Settings by going to "General Settings - Playlists -> Current Playlist" and choosing from "Show Shuffled Adding Options" (No / Yes) or "Show Queue Options" (No / Yes / In Submenu). Allows for the paring down of the set of choices to a minimum of the 4 more common ones for adding tracks to a dynamic playlist (coming from the current total of 11). Defaults have been set so that users have to actively modify their settings to notice any difference, which makes it unlikely that anybody's workflow would be negatively affected by this change. Change-Id: Ibe48fc4da2c79f54cd7272df8e1e3ba9955203e5
2020-07-22keyboard add ability to specify temporary custom layoutsWilliam Wilgus1-1/+1
rb core allows you to load custom keyboard layouts this patch adds the ability to load a keyboard layout in a buffer the custom layout is temporary and does not overwrite the current layout use like so: unsigned short kbd[64]; unsigned short *kbd_p = kbd; if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd))) kbd_p = NULL; rb->kbd_input(buf,sizeof(buf), kbd_p); Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
2019-08-18Playlist reworkWilliam Wilgus1-11/+16
consolidate some of the playlist create functions remove extensions from playlist naming (you can still add it if you desire) switch to strlcpy, strlcpy functions Change-Id: Ibd62912da4d1f68ed5366baa887d92d4c6b1f933
2019-08-17Playlist Fix failure to append default file nameWilliam Wilgus1-1/+1
FS#12992 - Can't create playlist with all tracks on device (regression) references this issue empty_playlist() only sets filename[0] = '\0' the code was checking filename[1].. bug ensued strip extra leading '/' from default path Change-Id: Ibd8973666ee45583b9e11e3ba317c0e247f085c1
2018-10-18Fix menu warningsWilliam Wilgus1-5/+3
change offending bool return to int warning: cast between incompatible function types from '_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type] forgot to remove -- typedef int (*menu_function)(void); Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
2014-04-15playlist: Get rid of plugin buffer use in playlist_save().Thomas Martitz1-2/+1
The plugin buffer was used only to avoid reparsing the playlist, so non-essential. But when it was used it conflicted with the playlist viewer which already uses the plugin buffer for playlist purposes simultaneously. It only works by accident. Since the reparse avoidance is non-essential don't do it for now. A temp buffer can be passed to playlist_save() to enable it but the only caller (as of now) does not do that. Change-Id: I3f75f89d8551e1ec38800268b273105faba0efbf
2011-07-20FS#11808 - Major playlist handling changes (on disk playlists)Jonathan Gordon1-13/+40
* Playlists are treated similar to directories in the browser, they now open in the viewer when selected instead of automatically starting the playlist. * Make the "Playlists" main menu item useful, it now displays the playlist catalog (and has been renamed accordingly) * Default to storing playlists in the catalog * Add a UI to move the catalog directory (other minor stuff too) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30177 a1c6a512-1295-4272-9138-f99709370657
2010-08-21Safeguard against possible stack corruption when the string in the ↵Nils Wallménius1-1/+1
tempbuffer is as long as the buffer and strcat adds a char. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27854 a1c6a512-1295-4272-9138-f99709370657
2010-05-09FS#11250: Hotkey setting method changed to menu item vs button pres in ↵Jeffrey Goode1-1/+1
context menu. Manuals updated to match. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25905 a1c6a512-1295-4272-9138-f99709370657
2010-05-07Hotkey menu items have their own iconJeffrey Goode1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25866 a1c6a512-1295-4272-9138-f99709370657
2010-02-20Playlist Viewer Changes to bring consistency:Thomas Martitz1-3/+9
- combine its two context menus to one and - make the ACTION_STD_MENU go to the main menu as it does in all other screens - call playlist_viewer() via root_menu to reduce call depth and to be consistent with other screens (and for the above changes to be more flexible w.r.t to the following screen) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24791 a1c6a512-1295-4272-9138-f99709370657
2009-08-06Remove some unused #includesBertrik Sikken1-3/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22183 a1c6a512-1295-4272-9138-f99709370657
2009-05-17Fix duplicate #includesBertrik Sikken1-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2007-11-01Fix FS#7826 - make the view catalog option in the main menu > playlists menu ↵Jonathan Gordon1-1/+1
use the same text as the view catalog option in the onplay menus git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15392 a1c6a512-1295-4272-9138-f99709370657
2007-08-05*** Lang v2 cleanup (FS#6574) ***Nils Wallménius1-2/+2
1) Introduces apps/features.txt that controls which strings are included for each target based on defines. 2) .lng and .voice files are now target specific and the format versions of both these file types have been bumped, which means that new voice files are needed. 3) Use the 'features' mechanism to exclude strings for targets that didn't use them. 4) Delete unused and deprecated and duplicated strings, sort strings in english.lang Some string IDs were changed so translations will be slightly worse than before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
2007-05-19More header and dead code cleanup.Nils Wallménius1-4/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13430 a1c6a512-1295-4272-9138-f99709370657
2007-03-18Remove the exit_value variable.. set the MENU_FUNC_CHECK_RETVAL fla and Jonathan Gordon1-4/+4
return 1 if you want your funciton to quit the menus. save settings after clearing the background so it persists git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12827 a1c6a512-1295-4272-9138-f99709370657
2007-03-17Unify the way functions are called from menus.Jonathan Gordon1-8/+10
Optionally, the functions return value can be checked for a value to tell the menu to quit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12821 a1c6a512-1295-4272-9138-f99709370657
2007-03-15Change anywhere where do_menu()'s return value was checked and expected Jonathan Gordon1-1/+1
a bool to appear the same as the old API. Possibly fixes some bugs, but doubtful. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12772 a1c6a512-1295-4272-9138-f99709370657
2007-03-03Remove the need to double up the MENU macros in manu.h.Jonathan Gordon1-6/+6
Icons are now used by their id which must be part of the icons_6x8 enum, or Icon_NOICON for none git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12571 a1c6a512-1295-4272-9138-f99709370657
2007-03-01Introducing the root menu!Jonathan Gordon1-3/+5
Blind users: get a new voice file as there are lots of lang changes and new strings. FS#6630 or RootMenu on the wiki for more info. complaints to /dev/null :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12528 a1c6a512-1295-4272-9138-f99709370657
2007-02-14Icons in the menus. Thanks midkay for them.Jonathan Gordon1-4/+5
Any menus which dont yet show them are not converted to the new system. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12300 a1c6a512-1295-4272-9138-f99709370657
2007-02-13Fix the keywords on some recently added files.Jonathan Gordon1-1/+1
Remove apps/recording_settings_menu.c which should never have been commited git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12293 a1c6a512-1295-4272-9138-f99709370657
2007-02-11Move the playlist menu to the new systemJonathan Gordon1-1/+52
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12268 a1c6a512-1295-4272-9138-f99709370657
2007-02-08beginning of the new menu system. This commit shouldnt break anything, Jonathan Gordon1-0/+32
but comming ones might.. report bugs in http://forums.rockbox.org/index.php?topic=8703.0 and more info at http://www.rockbox.org/twiki/bin/view/Main/SettingsRecode git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12227 a1c6a512-1295-4272-9138-f99709370657