summaryrefslogtreecommitdiffstats
path: root/apps/tagcache.h
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-12-16 21:10:26 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-12-16 21:10:26 +0000
commitf6039466fb275f55be16113bbbf46872f90862c8 (patch)
tree5ab33d8b5b933266f5dcdcffe8e7711e25e5b6a8 /apps/tagcache.h
parent646d39ec4e51c2736737a5689f37256e31db2620 (diff)
downloadrockbox-f6039466fb275f55be16113bbbf46872f90862c8.tar.gz
rockbox-f6039466fb275f55be16113bbbf46872f90862c8.tar.bz2
rockbox-f6039466fb275f55be16113bbbf46872f90862c8.zip
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
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h19
1 files changed, 16 insertions, 3 deletions
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 */