From 21735eb91be30a707151231c5c3ed29d277469cd Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Tue, 18 Dec 2007 21:50:29 +0000 Subject: 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 --- apps/tagcache.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'apps/tagcache.h') 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, /* 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" @@ -92,10 +89,11 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, #define TAGCACHE_STATEFILE ROCKBOX_DIR "/database_state.tcd" /* Flags */ -#define FLAG_DELETED 0x0001 /* Entry has been removed from db */ -#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ -#define FLAG_DIRTYNUM 0x0004 /* Numeric data has been modified */ -#define FLAG_TRKNUMGEN 0x0008 /* Track number has been generated */ +#define FLAG_DELETED 0x0001 /* Entry has been removed from db */ +#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ +#define FLAG_DIRTYNUM 0x0004 /* Numeric data has been modified */ +#define FLAG_TRKNUMGEN 0x0008 /* Track number has been generated */ +#define FLAG_RESURRECTED 0x0010 /* Statistics data has been resurrected */ #define FLAG_GET_ATTR(flag) ((flag >> 16) & 0x0000ffff) #define FLAG_SET_ATTR(flag,attr) flag = (flag & 0x0000ffff) | (attr << 16) -- cgit v1.2.3