1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17198 commits

Author SHA1 Message Date
William Wilgus
a0c29d8857 db_commit swap threads, add ability to cancel, backup/restore
extends the db_commit plugin with the ability to delete the database
backup, restore, dis/enable auto-commit

Change-Id: Id61546e463d151399d2ac8459480e6adc5d6fac6
2023-10-10 05:48:37 -04:00
William Wilgus
eb13628bb8 [BUGFIX] yesno.c use TIME_AFTER macro
Change-Id: I52561dd70e182b3540638d6a7c05474e14fa7a2e
2023-10-09 20:23:03 -04:00
William Wilgus
ff0055ba6b list allow VOICE_ONLY strings
Change-Id: Ie42ba8de986a10f68e05af0ecdb735b020aa9d1a
2023-10-09 08:40:06 -04:00
Solomon Peachy
57713f6308 ipod: Support IAP remote MENU/SELECT/UP/DOWN keys in MODE2
Only the primary contexts (standard, wps, quckscreen, tree, radio)
handle the new keys so far.

Todo contexts:  Settings, keyboard, pitchscreen, bookmark, & recording.

Available docs for MODE4 don't list anything other than playback
controls, so it's not clear if there is a path forward here.

Change-Id: I91908092f75d96813e2e155e447129ba15f58051
2023-10-06 11:31:59 -04:00
William Wilgus
17a8a54780 [BugFix] tagcache/tagtree remove static buffer from tagcache_get_next
remove sizeof(buf) infavor of the actual size provided by bufsz

Change-Id: I9fc1b2ce0937526d7acbb98738c8eb1aef15683f
2023-10-06 09:17:25 -04:00
William Wilgus
2e184d129d [FixRed] db_commit
Non Tagcache targets

Change-Id: I0e6c1e8551859863105f97f393b308bca947c6d4
2023-10-05 22:59:05 -04:00
William Wilgus
f3baff762a [FixRed] db_commit add rb-> to plugin function
Change-Id: I9c47142c0075df47149805ec87effc6ee0b94a24
2023-10-05 22:33:01 -04:00
William Wilgus
f671c3339e [FixRed] db_commit plugin
Fix Hosted and Touchscreen targets

Change-Id: I3c7ef3ca6ebc0703e0455f3405b683dff1384864
2023-10-05 22:07:03 -04:00
William Wilgus
1ed640da24 [Feature] db_commit plugin allows a more verbose commit
prints logf messages to the screen buffer and dumps the
output to .rockbox/db_commit_log.txt

logs warnings about tags that can't
be displayed by the current font

adds an option to the tagcache using the file
.rockbox/database_commit.ignore to prevent auto commit

Change-Id: Ib381b3b6d9dd19d76c95d0e87e605f7378e29674
2023-10-05 21:24:37 -04:00
William Wilgus
6634a60bf0 tagcache/tagtree remove static buffer from tagcache_get_next
callers can supply their own buffer

Change-Id: I8996ecfb88e30926296a0cb0563cf6c46977323e
2023-10-03 21:54:19 -04:00
William Wilgus
eee48dca39 tagcache reduce stack usage in tmpbuf_insert and build_index functions #2
move some functions around for later ifdef for tagcache commit plugin

used fixed width variables in struct temp_file_entry

Change-Id: I7f66b15cd1bdf5abcefa700086d390d22d3b5e21
2023-10-03 13:56:00 -04:00
William Wilgus
b64d46d9d4 Revert "tagcache reduce stack usage in tmpbuf_insert and build_index functions"
This reverts commit 3bb3e3d1a6.

Reason for revert: lifetimes do not overlap but patch has issues

Change-Id: I3f831599dd1523c156205aa6565ff8afc2f4d8f6
2023-10-03 11:07:49 -04:00
William Wilgus
3bb3e3d1a6 tagcache reduce stack usage in tmpbuf_insert and build_index functions
move some functions around for later ifdef for tagcache commit plugin

used fixed width variables in struct temp_file_entry

Change-Id: Idf9c37d67fc048550366e3d3504601a19c31f31e
2023-10-03 10:08:13 -04:00
William Wilgus
f017ef9617 [FixRed] android yesno dialog
add a dummy fn with not for future dev

Change-Id: I2afc06bb1eaeb19b4972b625b6245c2361d8b8e7
2023-10-01 12:21:54 -04:00
William Wilgus
1c47722226 [Feature] add a prompt to database commit on start-up
adds a new function:
gui_syncyesno_run_w_tmo(ticks, tmo_default_res, main_msg,yes_msg, no_msg)

when a database needs committed on start-up
a yes no prompt will appear if not answered within 5 seconds
it defaults to Yes

if instead you choose No next start-up you will be asked again

you could rebuild the db still and waste time but it wouldn't hurt
anything so I don't think that path needs blocked

Change-Id: I58411f6e6bfebb6f142d99f33a1e8885ae7785c1
2023-10-01 11:51:38 -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
Aidan MacDonald
d3b588678f Remove structec API from tagcache
Replace structec usage with explicit endian swapping routines
for the various data types. Simplify endianness detection when
loading the database. Make foreign endianness support optional,
but leave it enabled for now.

Change-Id: Ia1efb72c8830f63bbe0e51f7271c4552b5279878
2023-10-01 12:10:41 +01:00
Aidan MacDonald
825ec0b601 Remove structec API from debug_menu.c
Change-Id: I6b35bcdc4e676e81faf5353ca01ba4bd728ffb14
2023-10-01 12:10:41 +01:00
Aidan MacDonald
18fc68401c Remove structec API from talk.c
Change-Id: I6e3bae2a893c932b67b4b5a7c4bf46060e5dc32a
2023-10-01 12:10:41 +01:00
Aidan MacDonald
4745970974 playlist: Use PLAYLIST_QUEUED instead of PLAYLIST_QUEUE_MASK
We don't need two names for the same 1-bit field.

Change-Id: I71ed61198da8d6e4bf4d449d8704982918099f7d
2023-09-30 09:03:58 +01:00
William Wilgus
62db16c82c [BugFix] bookmark.c root_dir bookmark
in some calls to generate_bookmark_file_name()

len gets specified in order to not NULL terminate the buffer string
unfortunately, I missed the root_dir case in g#4839

Change-Id: I24d1360bbe72e6a1b2ed3332ff5854d039d58ca5
2023-09-23 11:19:59 -04:00
William Wilgus
fcc82dfdca [BugFix] REPEAT_ONE manual track skip
Still having problems with determining the type of track change

lets try just watching the audio_next/prev functions

Change-Id: Ie4233ff4d4bf49792a6549d7bcd169ff4b1afd20
2023-09-23 00:52:38 -04:00
Solomon Peachy
57a47ef67a calculator: Fix compile issue in mingw32
Change-Id: I7d70b4f0d6fd574575298b0709e78b9096801c07
2023-09-22 10:32:09 -04:00
Solomon Peachy
74ded2bdd7 settings: Fix up the remaining stragglers from 8cc3266b
Change-Id: I20e98d1e7cf13a59194f62935a8f46e96f83a1f9
2023-09-22 10:31:00 -04:00
Solomon Peachy
8cc3266b2a Settings: Rename INT/BOOL setting type enum to RB_INT/RB_BOOL
....Because INT and BOOL are already defined in mingw32.

Change-Id: I28ab8189c00002c8f68bc9d0c23d2ae78d9e33d0
2023-09-22 10:00:46 -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
6ac55adc88 Fix suggested file name when saving dirplay playlist
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-09-21 05:09:39 +02:00
Christian Soffke
8f3cb75df0 Delete bookmarks when replacing unrelated playlist
After saving a playlist to an existing file with
a different name, any saved bookmarks for the old
playlist were still displayed for the new one.

Change-Id: Ic2666bdaf7ec6e25456283fc15760c568dd7ac38
2023-09-21 04:55:25 +02:00
Christian Soffke
e43c703480 fiiom3k: Recording keymap adjustment
Long button presses to create a new file
were in conflict with button presses to
play/pause.

Pressing SELECT is now used to create a new file
(and start recording, if stopped),
pressing PLAY/PAUSE will start or pause recording.

Change-Id: If2e568b9b05500d73fd54b691262a64d1a0ff487
2023-09-21 04:48:57 +02:00
roman.artiukhin
951e239517 Cache folder album art
Fixes FS#13372

Change-Id: Ia50f5252cb8375a97c093abeda89d830bf003ff3
2023-09-20 10:01:47 -04:00
William Wilgus
e01055a287 [RFC] REPEAT_ONE manual track skip
I recently added track skipping while REPEAT_ONE was set

currently by registering a track skip callback
I'm not entirely happy with the additional constant overhead
of the event callback

Instead I went looking for a way to distinguish
a pending track skip from some limited testing
it appears to work just as well to compare
playback's skip_pending == TRACK_SKIP_AUTO
but the lack of lifetime control worries me slightly

Change-Id: Ic71b4c3925e991f5a1216d16ecd3af6cc777ef1e
2023-09-19 19:47:22 -04:00
William Wilgus
f96f7cd941 [Feature] Skip to next file even if loop one is set.
repeat one till manually skipped

https://forums.rockbox.org/index.php/topic,54218.0.html

Change-Id: If2ea1cd892531c735c30c428dea3678806283a3b
2023-09-18 22:48:21 -04:00
William Wilgus
3c9be11411 option_select HASFLAG guard macro expansion with parens
cheap insurance

Change-Id: I8b1fccfda55350a2197cbc261b06a8c8c9dd9c65
2023-09-18 00:17:06 -04:00
William Wilgus
e8a17b1282 option_select.c clean-up option_screen
No functional changes

Change-Id: I0409b76258ce8af5aa9c2e68a2070b6e25927d1c
2023-09-17 13:29:03 -04:00
William Wilgus
df51d49b22 [BugFix] F_CB_ONLY_IF_CHANGED Overlapped NVRAM
the flag I chose was already used for nvram settings
moved both CB flags to unused flags

Change-Id: I9fdbc88460b08654a06b4d5950712947eab04b79
2023-09-13 23:25:05 -04:00
William Wilgus
d8b995c642 speed up adding files from filetree WIP
open an insert context

add tracks using the opened context

release opened context and sync the playlist

Change-Id: Idea700ffcf42a38dc23e131c92a6c5d325833170
2023-09-12 22:07:41 -04:00
Christian Soffke
84450dfd5d Playback: Fix 'auto' frequency not applied when paused
A frequency change didn't go into effect immediately
when a user picked "Auto" for the sample rate, while
playback was paused

Change-Id: I254853b664c5b6812264fdaf81dfb8fbfff43dbf
2023-09-11 10:57:07 -04:00
roman.artiukhin
7bbaf74c5c Ability to control backlight for soft lock action
See Settings -> General Settings -> Display -> LCD Settings -> Backlight on Lock

Change-Id: I201cb1c2907bb6842bf5d0b7a657e9db27aa905a
2023-09-09 22:00:14 -04:00
Solomon Peachy
b3abb27179 FS13395: Update Italian Translation (Alessio Lenzi)
Change-Id: Ia9a3ded95b0e50cda3497310472564f3ee3563fb
2023-09-08 11:27:47 -04:00
William Wilgus
ed369e1d47 misc.c check_bootfile exit search loop after bootfile found
Change-Id: Ie2397de29e87dfb1d2fb73cb6eb42c94fdfbf356
2023-09-01 23:43:24 -04:00
William Wilgus
79b64a3fc7 setting_list.c playback frequency cleanup
moves the callback to settings_list

audio_set_playback_frequency now accepts an actual frequency
44100 192000 etc rather than an index

Change-Id: Ieb3fc79a7fe3f1ff050465c8cd8061027e4572ff
2023-09-01 19:32:27 -04:00
William Wilgus
873f49b1f0 settings_list add F_CB_ONLY_IF_CHANGED for settings
Recently I added F_CB_ON_SELECT_ONLY_IF_CHANGED in conjunction
with the shuffle and repeat settings

instead it makes more sense to make F_CB_ONLY_IF_CHANGED
and apply to all callbacks (F_CB_ON_SELECT_ONLY or on_exit)

Change-Id: I4376557d479aceb419f7b4b4e0998afc249c87ec
2023-08-29 09:26:41 -04:00
William Wilgus
e60ade1fbc [BugFix] last fm scrobbler not saving pending tracks on shutdown
Change-Id: If7b03220c466ccf3f27cdf13d2e0b50d6a312bdc
2023-08-29 02:48:51 -04:00
William Wilgus
1c80f53581 [Bugfix] shuffle shenanigans from g5288 Fix #13369 shuffle & repeat callbacks
shuffle and sort were called on startup before playlist_init
and also on setting switch even without select

repeat is also now handled in settings_list as well

after moving the callbacks to settings_list.c
there was then a problem of unintended callbacks on exit of the menus
fixed that with F_CB_ON_SELECT_ONLY

since the callback was called regardless of the setting being changed
on F_CB_ON_SELECT_ONLY which is preferable in some circumstances
I co-opted F_TEMPVAR to allow the callback only when the setting was changed
with the flag F_CB_ON_SELECT_ONLY_IF_CHANGED

Change-Id: I5265233bbb556dc06c45273e742be5d78510a806
2023-08-29 01:29:38 -04:00
JJ Style
8a22660770 Fix #13369: shuffle setting not working from shortcut.
Setting in shortcut was not being handled as it had no callback.
In the settings menu it looks like the event is handled separately.
Added a shuffle callback to the setting so it is called when changed
from the shortcut.

Edit: move callback to within settings_list so playlist interface is
unchanged.

Change-Id: I3691acac1c73a80bf67c0b8b334009ef1655fdb0
2023-08-27 00:39:52 -04:00
Christian Soffke
03d326fc90 Remove obsolete alias for audio_record function
Rockbox doesn't support HW codec anymore

Change-Id: Ia20d3f02f0d9db88b23cf9074e4d76aa21fd53b0
2023-08-17 13:40:09 +02:00
Solomon Peachy
9fd59557fc pdbox: Fix inconsistent function definition
Change-Id: Ia258f1d111cedf9698538a38a1b949a43199b92c
2023-07-02 20:45:16 -04:00
Aidan MacDonald
b1fac21e4e playlist: Fix wrong handling of playlists without UTF-8 BOM
add_indices_to_playlist() wrongly assumes playlist->utf8 means
the playlist has a UTF-8 BOM. It only means the file is UTF-8
encoded, and says nothing about the presence of a BOM.

Trying to seek past a BOM when there is none mangles the first
filename in the playlist. Avoid this by closing & reopening the
playlist, which ensures the BOM (or lack of it) gets detected
properly.

Change-Id: I222fa6fc31e941d0252f1895b393a51694b93b7c
2023-07-02 12:15:57 -04:00
Aidan MacDonald
3b1e95d480 playlist: Simplify get_track_filename()
Have get_track_filename() read track seek offset & insert type
itself to avoid duplicating code. Most callers are not interested
in that information, and only use it to call get_track_filename().

Change-Id: I46d50fda10e515f74e27eebdded8e281bbf4456f
2023-07-02 12:14:58 -04:00
Aidan MacDonald
9ba51e3552 playlist: Remove playlist_add()
It was only used in filetree.c. It's still implemented in Lua so
scripts using rb.playlist_add() won't break, but has been removed
from the Lua API "backend".

Change-Id: I5625a47f0692456008c6b10dee14755151d22f29
2023-07-02 12:14:33 -04:00