[db/jsonapi] New admin value for Last-Modified in JSON API header

This adds a new timestamp value "db_modified" into the admin db table.
In addition to the existing "db_update" admin value, this value is also
updated if rating, play-/skip-count or seek changes for a
media_info_file (files db table).

This should improve the caching behavior in clients of the JSON API
(especially the player web interface) in refreshing its data if some of
this values changes.
This commit is contained in:
chme
2019-01-30 08:36:34 +01:00
committed by ejurgensen
parent 694e1874ae
commit 0ded6d63bf
4 changed files with 42 additions and 22 deletions

View File

@@ -71,6 +71,7 @@ enum query_type {
#define DB_ADMIN_SCHEMA_VERSION "schema_version"
#define DB_ADMIN_QUEUE_VERSION "queue_version"
#define DB_ADMIN_DB_UPDATE "db_update"
#define DB_ADMIN_DB_MODIFIED "db_modified"
#define DB_ADMIN_START_TIME "start_time"
#define DB_ADMIN_LASTFM_SESSION_KEY "lastfm_sk"
#define DB_ADMIN_SPOTIFY_REFRESH_TOKEN "spotify_refresh_token"