It turns out that our error prone method of managing nvs keys has led to
an error!
We took a look over the other keys here and it didn't look like any
others were missing.
Fixes#204
- The tag parser's cache is now cleared between indexing runs, preventing stale data from being used
- Multi-value tag fields (genres, all artists) are now properly ingested in the tag value cache
- Cleaning up removed index records now properly handles the case where only a subset of the records for multi-value tags need to be deleted.
- Synthesizing missing tag values is now done in the tag parser instead of TrackTags, which resolves some issues with multi-value tag callbacks from libtags not being handled properly
These fixes seem to address all the issues with stale index records we were able to repro (including the issues in https://codeberg.org/cool-tech-zone/tangara-fw/issues/191), but if you've got any more cases with consistent repros then lmk!
Co-authored-by: ailurux <ailuruxx@gmail.com>
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/193
Overflow menu for the now playing screen. New home for the info screen here. Adds quick navigation to current album or artist (thanks tjk!) and clear queue button.
Also fixed up the way the now playing screen looks when queue is cleared (remove previous duration and don't show "loading" if nothing is actively loading).
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/184
Co-authored-by: ailurux <ailuruxx@gmail.com>
Co-committed-by: ailurux <ailuruxx@gmail.com>
Queue now has a separate 'ready' property to indicate it's ready to be used, which is independent from whether it's still loading tracks in. This also improves the response time for shuffling all tracks (we will initially pick a random track in the first 100 tracks whilst the rest of the tracks are loading). This should also fix issues where one song will start playing and then repeat itself when the queue finishes loading, and hopefully solve #160 as well (though I couldn't actually repro this myself).
Co-authored-by: jacqueline <me@jacqueline.id.au>
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/170
Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
Co-authored-by: ailurux <ailuruxx@gmail.com>
Co-committed-by: ailurux <ailuruxx@gmail.com>
We still mostly use the singular 'Artist' tag for e.g. displaying a nice
name in the now playing screen, but where a track has an 'ARTISTS=' tag,
we'll split by semicolon and then use the resulting list to populate an
index of tracks by artist
Trying and failing to parse tags from unsupported files is probably
costly (requires reading from SD card), and it probably slows down
indexing large collections that include a lot of non-audio files (like
cover art, etc).
This limits tag parsing to only files that have extensions for
supported audio formats. It assumes that folks don't have audio files
in supported formats with crazy extensions (e.g. an mp3-formatted file
with the extension .lol). Since this hardcodes a list of supported file
extensions for tag parsing, it'll need to be maintained later if more
formats are supported. The file ext matching is case-insensitive.
Fixes#149
I was confused about why setting the level to something lower didn't
seem to work, so this attempts make it more clear that not all log
levels are actually available on release builds.
Fixes#155
I think this is what most folks would expect to happen if BT is
disconnected/disabled and the headphones are removed.
Also, I think(?) this fixes one situation where the device doesn't idle/
sleep when folks would expect it to (not connected to headphones or bt).
This replaces the previous system of a separate track and queue repeat, with a RepeatMode type with the following options and behaviours:
- OFF: No repeat, queue or track. When the current queue finishes, shuffled or otherwise, playback will stop.
- REPEAT_TRACK: The current track will loop indefinitely, unless next is explicitly called through some user action (ie using the next button in the now playing screen)
- REPEAT_QUEUE: The entire queue will repeat indefinitely. When shuffled is enabled this will repeat the queue with new combinations each cycle.
The repeat mode is persisted in non-volatile storage, so the behaviour will be consistent throughout restarts and queue replacements, and so the "queue repeat by default" use case can be met in this way.
In addition, I've made it work a little nicer when the queue runs out in the now playing screen, keeping the previously played track shown and playback can be continued by using the play button or by going to a previous song in the queue.
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/126
Co-authored-by: ailurux <ailuruxx@gmail.com>
Co-committed-by: ailurux <ailuruxx@gmail.com>