TAG_MAXLEN is 2* MAX_PATH, so this means we don't reject paths
that we could never actually open on the device.
Change-Id: I64363758163c0a6a5f54ebb1c9b455f3cb5b6e56
When a file is deleted from the database, the first character of that entry
is changed to \0. However the entry's length is not updated,
because the entry is still using space in the index.
When checking for deleted files, we were only keying on "length == 0"
instead of also checking to see if the entry itself starts with \0.
Change-Id: Ic00a0b29c3857c597ee5ff6ec01a5f4fd9633447
- The "Special character" entry will show all special characters (non numerical + non letters)
- The numerical entry was bug, and could show some special characters from the ASCII table. It is now fixed.
Change-Id: I001fb322fab81918996e15e4d0ca6b7c9e5160af
Mostly replace "%ld" with "%" PRId32 for int32_t,
or add casts to improve portability and prevent
incorrectly displayed values on some systems.
NB: (Some of) the log output is also presented
to the user in the db_commit plugin.
Change-Id: I98f663b35fec682c98f8a065253ee0c9bd34b61b
Event handling must happen on the main
thread for MacOS.
Not sure if button_queue_wait is the
best place for doing the SDL event
polling, but seems to work ok.
Change-Id: If928282df84bdd74e24a48afd7dbc4c4bfcc49e2
it was hard to hit this branch, I had to comment out:
ln 555 else if (offset == 1)
ln 556 pid3 = state->nid3;
as far as I can tell the reason for the separate filename buffer
was due to the failure mode of audio_peek_track() wiping
the id3->path, stands to reason for me that we can just fill it
again
-Already found a gotcha playlist_peek() mutates the buffer
makes me like this solution less, might rework tagcache_fill_tags()
instead
--Fixed
Change-Id: I4a2ee71a8e2d0739c9e141948b71c2ed36296e3b
Not sure this is a great idea from disk and battery standpoint
but there is no reason you can't..
using the name buffer to fill title data
prevent hitting the disk for each screen scroll
add get_metadata_ex to allow flags
METADATA_EXCLUDE_ID3_PATH
prevent copying the filename to the ID3 struct
METADATA_CLOSE_FD_ON_EXIT
instead of seeking to the beginning the file is closed before
get_metadata returns
add logic to allow a invalid fd to signal that get_metadata
should open and close the file within its call
bugfix per Chris_s don't use the tagcache for the trackinfo
Change-Id: Ic7a595b39a8d7a57f975312bc9c8bb4111f22a88
This reverts commit 0c737d3b2e.
Reason for revert: Not really a concern as open_stream returns an independent buffer since g#566
Change-Id: Idbd2f4a7cc2ea6362b7714629469eeb7b3d19b3b
The directory cache and the database's Load to RAM feature
each result in a much better user experience.
But, when both features are enabled at the same time, it
can take a very long time on older players - easily several
minutes for larger libraries - until all of the database's
dircache references have been updated.
Include a 'Quick' option that causes the database to ignore
dircache references which can *significantly* reduce disk
activity after booting.
Change-Id: I25ae779c97d03885b06d5a28d8be55c0d05692a5
The overly-generic name "find_tag()" is part of the skin parser
library and this can cause problems depending on what's included
from headers. Unfortunately.
Change-Id: I0cb02b1203daa6ff36595ed6c6f40b5b56bd3e58
Basically the namespace code _never_ actually linked properly on hosted
targets, but nobody noticed as there were no users, causing the symbols
to be dropped with no fuss.
The tagcache namespace awareness stuff pulled in the namespace code,
which made things go kaboom due to it relying on native FAT parsing
code.
Change-Id: Idef5f44b026c875022436809ca1f5015eece714a
When the sd card is mounted into the root namespace the database
picks up files through both paths
previously we hid the mounted drive but this causes issues with users
databases when the drive letter changes
Adds a way to keep track of volumes mounted in the root namespace
Hides the enumerated volume in root
Database:
we can just parse the root directory ('/') and get to any mounted
volume but we can also enumerate a volume in the root directory
when this occurs it leads to multiple entries since the files can
be reached through multiple paths ex, /Foo could also be /SD1/Foo
Instead we will attempt to rewrite the root with any non-hidden volumes
failing that just leave the paths alone
Change-Id: I7bdba8cfaf63902d2a3852d28484bcf8ca317ebd
extends the db_commit plugin with the ability to delete the database
backup, restore, dis/enable auto-commit
Change-Id: Id61546e463d151399d2ac8459480e6adc5d6fac6
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
move some functions around for later ifdef for tagcache commit plugin
used fixed width variables in struct temp_file_entry
Change-Id: I7f66b15cd1bdf5abcefa700086d390d22d3b5e21
move some functions around for later ifdef for tagcache commit plugin
used fixed width variables in struct temp_file_entry
Change-Id: Idf9c37d67fc048550366e3d3504601a19c31f31e
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
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
add some faster options to the track menu
add a shortcut for basename formatting
sort basename results
filename - by sorted filename
title - just title no formatting untagged items are unsorted as well
title mm:ss - title and duration
Change-Id: I90aea95051f6231580ef7f1fc08cd2d0d69601fb
the tagcache counts the null terminator strlen however, does not
no matching entries makes for a terrible amount of disk searching
and a hang on devices without dircache to save them
Change-Id: Id3460037199ee9853de0f11e4763a7ff11130e45
move loading file reference to a separate function
some optimization of the disk search function check tag length before
reading the actual entry & reduce number of lseek calls
this affects startup resume as well before tagcache is done loading
Change-Id: I2bd2fc53c4870416ecd1a4034b34cb6984d8ad51
global_settings is not defined when building the database tool.
Add a path buffer in tc_stat to fix this. This also avoids race
conditions that may occur if changing the path setting at runtime.
Change-Id: Ib2ca92c2e34929c79b19ef145fd7ccdcd62c8d04
Add a new setting,
database path: /path/to/folder
to change where the database files are stored, which allows it to
be shared by multiple builds when using multiboot. This avoids the
need to maintain a separate copy of the database for each build.
This setting can only be set from the config file; it has no menu
option yet (due to lack of a GUI to pick the directory).
Change-Id: Ide7b3ccdd84abb62b52f900421bd3d101773e093
Provide a function to remove the statefile so that external
users of this define can call that instead.
Change-Id: Id3e1e0564b25fe28bbc68c2e9365d8bf51e6e4f8
This has been defined to 1 since forever, so the last remaining
check presumably isn't catching anything.
Change-Id: I0b60f831a6e5e8fc45788e7581fccb0cb62bce73
Most of the defines in the header file are internal to the tagcache
and therefore should not be exposed in the header, to make it clear
that outside code does not depend on the values.
Change-Id: I83b0c83c61c755231e03719a6845a555f983194a
Amachronic raised concern about open() blocking causing a static buf
to get overwritten in multiple calls its prudent to just have the caller
supply the buffer to minimize stack issues later
Change-Id: Iae27c7d063adb1a65688f920f6aa5c395fa5694a
save some space by allowing printf formatting directly rather than
having a buffer and using sprintf
Change-Id: I049c8f898fb4a68a26ad0f0646250c242647ba12
replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation
in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base
Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
- Fix FPS counter overlapping
the artist string when
"Show album title" was set to
"Show album and artist at the top"
- Fix disappearance of center album
if certain Settings menus had been
accessed while list of tracks was
showing and you then returned to the
list of albums
- Fix disappearing album artwork after
cache had been created until you started
scrolling
- Enable context menu even if WPS
integration is disabled
- Make splash screen appear only
on first launch and for database
updates, when it is actually on screen
for long enough
- Eliminate 'Loading' splash if tagcache
is in RAM
- Show both album and artist by default on
displays whose height > 100px
Change-Id: Ie70c0d9093789294d288a4f88338ee4a588bf4a5
Several places in the codebase implemented an ad-hoc form of pinning;
they can be converted to use buflib pinning instead.
Change-Id: I4450be007e80f6c9cc9f56c2929fa4b9b85ebff3