summaryrefslogtreecommitdiff
path: root/apps/tagcache.h
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-12-18 21:50:29 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-12-18 21:50:29 +0000
commit21735eb91be30a707151231c5c3ed29d277469cd (patch)
tree944d9523bde2864489d47500b14109b356f4f370 /apps/tagcache.h
parentdcf56e974476a04685473687a7fe314c12608f6b (diff)
downloadrockbox-21735eb91be30a707151231c5c3ed29d277469cd.tar.gz
rockbox-21735eb91be30a707151231c5c3ed29d277469cd.zip
Preserve song statistics when moving files or altering metadata. Conditions 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
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h
index 879cf66fbd..9aaa17c9c8 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -76,9 +76,6 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
76/* Temporary database containing new tags to be committed to the main db. */ 76/* Temporary database containing new tags to be committed to the main db. */
77#define TAGCACHE_FILE_TEMP ROCKBOX_DIR "/database_tmp.tcd" 77#define TAGCACHE_FILE_TEMP ROCKBOX_DIR "/database_tmp.tcd"
78 78
79/* Database containing deleted entries with runtime statistics. */
80#define TAGCACHE_FILE_DELETED ROCKBOX_DIR "/database_del.tcd"
81
82/* The main database master index and numeric data. */ 79/* The main database master index and numeric data. */
83#define TAGCACHE_FILE_MASTER ROCKBOX_DIR "/database_idx.tcd" 80#define TAGCACHE_FILE_MASTER ROCKBOX_DIR "/database_idx.tcd"
84 81
@@ -92,10 +89,11 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
92#define TAGCACHE_STATEFILE ROCKBOX_DIR "/database_state.tcd" 89#define TAGCACHE_STATEFILE ROCKBOX_DIR "/database_state.tcd"
93 90
94/* Flags */ 91/* Flags */
95#define FLAG_DELETED 0x0001 /* Entry has been removed from db */ 92#define FLAG_DELETED 0x0001 /* Entry has been removed from db */
96#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ 93#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */
97#define FLAG_DIRTYNUM 0x0004 /* Numeric data has been modified */ 94#define FLAG_DIRTYNUM 0x0004 /* Numeric data has been modified */
98#define FLAG_TRKNUMGEN 0x0008 /* Track number has been generated */ 95#define FLAG_TRKNUMGEN 0x0008 /* Track number has been generated */
96#define FLAG_RESURRECTED 0x0010 /* Statistics data has been resurrected */
99#define FLAG_GET_ATTR(flag) ((flag >> 16) & 0x0000ffff) 97#define FLAG_GET_ATTR(flag) ((flag >> 16) & 0x0000ffff)
100#define FLAG_SET_ATTR(flag,attr) flag = (flag & 0x0000ffff) | (attr << 16) 98#define FLAG_SET_ATTR(flag,attr) flag = (flag & 0x0000ffff) | (attr << 16)
101 99