1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17163 commits

Author SHA1 Message Date
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
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
207a7fe448 last.fm scrobbler: Use portable alignment
Change-Id: I44cd89f4a4dca1ab9c6134b6a1bf16328d233c0e
2023-06-23 16:09:37 +02:00
Solomon Peachy
8a22d2678a skin: Fix minor compile warning caused by printf with size_t
Change-Id: I785d1dd05ac8ef81d817cdd1f7d1867c158bfadf
2023-06-22 15:59:53 -04:00
Christian Soffke
2f0034e012 plugins: last.fm scrobbler: fix crashes on iPod/ARM
Change-Id: Ife0f1be20c681c153163233569933348b06d5c32
2023-06-22 20:27:36 +02:00
Christian Soffke
939bd9c2c3 Playlist Viewer: Reset 'dirty' flag when saving playlist
Playlist Viewer, when quitting, should not ask
you to save a playlist that hasn't been modified
since it was last saved.

Change-Id: Ia401239392ba5f2d66562a991ba49b01c6c2d452
2023-06-22 11:31:10 -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
2747e920ba Track Info: Never return NULL in list item name callback
Just for good measure

Change-Id: I9dc25b2fd687da2b1fddf31ce1c1ea8895e4399c
2023-06-15 18:56:20 +02:00
Christian Soffke
cfd5ef8db8 Current Track Info: Respond to track changes or finished playlist
Properly update displayed playlist index and all available
metadata for the currently playing track. Also exit screen
when playlist has finished to prevent nonsense data from
being displayed.

Change-Id: Iecc53c0eda5cbd374b51827a25916ee4e2c6456f
2023-06-15 00:46:23 +02:00
Christian Soffke
666a836227 Skin Engine: Enable dithering for images drawn onto backdrop layer
Backdrop images loaded using %X(filename) already had
dithering enabled, but images loaded using the %x tag
in viewports annotated with %VB did not.

Change-Id: I9c6d11d8e7ab41a53eb9e453d78ae0dc58cb947b
2023-06-09 03:15:10 +02:00
Solomon Peachy
bd339dabac FS#13993: Updated Polish translation (Adam Rak)
Change-Id: I56b905e6ae776eb34af7a44caf61e1839bcfbfa7
2023-06-05 21:17:09 -04:00
Solomon Peachy
412e0621c1 Update english-us "translation"
Change-Id: Ifad2ecb526c1f2ba5c554601003049915877fcdd
2023-06-05 21:17:09 -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
31b8cd8f73 PictureFlow: Remove menu items for "Return" and "Clear Playlist"
On all players, it should be possible to return from the Main Menu
by pressing the Back or Menu key. Unless I'm missing something...

"Clear Playlist" has hopefully become superfluous after the "Playing Next"
context menu was added, which offers similar functionality.

Change-Id: I741544978fb7936b8d5a34dfc656472e20c1737e
2023-05-26 13:08:12 -04:00
Solomon Peachy
6e192dc28d hiby: the second drive for these is "USB" not "HD1"
Change-Id: I6a703265398db14ac9c83a51091184492123e1fb
2023-05-26 12:48:23 -04:00
Christian Soffke
49b877470d PictureFlow: Add ability to go to last album
After launch, PictureFlow always goes to the currently playing
album, or to a selected album, if applicable. Which is probably
a useful default, but not always wanted. You can now get back
to the album you were looking at when PictureFlow was last
closed, or when the sorting was last changed.

Change-Id: Iba3e0d5388f6b49534d09fe0224b0dbfa65d5f1d
2023-05-26 18:29:07 +02:00
Christian Soffke
bbef598817 PictureFlow: Scroll through albums from track list
This lets players that can't spare any keys scroll through
albums without leaving the track listing first, which was
only possible on the M3K before.

Enter mode from Main Menu. While active, the gradient
highlighting an album's selected track will not appear,
and context menu options apply to the whole album
instead of to a single track.

Exit mode by pressing buttons for Select/Back, or by
quitting PictureFlow.

NB: Be sure to enable "Database in RAM" for a good
experience, as the loading time for each album can
become quite annoying otherwise.

Change-Id: Id6c9a8cc49e4cfb2aea958610b95a19887f496b6
2023-05-26 12:26:06 -04:00
roman.artiukhin
f2a5b78b51 Sansa Clip keymap: Playlist on short Down press and Hotkey on long Down press in WPS
Change-Id: I39a01df90b658d76b9cf2f94d9a81a4f7ff076cf
2023-05-24 13:23:26 -04:00
Solomon Peachy
92b80bdba5 lang: Support languages that speak the units before a numerical value
Previously, it was hardcoded to the english convention of units-last, so
"100%" would be voiced as "one hundred percent".  This adds a new
language flag that makes the units be voiced first, ie "100%" will be
voiced as "percent one hundred".

So far only the Chinese-traditional and Chinese-simplified languages
utilize this feature (taken from an old ticket, FS#10340) but I'm sure
others would want this feature too.

Change-Id: Idf825ec9299dc0ed09921cf67aec61b1ab262fc6
2023-05-22 10:30:13 -04:00
Solomon Peachy
ab0ba139f5 pdbox: Gate the warning suppression to apply only to GCC 13 and newer.
Change-Id: Ie0f39fde5e682f3995ed852417b61ae383c5e23b
2023-05-22 10:28:38 -04:00
Solomon Peachy
3a8d5525ae pdbox: Fix warning with GCC13
Change-Id: I7814e7894b315d06c962fdaedf1a9f9cd59daf5c
2023-05-21 20:58:29 -04:00
William Wilgus
8fbd44a3d3 [BugFix] Last Fm Scrobbler corrupted entries
I couldn't seem to reproduce the issue here:
https://forums.rockbox.org/index.php/topic,54165.msg252081.html#msg252081

but I figure its probably a threading issue

so we now have a mutex on the cache

and to top it all off each cached entry has a crc and length that are
checked before writing the entry to the file otherwise it is prepended
with # FAILED - so hopefully scrobbler 'parsers?' don't barf on the log

Other changes:
there is now a MRU table for tracks this should help prevent duplicates
it is configurable..

the cache buffer now no longer uses fixed chunks allowing more tracks
to be written between flushes

Change-Id: Iaab7e3f6a76abfc61130f3233379a51c9a6d12e5
2023-05-20 22:41:34 -04:00
Franklin Wei
4554b90859 sdl: fix two bugs in ROCKBOXAUD_PlayAudio()
First was an off-by-one bug in the loop over buffers. The condition was
`i < this->hidden->n_buffers', but should have been <=, not <. This wasn't
a critical issue, because the last iteration would check the currently
playing buffer - an unlikely situation.

The second logic bug would make the code always think it had found an empty
buffer, even when it had not, since `idx' was being unconditionally set
every loop, rendering it unusable for a sentinel value. Fix that.

Change-Id: I137330965d699acf827e59b6aa5c5f9ddf2ca617
2023-05-17 13:23:14 -04:00
Solomon Peachy
fdf661606c FS#13992: Update Serbian translation (Ivan Pesic)
Change-Id: If0a7b2202a77b1482b3d4a819cff070b45b4fa4a
2023-05-09 16:37:07 -04:00
roman.artiukhin
67b98292a3 Temp quick fix for broken bookmarks
Mark playlist as not modified in playlist_resume

Change-Id: I8a9769a1fc1265f024da230e496eac9a10186097
2023-04-22 12:58:18 -04:00
William Wilgus
100e9ac137 Fix Red lastfm_scrobbler_viewer.c
plugins need rb-> for things like strlen

Change-Id: Ia3b52423d3f7f91c2996aa9b9b194f39af44468f
2023-04-17 00:36:04 -04:00
William Wilgus
dfe12252bb [Feature, Plugin] lastfm_scrobbler_viewer
a plugin to view lastfm scrobbler logs

uses print cell to give a spreadsheet view of scrobbler logs

buffers the whole file if possible otherwise it reads entries from disk

rudimentary text searching for columns
include / exclude; all/any and case sensitive

Change-Id: Id9616e5796658952fba4ea747f596cb77d6f34c0
2023-04-16 23:50:24 -04: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
William Wilgus
78c92c5ca8 [Feature] Supress voice during sleep timer shutdown
if show_shutdown_message == false and sleep timer is active
talk will be disabled on shutdown

Change-Id: Ia660e753700f3e283691f41797ef7a77a2d9a8d9
2023-04-08 17:13:07 -04:00
Christian Soffke
3554306617 PictureFlow: Minor fixes/refactoring
- get_albumart_for_index_from_db:
slide_index not allowed to be -1

- Fix visual glitch changing scroll direction:
An errant frame was displayed when switching
from one scroll direction immediately to the other

- Rename/combine functions and replace
magic numbers for zoom animation

- iPods: Fix inability to skip or reverse zoom animation
using Back button

Change-Id: I888c3c437bb123325813bf79be56b320cfbfda0c
2023-04-05 11:42:31 -04:00
Christian Soffke
8b95f2e758 plugins lib: use existing mp3info function
Change-Id: I88d3c04db5cbc0905153b0e616adb7a64afee707
2023-04-05 11:27:25 -04: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
287747591e plugins: vbrfix: Fix fd leak & error handling
- mp3info returns true for error
- fd wasn't closed for non-vbr files

Change-Id: I5432025d3384ddf92ed0a478587dcc1715fcf524
2023-04-01 08:19:22 -04:00