From f6039466fb275f55be16113bbbf46872f90862c8 Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sun, 16 Dec 2007 21:10:26 +0000 Subject: Added file modify time field to the DB. Now metadata changes should be 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 --- apps/tagcache.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'apps/tagcache.h') diff --git a/apps/tagcache.h b/apps/tagcache.h index 39f0c61f7e..879cf66fbd 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -25,13 +25,13 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, tag_filename, tag_composer, tag_comment, tag_albumartist, tag_grouping, tag_year, tag_discnumber, tag_tracknumber, tag_bitrate, tag_length, tag_playcount, tag_rating, - tag_playtime, tag_lastplayed, tag_commitid, + tag_playtime, tag_lastplayed, tag_commitid, tag_mtime, /* Virtual tags */ tag_virt_length_min, tag_virt_length_sec, tag_virt_playtime_min, tag_virt_playtime_sec, tag_virt_entryage, tag_virt_autoscore }; -#define TAG_COUNT 19 +#define TAG_COUNT 20 /* Maximum length of a single tag. */ #define TAG_MAXLEN (MAX_PATH*2) @@ -43,7 +43,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, #define IDX_BUF_DEPTH 64 /* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */ -#define TAGCACHE_MAGIC 0x5443480b +#define TAGCACHE_MAGIC 0x5443480c /* How much to allocate extra space for ramcache. */ #define TAGCACHE_RESERVE 32768 @@ -72,10 +72,23 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, #define TAGCACHE_MAX_CLAUSES 32 /* Tag database files. */ + +/* Temporary database containing new tags to be committed to the main db. */ #define TAGCACHE_FILE_TEMP ROCKBOX_DIR "/database_tmp.tcd" + +/* Database containing deleted entries with runtime statistics. */ +#define TAGCACHE_FILE_DELETED ROCKBOX_DIR "/database_del.tcd" + +/* The main database master index and numeric data. */ #define TAGCACHE_FILE_MASTER ROCKBOX_DIR "/database_idx.tcd" + +/* The main database string data. */ #define TAGCACHE_FILE_INDEX ROCKBOX_DIR "/database_%d.tcd" + +/* ASCII dumpfile of the DB contents. */ #define TAGCACHE_FILE_CHANGELOG ROCKBOX_DIR "/database_changelog.txt" + +/* Serialized DB. */ #define TAGCACHE_STATEFILE ROCKBOX_DIR "/database_state.tcd" /* Flags */ -- cgit v1.2.3