Remove useless force_update field in media file info

This commit is contained in:
Julien BLACHE 2009-06-11 19:15:22 +02:00
parent c918c5c689
commit 3b7ff30c1b
5 changed files with 6 additions and 13 deletions

View File

@ -98,7 +98,6 @@ static struct col_type_map mfi_cols_map[] =
{ mfi_offsetof(db_timestamp), DB_TYPE_INT },
{ mfi_offsetof(disabled), DB_TYPE_INT },
{ mfi_offsetof(sample_count), DB_TYPE_INT64 },
{ mfi_offsetof(force_update), DB_TYPE_INT },
{ mfi_offsetof(codectype), DB_TYPE_STRING },
{ mfi_offsetof(index), DB_TYPE_INT },
{ mfi_offsetof(has_video), DB_TYPE_INT },
@ -170,7 +169,6 @@ static ssize_t dbmfi_cols_map[] =
dbmfi_offsetof(db_timestamp),
dbmfi_offsetof(disabled),
dbmfi_offsetof(sample_count),
dbmfi_offsetof(force_update),
dbmfi_offsetof(codectype),
dbmfi_offsetof(idx),
dbmfi_offsetof(has_video),
@ -1165,12 +1163,12 @@ db_file_add(struct media_file_info *mfi)
" orchestra, conductor, grouping, url, bitrate, samplerate, song_length, file_size, year, track," \
" total_tracks, disc, total_discs, bpm, compilation, rating, play_count, data_kind, item_kind," \
" description, time_added, time_modified, time_played, db_timestamp, disabled, sample_count," \
" force_update, codectype, idx, has_video, contentrating, bits_per_sample, album_artist)" \
" codectype, idx, has_video, contentrating, bits_per_sample, album_artist)" \
" VALUES (NULL, '%q', '%q', %Q, %Q, %Q, %Q, %Q, %Q, %Q," \
" %Q, %Q, %Q, %Q, %d, %d, %d, %" PRIi64 ", %d, %d," \
" %d, %d, %d, %d, %d, %d, %d, %d, %d," \
" %Q, %" PRIi64 ", %" PRIi64 ", %" PRIi64 ", %" PRIi64 ", %d, %" PRIi64 "," \
" %d, %Q, %d, %d, %d, %d, %Q);"
" %Q, %d, %d, %d, %d, %Q);"
char *query;
char *errmsg;
int ret;
@ -1197,7 +1195,7 @@ db_file_add(struct media_file_info *mfi)
mfi->rating, mfi->play_count, mfi->data_kind, mfi->item_kind,
mfi->description, (int64_t)mfi->time_added, (int64_t)mfi->time_modified,
(int64_t)mfi->time_played, (int64_t)mfi->db_timestamp, mfi->disabled, mfi->sample_count,
mfi->force_update, mfi->codectype, mfi->index, mfi->has_video,
mfi->codectype, mfi->index, mfi->has_video,
mfi->contentrating, mfi->bits_per_sample, mfi->album_artist);
if (!query)
{
@ -1235,7 +1233,7 @@ db_file_update(struct media_file_info *mfi)
" compilation = %d, rating = %d, data_kind = %d, item_kind = %d," \
" description = %Q, time_modified = %" PRIi64 "," \
" db_timestamp = %" PRIi64 ", sample_count = %d," \
" force_update = %d, codectype = %Q, idx = %d, has_video = %d," \
" codectype = %Q, idx = %d, has_video = %d," \
" bits_per_sample = %d, album_artist = %Q WHERE id = %d;"
char *query;
char *errmsg;
@ -1260,7 +1258,7 @@ db_file_update(struct media_file_info *mfi)
mfi->compilation, mfi->rating, mfi->data_kind, mfi->item_kind,
mfi->description, (int64_t)mfi->time_modified,
(int64_t)mfi->db_timestamp, mfi->sample_count,
mfi->force_update, mfi->codectype, mfi->index, mfi->has_video,
mfi->codectype, mfi->index, mfi->has_video,
mfi->bits_per_sample, mfi->album_artist, mfi->id);
if (!query)
@ -2587,7 +2585,6 @@ db_perthread_deinit(void)
" db_timestamp INTEGER DEFAULT 0," \
" disabled INTEGER DEFAULT 0," \
" sample_count INTEGER DEFAULT 0," \
" force_update INTEGER DEFAULT 0," \
" codectype VARCHAR(5) DEFAULT NULL," \
" idx INTEGER NOT NULL," \
" has_video INTEGER DEFAULT 0," \

View File

@ -92,7 +92,6 @@ struct media_file_info {
uint32_t item_kind; /* song or movie */
uint32_t data_kind; /* dmap.datakind (asdk) */
uint32_t force_update;
uint64_t sample_count;
char compilation;
@ -167,7 +166,6 @@ struct db_media_file_info {
char *db_timestamp;
char *disabled;
char *sample_count;
char *force_update;
char *codectype;
char *idx;
char *has_video;

View File

@ -185,7 +185,7 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation)
mfi = db_file_fetch_bypath(file);
need_update = (!mfi || (mfi->db_timestamp < mtime) || mfi->force_update);
need_update = (!mfi || (mfi->db_timestamp < mtime));
if (!need_update)
{

View File

@ -124,7 +124,6 @@ static struct field_map rsp_fields[] =
{ "db_timestamp", dbmfi_offsetof(db_timestamp), F_DETAILED },
{ "disabled", dbmfi_offsetof(disabled), F_ALWAYS },
{ "sample_count", dbmfi_offsetof(sample_count), F_DETAILED },
{ "force_update", dbmfi_offsetof(force_update), F_DETAILED },
{ "codectype", dbmfi_offsetof(codectype), F_ALWAYS },
{ "idx", dbmfi_offsetof(idx), F_DETAILED },
{ "has_video", dbmfi_offsetof(has_video), F_DETAILED },

View File

@ -68,7 +68,6 @@ static struct rsp_query_field_map rsp_query_fields[] =
{ 0, RSP_TYPE_DATE, "time_played" },
{ 0, RSP_TYPE_DATE, "db_timestamp" },
{ 0, RSP_TYPE_INT, "sample_count" },
{ 0, RSP_TYPE_INT, "force_update" },
{ 0, RSP_TYPE_STRING, "codectype" },
{ 0, RSP_TYPE_INT, "idx" },
{ 0, RSP_TYPE_INT, "has_video" },