summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
AgeCommit message (Collapse)Author
2009-07-14FS#10080Nils Wallménius
* Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-04Do not delete tagcache entries on bootup with dircache enabled but ↵Thomas Martitz
auto-update disabled. This fixes for example disappearing database if you happen to boot without µSD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21644 a1c6a512-1295-4272-9138-f99709370657
2009-07-04Crude logging for the sim in database creation/updating - to aid in debuggingJonas Häggqvist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21638 a1c6a512-1295-4272-9138-f99709370657
2009-06-30Second attempt at fixing FS#10396. Turns out that gcc for coldfire choose to ↵Magnus Holmgren
inline a function with a big appetite for stack. The previous fix improved things a bit, but not nearly enough. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21580 a1c6a512-1295-4272-9138-f99709370657
2009-06-30Small change to significantly reduce stack usage during database scanning. ↵Magnus Holmgren
This should fix FS#10396. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21576 a1c6a512-1295-4272-9138-f99709370657
2009-06-20A bunch of stability fixes into tagcache engine and database browser. Mainly ↵Miika Pekkarinen
data retrieval problems, races, data corruption of sorted index files at the end with junk data, access to unitialized memory and so on. Should fix FS#8710 and may fix FS#8414. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21402 a1c6a512-1295-4272-9138-f99709370657
2009-06-19Fixed searches from tagcache when there is a sudden need to open a tag file ↵Miika Pekkarinen
on the fly. Thanks to Andrew Mahoney for pointing out the issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21351 a1c6a512-1295-4272-9138-f99709370657
2009-06-06Add a system-wide BIT_N macro, implemented via an LUT on SH, and use it in ↵Andrew Mahone
the TAGCACHE_IS_* macros in place of per-set LUTs, removing duplication of data between those LUTs and the mask values used on other targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21195 a1c6a512-1295-4272-9138-f99709370657
2009-06-03Replace bitfield for tagcache tag sets with array of char on SH.Andrew Mahone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21176 a1c6a512-1295-4272-9138-f99709370657
2009-06-03Replace arrays of tags that are numeric/sorted/uniqued with bitfields ↵Andrew Mahone
flagging each tag that is a member of the set, and replace the membership tests with a shift and bitwise and. The test is still done inside a function on SH, as this saves some space vs the macro used on other targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21175 a1c6a512-1295-4272-9138-f99709370657
2009-05-17Fix duplicate #includesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-04-15Handle the DB dirty flag correctly. Now a broken DB should stay disabled. ↵Miika Pekkarinen
Also don't remove broken files automatically. Should improve (or even fix) the duplicate entry issue seen in FS#8414 when the problem is caused by the player shutting down in the middle of a DB commit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20710 a1c6a512-1295-4272-9138-f99709370657
2009-03-08Clean up some more #includesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20243 a1c6a512-1295-4272-9138-f99709370657
2009-03-06Fix FS#9977 - Thanks to Brian Sutherland for intensive testing and effortThomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20214 a1c6a512-1295-4272-9138-f99709370657
2008-12-15Moved database builder into a separate directory, and gave it its' own ↵Björn Stenberg
Makefile. Now it compiles cleanly and builds a database if ran in root of music tree. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19448 a1c6a512-1295-4272-9138-f99709370657
2008-11-01Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts
that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-10-15Split id3.c/h into metadata.c/h and metadata/mp3.c. Updated all references. ↵Björn Stenberg
Moved mp3data.c/h from firmware to apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18814 a1c6a512-1295-4272-9138-f99709370657
2008-08-29Fixed a possible index id destruction and temporary problems with the DB ↵Miika Pekkarinen
when DB has been loaded to ram, dircache enabled and statistics gathering ON. Fixed serial (affecting last played song order) being one too low after importing the changelog. A bit of code cleanup and comments also. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18363 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-04Make sure a temporary file does not exists preventing the database ↵Miika Pekkarinen
re-initialization. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17689 a1c6a512-1295-4272-9138-f99709370657
2008-05-03Renamed build_tagcache to tagcache_build to make it consistent with the ↵Bertrik Sikken
function naming of the other functions in tagcache.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17331 a1c6a512-1295-4272-9138-f99709370657
2008-05-03Made source files #include the header file that they implement to make sure ↵Bertrik Sikken
they are in sync. Made some local functions static. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17312 a1c6a512-1295-4272-9138-f99709370657
2008-04-28Moved atoi declaration to stdlib.h. Deleted atoi.hBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-24fix 64bit sim warningJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17235 a1c6a512-1295-4272-9138-f99709370657
2008-04-24structec makes a poor assumption that all targets use 1 byte chars, 2 byte ↵Jonathan Gordon
shorts and 4 byte longs which is wrong on 64bit sims which causes database to not be commited. The proper fix should be to remove those assumtopns but probably not nescacery untill a target comes along which breaks the assumption. This _shouldnt_ change anything on target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17234 a1c6a512-1295-4272-9138-f99709370657
2008-04-19FS#8795 - Fixed fault of the escape processing in Changelog (by Kenjiro Arai).Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17178 a1c6a512-1295-4272-9138-f99709370657
2008-04-19Made strictly local functions static (command_queue_sync_callback and ↵Bertrik Sikken
run_command_queue) in tagcache.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17176 a1c6a512-1295-4272-9138-f99709370657
2008-03-09FS#8707 - Enable "Load to RAM" (HAS_TC_RAMCACHE) compilation without ↵Miika Pekkarinen
Directory Cache (HAS_DIRCACHE). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16594 a1c6a512-1295-4272-9138-f99709370657
2008-02-17FS#8565 - fix for runtime data causing extra spin ups. Included a debug menu ↵Miika Pekkarinen
update also. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16330 a1c6a512-1295-4272-9138-f99709370657
2008-02-04add support for database.unignore files (adds dirs to the database which ↵Marcoen Hirschberg
would be skipped because of a database.ignore file) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16214 a1c6a512-1295-4272-9138-f99709370657
2008-01-25Fix a bug in tagcache tag length check, thanks to Rhino Banga.Peter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16166 a1c6a512-1295-4272-9138-f99709370657
2008-01-13Fixed the red.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16083 a1c6a512-1295-4272-9138-f99709370657
2008-01-13Always check for deleted files, no matter how slow it might be when DB ↵Miika Pekkarinen
autoupdate is enabled. Also simplified code a bit. Fixed a crash when search is performaed and dircache has been vanished and DB is still exists ram. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16081 a1c6a512-1295-4272-9138-f99709370657
2008-01-07FS#8423 - Fixes quirks in routine used to remove obsolote entries from ↵Miika Pekkarinen
tagcache. This might fix FS#8414 and should fix FS#8384. Thanks to Lee Kang Hyuk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16016 a1c6a512-1295-4272-9138-f99709370657
2007-12-18Preserve song statistics when moving files or altering metadata. Conditions ↵Miika Pekkarinen
required to apply: song length must not change AND either filenames (with path) must match or two of the following tags matches: artist, album, title. IMPORTANT: Currently dircache enabled and DB loaded to RAM is required for reliable operation of this feature. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15955 a1c6a512-1295-4272-9138-f99709370657
2007-12-16Added file modify time field to the DB. Now metadata changes should be ↵Miika Pekkarinen
detected with database autoupdate enabled. Runtime statistics are not yet preserved. Preserving statistics over moving of files and altering metadata is going to be implemented next. IMPORTANT: Export database before upgrading. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15946 a1c6a512-1295-4272-9138-f99709370657
2007-11-23Free resources properly. Fixes all kind of strange issues (shutdown problems ↵Miika Pekkarinen
with dircache and dirfds running out) with the newly added database.ignore -feature. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15780 a1c6a512-1295-4272-9138-f99709370657
2007-11-21consolidate the 3 file_exists() functions into one; use the version that ↵Robert Kukla
explicitly uses dircache; give dir_exists() the same treatment for consistency git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15742 a1c6a512-1295-4272-9138-f99709370657
2007-11-21FS#5690 - folders with a file named database.ignore will be skipped by the ↵Jonathan Gordon
database when it rebuilds, (this includes any subdirs in that fodler) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15738 a1c6a512-1295-4272-9138-f99709370657
2007-10-21Fixed debug menu crashing. Show last file processed by tagcache engine in ↵Miika Pekkarinen
debug menu. Enabled autoupdating of deleted files for flash storage devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15244 a1c6a512-1295-4272-9138-f99709370657
2007-10-16Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some ↵Michael Sevakis
threading code in IRAM that should be there on PP502x. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
2007-10-16Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis
towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-10-01Use a struct mp3entry instead of a struct trackinfo for temporary storage of ↵Nicolas Pennequin
the metadata. In the same spirit as r14326, it makes MoB "easier". git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14943 a1c6a512-1295-4272-9138-f99709370657
2007-09-19Remove the ID3 tag version priority setting on the grounds of it being ↵Thom Johansen
pretty pointless. ID3v2 tags are superior to ID3v1 tags, and needs less seeking around to find. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14750 a1c6a512-1295-4272-9138-f99709370657
2007-09-15Fixed an out of buffer boundaries lookup when database has been loaded in ram.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14720 a1c6a512-1295-4272-9138-f99709370657
2007-08-14Make get_metadata act on a struct mp3entry rather than a struct track_info.Nicolas Pennequin
This should make it easy to use a buffer handle to put the ID3 data in. The changes in get_metadata are mostly search and replace. The only thing it actually used to do on the struct track_info was set taginfo_ready to true. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14326 a1c6a512-1295-4272-9138-f99709370657
2007-08-08Add support for grouping tags. From FS#7362.Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14242 a1c6a512-1295-4272-9138-f99709370657
2007-08-03Add support for parsing the disc number tag from metadata and use of it in ↵Dan Everton
the database. Patch originally from FS#4961 with some minor tweaks by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14154 a1c6a512-1295-4272-9138-f99709370657
2007-07-21Queue song statistical data to the tagcache system and update entirely in ↵Miika Pekkarinen
background. Fixes ratings disappearing or not saving in the DB at all. Fixes also UI delay when stopping playback and new statistics are committed to DB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13955 a1c6a512-1295-4272-9138-f99709370657
2007-07-20Makes apps and plugins interract with directories using a posix-like api ↵Kevin Ferrare
instead of calling dircache / simulator functions (no additionnal layer added, only a cosmetic change) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13943 a1c6a512-1295-4272-9138-f99709370657