[db,jsonapi] revert usermark from queue item table

This commit is contained in:
whatdoineed2do/Ray 2021-09-16 10:43:55 +01:00
parent 16cf3cb44b
commit 4d5c256327
5 changed files with 1 additions and 10 deletions

View File

@ -295,7 +295,6 @@ static const struct col_type_map qi_cols_map[] =
{ "bitrate", qi_offsetof(bitrate), DB_TYPE_INT },
{ "samplerate", qi_offsetof(samplerate), DB_TYPE_INT },
{ "channels", qi_offsetof(channels), DB_TYPE_INT },
{ "usermark", qi_offsetof(usermark), DB_TYPE_INT },
};
/* This list must be kept in sync with
@ -456,7 +455,6 @@ static const struct qi_mfi_map qi_mfi_map[] =
{ qi_offsetof(bitrate), mfi_offsetof(bitrate), dbmfi_offsetof(bitrate) },
{ qi_offsetof(samplerate), mfi_offsetof(samplerate), dbmfi_offsetof(samplerate) },
{ qi_offsetof(channels), mfi_offsetof(channels), dbmfi_offsetof(channels) },
{ qi_offsetof(usermark), mfi_offsetof(usermark), dbmfi_offsetof(usermark) },
};
/* This list must be kept in sync with

View File

@ -514,8 +514,6 @@ struct db_queue_item {
int64_t songartistid;
uint32_t usermark;
/* Not saved in queue table */
uint32_t seek;
};

View File

@ -200,8 +200,7 @@
" type VARCHAR(8) DEFAULT NULL," \
" bitrate INTEGER DEFAULT 0," \
" samplerate INTEGER DEFAULT 0," \
" channels INTEGER DEFAULT 0," \
" usermark INTEGER DEFAULT 0" \
" channels INTEGER DEFAULT 0" \
");"
#define Q_PL1 \

View File

@ -1163,15 +1163,12 @@ static const struct db_upgrade_query db_upgrade_v2106_queries[] =
/* ---------------------------- 21.06 -> 21.07 ------------------------------ */
#define U_v2107_ALTER_FILES_USERMARK \
"ALTER TABLE files ADD COLUMN usermark INTEGER DEFAULT 0;"
#define U_v2107_ALTER_QUEUE_USERMARK \
"ALTER TABLE queue ADD COLUMN usermark INTEGER DEFAULT 0;"
#define U_v2107_SCVER_MINOR \
"UPDATE admin SET value = '07' WHERE key = 'schema_version_minor';"
static const struct db_upgrade_query db_upgrade_v2107_queries[] =
{
{ U_v2107_ALTER_FILES_USERMARK, "update files adding usermark" },
{ U_v2107_ALTER_QUEUE_USERMARK, "update queue adding usermark" },
{ U_v2107_SCVER_MINOR, "set schema_version_minor to 07" },
};

View File

@ -2222,7 +2222,6 @@ queue_item_to_json(struct db_queue_item *queue_item, char shuffle)
json_object_object_add(item, "bitrate", json_object_new_int(queue_item->bitrate));
json_object_object_add(item, "samplerate", json_object_new_int(queue_item->samplerate));
json_object_object_add(item, "channels", json_object_new_int(queue_item->channels));
json_object_object_add(item, "usermark", json_object_new_int(queue_item->usermark));
return item;
}