Commit graph

318 commits

Author SHA1 Message Date
Christian Soffke
4346a1e8e7 playlist catalog: sort independently from file browser
Allow independent sorting of playlists in the
playlist catalog, using the context menu.

You may want to usually sort playlists by their date
(modified), but sort audio tracks alphabetically.
This is now possible without having to constantly
adjust a setting.

The fact that 'Sort Files' applied to both the file
browser and playlist catalog seems more like a side
effect of the implementation, rather than behavior
that is wanted. Additionally, the 'By Type' sorting
makes no sense when only a single type is displayed.

Since many of the other File View settings don't
apply to the playlist catalog, hide the menu there.

Change-Id: Ic35038015d0860998ae117f472ce23ce3bc80cfa
2025-05-30 08:30:47 -04:00
Christian Soffke
f3d127f372 Minor confirm prompt adjustments
* Rename LANG_RESET_ASK to LANG_ARE_YOU_SURE,
  so that it matches the actual language string
  (translations remain valid), and can be repurposed
  for generic confirmation prompts, where the
  first line says "Are you sure?", and the second
  line reiterates the selected action

* Add "Reset Settings" as second line to the prompt
  shown before resetting settings, instead of just
  asking "Are you sure?"

* Make Shuffle prompt consistent between WPS and
  Playlist Viewer, and ask whether user is sure they
  want to Shuffle instead of warning them that the
  current playlist will be erased, which was a bit
  misleading

* Explicitly say "Cancelled" when user answers NO to
  erasing the current playlist or to overwriting a file.
  Improves consistency with other prompts that are
  displayed for potentially destructive actions, e.g.
  before items are deleted, renamed, saved, or reset.

* PictureFlow: Prompt before rebuilding/updating cache

Change-Id: Id8ae36db7187315eb1a374701307e6ab4dcdbd1d
2025-05-26 23:15:53 -04:00
Christian Soffke
ae54b06af4 playlist catalog: Hide Copy/Cut/Open With
It may make sense to only show these in the
file browser, where you'd expect to do more
general file operations involving other folders.

Change-Id: I008569d2017811ee54b4449acb30359843f35294
2025-04-19 20:59:16 -04:00
Christian Soffke
93b1611474 tagtree: defer context menu disk access
When the database isn't loaded into RAM,
or the "quick" load setting is enabled,
filenames for tracks must be retrieved
from disk.

With a single track selected, this
can cause a delay before its context
menu is displayed.

Since filenames are only needed after the
user has selected something from the menu,
it makes sense to defer retrieval until
disk access becomes inevitable.

Change-Id: I72b57eff3102b50f3e19441119e20aad903b1f2b
2025-04-17 08:23:45 -04:00
Christian Soffke
b5d2c1eb51 Set as Backdrop: Show preview, asking for confirmation
A new backdrop can make menus hard to read
or navigate, so give user a chance to
immediately cancel the backdrop adjustment.

Change-Id: Ib2d1ad3888afeca18677a1bbdd2c3b404ed13463
2025-03-23 22:21:03 +01:00
Christian Soffke
8ecff409da Set As Backdrop: Ensure whole skin is updated
Only parts of the skin were updated
after selecting a new backdrop

Change-Id: Ib2f2146636907e5bf228e7e5ed9c7f650e56fa47
2025-03-22 22:30:16 +01:00
Christian Soffke
ae3b34734a onplay: Enhance consistency of menu item order
Matches 'Playlists' context menu, by
putting "Save Current Playlist" next
to "View Current Playlist"

Change-Id: Ie1d7a6bf8d5acdb830db44a2c4d3ed2adc17b878
2025-03-10 01:18:40 +01:00
William Wilgus
4e271642df [Feature] Persist pitch settings through reboots part deux
Revisit this after discussion with chris_s on IRC and forum

Pitch menu now changes icon when pitch has been changed

uses NVRAM to save the pitch settings unconditionally

Manual updated

Change-Id: Idcb4c2b7fe42f7a203dc4bfc46285657f370d0fd
2025-01-19 00:29:47 -05:00
William Wilgus
13c3214d9c [Feature] Persist pitch settings through reboots
saves the pitch setting across reboots

adds option 'Reset Setting'

Change-Id: I75d88f9653883a256c6cca0f7adcdccb2dd51406
2025-01-17 22:42:15 -05:00
Christian Soffke
8f5128da16 Show Track Info: Support fs tags in Playlist Viewer, Properties, and PictureFlow
Playlist Viewer falls back to splashf if there is not
enough plugin buffer space left for running the
view_text plugin .

Change-Id: I418731018b03f396270b68e5e2d2e69635df1af0
2024-12-16 00:20:10 +01:00
Roman Artiukhin
55a5bfe740 View Album Art from WPS context menu
Add ability to imageviewer to view current track embedded/folder album art
Add "View Album Art" WPS context menu item

Change-Id: I49caebd38e5e3e2910d418bbeaa5e51da0e6bd93
2024-10-28 12:46:51 -04:00
William Wilgus
34e54b33f7 codestyle changes on g5911
Change-Id: I8e3b172686fe78d52a8b407193479d3af36ee536
2024-09-04 10:58:24 -04:00
Paul Sauro
c16dbbfd1f Reworks to the shuffle system to improve performance and allow fast shuffling from a big library (but this work for all database views)
This improvement brings a huge performance improvement to start a random mix of your library. Previously, the only way to do this was to increase the size of a playlist with absurd sizes number. Now it will respect the limitation but will insert random songs from the current view.

Database: Add true random songs in playlist if it is gonna exceed its maximum capacity

More context is available here : https://www.reddit.com/r/rockbox/comments/1ez0mq4/i_developped_true_full_library_shuffle_for/

Also :
- Improved layout in the DB browser
- New default max playlists capacity is now 2000 on old PortalPlayer targets to give a better user experience and not having to wait dozens of seconds while creating a playlist
- "Show insert shuffled" option is now true by default
- Add a new shortcut to play all songs shuffled in the DB browser
- Now the feature is fully optional and enabled only on targets that have more than 2MB of RAM
- Add entries about this feature in the manual to explain it to the users
Change-Id: I1aebaf7ebcff2bf907080f1861027d530619097c

Change-Id: I3354923b148eeef1975171990e814a1a505d1df0
2024-08-31 10:44:20 -04:00
Christian Soffke
70b96193e7 plugins: properties: use UI viewport for displaying progress
Prevent switching to a fullscreen view when scanning
a directory, which could be a bit jarring, depending
on your theme of choice.

Also pop context menu activity immediately, without
refreshing, so it isn't redrawn when returning from
plugin.

Change-Id: I021e5880505e7f121163851ae732eb47509cc5d8
2024-07-28 20:18:43 +02:00
William Wilgus
b0dfcde2f5 [Cleanup] onplay.c fileop.c
clean-up a bit more
add/correct some comments

fix some error passing
guard delete path on PATH_TOO_LONG

add some cpu_boost

Change-Id: Icf179dd727271bdc61ab78400e10847222b9f858
2024-07-04 12:44:04 -04:00
William Wilgus
dc7486c7de [Feature] onplay.c show file progress
first some clean-up of onplay.c

extend/move fileobject copy, move, delete routines in prep for other users

add error checking, better error codes
pre scan to make sure the operation doesn't exceed system resources
show progress for file and directory copies

Change-Id: Ife2e62df554892dab651bab40433bf70b27e73ff
2024-06-30 02:09:40 -04:00
Christian Soffke
bcd34cfaa7 playlist catalogue (etc.): prune context menu
"Create Directory" option not applicable
in browse filter modes, since directories
do not get displayed

Change-Id: I68944264b03115f7f94254d9df766e5584d30e5a
2024-06-01 12:40:45 -04:00
Christian Soffke
ef1e7d8896 bookmarks: show 'Create Bookmark' for unsaved playlists
Instead of hiding this option when the current playlist
is unsaved, we can offer to save the playlist, if
necessary, before attempting to create a bookmark.

This simplifies the workflow by getting rid of steps 1
and 2 that a user currently needs to perform:

1) Open context menu, check if "Create Bookmark" option
   is available
2) If not: Re-open context menu. Select Current Playlist
   -> Save Current Playlist
3) Re-open context menu. Select Bookmarks
   -> Create Bookmark

Change-Id: Ia9fb5f9db95e2fcbde03470a3c3745824424a339
2024-06-01 11:42:47 -04:00
Solomon Peachy
b6053c4d54 voice: Fix a handful of non-voiced splash messages
Change-Id: I561c756c542fa24824a881b5632c955a920b8471
2024-05-13 12:02:17 -04:00
Aidan MacDonald
9d585cbc05 Fix red in f026cc4e17
Change-Id: I9ea1e18a8658a51bf0c917bec372f7509569ede2
2024-04-01 18:21:37 +01:00
Aidan MacDonald
f026cc4e17 tagcache: Add menu entry for customizing the DB path
Allow the database path to be set from the file browser's
"Set As" context menu, so it can be changed without editing
the .cfg file by hand.

Change-Id: Ie1a84bcb2084ee3b1a0a18cc51f564238515f164
2024-04-01 17:23:06 +01:00
William Wilgus
1dc22c7241 use path_append for setting directories is several settings
sprintf, strcpy, memccpy can all just go thru path_append
with the added benefit of some path sanitizing too

Change-Id: I33510b56a364b8b3a0b06f2ff14b76491f6e3870
2024-04-01 07:35:53 -04:00
Christian Soffke
f932522d8a WPS context menu: Set modified after reshuffle
Prevents incorrect bookmarking of permanently
(not just temporarily) shuffled playlists, which
need to be resaved, before they can be correctly
bookmarked.

Change-Id: I157d3be9d05117f7566ca72f3e736f96b42a165d
2023-10-17 12:29:41 -04:00
Aidan MacDonald
7ccbd705f4 playlist: Rework playlist modified detection and dirplay
The modified state is now an explicit flag that has to be
set whenever a user-triggered modification occurs. This is
recorded in the control file to ensure it doesn't get lost
after resume. There may be some places I missed where the
modified flag should be set/cleared, but it seems to work
well enough right now.

Change-Id: I3bdba358fc495b4ca84e389ac6e7bcbef820c219
2023-10-01 11:05:29 -04:00
Christian Soffke
cb3a6877fc RFC: Turn Playing Time function into plugin
Since this function already requires hitting the
disk, it may make sense to turn it into a plugin.

A minor advantage (apart from cleaning up onplay.c
and saving RAM) is that you can now access the menu
not just from the WPS context menu, but also from
the Shortcuts Menu or using the WPS plugin shortcut.

On the other hand,  TSR plugins would have to be
terminated when Playing Time is launched, as is
already the case for other plugins such as PictureFlow.

Change-Id: Iea85229486887463ffc52f05e33e2340437f69a4
2023-09-20 23:57:39 -04:00
Christian Soffke
129fb4016b Tagtree 'Play Next' Menu: Eliminate redundant filename retrieval
The file name for a track in the database has been
retrieved already, before its context menu is displayed,
or a hotkey is executed, see:
8a22d2678a/apps/tree.c (L811)

So, skip over tagtree_current_playlist_insert and instead
use playlist_insert_track() directly, when user selects
something from the "Playing Next" menu or uses a hotkey.

Change-Id: Ie0789d8314949e9872bf261634d81b96432ccda3
2023-06-29 17:09:15 -04:00
Christian Soffke
422ea20cef Warn before overwriting another playlist on disk
When saving a playlist to an existing file on disk,
warn user, unless the playlist's file name remains
unchanged.

Change-Id: I10d82667de5fadb5323be4f981bea9263849f07a
2023-06-21 13:09:05 -04:00
Christian Soffke
3ef49d9c5e PictureFlow: Make Shuffle options available
The "Playing Next..." menu couldn't display any
options for shuffling tracks of an album before

Change-Id: I54f4497394fb29877bf8bce0ef95a27c82eb2279
2023-05-27 19:17:52 -04:00
Christian Soffke
028eafaeef Onplay: Fix items from Queue submenu appearing at top level
If "Show Queue Options" was set to "in Submenu",
the queue options would incorrectly appear at
the top level after you had queued a track, at
least until you entered and exited the submenu
again without selecting an option.

Change-Id: I59abd73de7e3634bc8701aa2288b56bde7552513
2023-05-26 19:13:29 +02:00
Christian Soffke
43b0fba75d Track Info: Show number of tracks being inspected
Applies to the database and PictureFlow

+ fix red 6ca57ec

Change-Id: If708851ebdfe075e9d6ea3f2e2dd790cc9deac94
2023-04-13 03:55:21 +02:00
Christian Soffke
6ca57ec389 Track Info: Display larger file size and length values
When displaying Track Info for multiple tracks,
the value for combined file sizes or length was
capped at 2 GiB / ~596h.
Limit has been raised by a factor of 1000.

Change-Id: I942c64e81864cba3f719c83a24912883fafeb70e
2023-04-13 02:31:32 +02:00
roman.artiukhin
1e678977f2 Hotkey: Add List Bookmarks action
Change-Id: I8cc775d2403b682d6d91069e26947fc08d379258
2023-04-05 09:06:28 -04:00
Christian Soffke
31d56d4a59 Database: Disable delete hotkey unless audio file is selected
Fixes behavior where Rockbox would offer to
delete nonexistent directories.

Change-Id: I219da382b181372023b9408ac9a85189bffdcb74
2023-04-05 07:16:18 -04:00
Christian Soffke
32f365bf3c database: make parent tables work with plugin
Enables the use of PictureFlow and the Properties plugin
with parent tables of ALLSUBENTRIES, such as an album
or album artist, instead of individual tracks.

Change-Id: I18c4779ed116a48c732ae32b9629e7e0d93ce7c8
2023-01-19 15:56:35 -05:00
Christian Soffke
7f265ee8dd Database: Add ability to insert multiple files into playlists
You could only add single files to playlists
from the database browser before. This
enables adding any database selection to
a new or existing playlist.

Change-Id: I811c7167641c589944bb2afc18dcc1d299a7b979
2023-01-14 12:14:28 -05:00
William Wilgus
cc79f1b543 on_play.c clean up playing_time
move seconds and sizes to arrays indiexed by enums
use a loop for the display and talk of each
stop exiting on SYS_EVENTs

Change-Id: I49d5b9827df4e711b38326e5fef3c54292000370
2023-01-14 10:31:56 -05:00
William Wilgus
6e08731835 [Feature] onplay.c Playlist Playing Time more fault tolerant
bad tracks now get skipped with a message at the end of scanning
rather than an error killing the count

Change-Id: I6d8c14ce00e78416b772bc5e9093a889351bc3de
2023-01-14 00:46:08 -05:00
Christian Soffke
d5e38062ea Fix hotkey strings
missed in 7d13c0c

Change-Id: I7299b6a646dc143943b2c8d1d89ecdc4a16667c7
2023-01-10 17:05:53 +01:00
Christian Soffke
7d13c0c4eb Rename "Playing Next..." menu items & hide Queue/Shuffle
"Play Next" instead of "Insert Next"
"Add" instead of "Insert"
"Play Last" instead of "Insert Last"
"Add Shuffled" instead of "Insert Shuffled"
"Play Last Shuffled" instead of "Insert Last Shuffled"

-"Queue" items hidden by default
- Shuffled options hidden by default
(Both can be enabled in options)

Resulting default menu:

Playing Next...
	Play Next
	Add
	Play Last
	Play

Change-Id: Ib0c07a8077ab4b10c2dbc7af33516adcd0d4b83a
2023-01-07 16:32:22 +01:00
Christian Soffke
ed95892a1f Rename “Current Playlist” and “Playlist Catalogue” context menus
Use action-oriented and more descriptive titles

"Add to Playlist..." instead of "Playlist Catalogue"
- "Add to Existing Playlist" instead of "Add to Playlist"
- "Add to New Playlist" (unchanged)

- "Playing Next..." instead of "Current Playlist"

In WPS context menu:

- "Current Playlist" instead of "Playlist"

Change-Id: I5cce9e317676537988682f46ac6b920598af3b9e
2023-01-07 14:53:36 +01:00
Christian Soffke
21ca64d7cd File Browser: Add “Set As..." context menu
Moves options for configuring:

- Playlist Directory
- Recording Directory
- Start Directory

into a single menu.

Necessary prerequisite for giving the
"Playlist Catalogue" context menu item a title that's a
little more action-oriented ("Add to Playlist…”).

Change-Id: I4ee08fc67d5350c38ae1a57cb345c4ed1082d0b5
2023-01-07 14:53:36 +01:00
Christian Soffke
b444ecfca2 plugins: Properties: Add 'Last Modified' for audio files
In commit f3358eb, the Properties plugin started using the
Track Info screen for audio files, which didn't show when
the file was last modified. This adds it back.

Change-Id: I3ce519da234a4bcadab1d64b67de0298cada8f6e
2023-01-06 19:00:24 +01:00
William Wilgus
c85a4f1fa4 menus remove reserved 'param' parameter
-- missed the plugin menu --

Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17 04:24:37 -05:00
William Wilgus
ccf1aaa5be menus move functions with parameters to their own type
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-17 02:51:43 -05:00
William Wilgus
28f768cb84 onplay hotkey add flags
idea here as discussed with chris_s is to allow flags
in the hotkey_assignment struct to change how items are displayed

Change-Id: Id4cf1d79fbe3ff8f5590b9a863fccf00ddd457f9
2022-12-16 01:44:05 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
Christian Soffke
dfd9c10589 Eliminate skin updates in between activities
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-11 11:50:33 +01:00
Christian Soffke
098a8fd334 Playlist Catalogue: Restore selection in playlist
Saves and restores the selected item in your
most-recently accessed playlist, similar to Database
and File Browser.

Change-Id: I00afca41e33470cb458c4b87baccd6fd4016887a
2022-11-26 17:20:06 +01:00
William Wilgus
71934d4c16 move confirm delete prompt to misc.c
Change-Id: Iadb1c7199caa5070f555eb4d329efb02e3193289
2022-11-24 23:09:26 -05:00
Christian Soffke
6bc443f474 Hotkeys: Add placeholder for function return value
Seems a bit clearer to me than redefining the meaning
of ONPLAY_OK in this context, which was easy to miss.

Fixes the return value for the bookmark_create_menu
hotkey, too. It was previously mapped to ONPLAY_OK
in case the function failed, and to ONPLAY_RELOAD_DIR
if it succeeded. This had no ill effect - or any effect –
since either of the values were disregarded by the WPS
when executing a hotkey.

Return values of playlist_insert_shuffled also had no
effect (by design, apparently, see commit 482b45b).
Use ONPLAY_FUNC_RETURN in hotkey_assignment.

Behavior hasn't changed, it's only been made more
explicit.

Change-Id: Iefc60c9f42c1063af78d368dc382916848064d38
2022-11-23 01:22:14 -05:00