From e7c62086a22882d2749656306c8995163ea5a19e Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Sun, 26 Apr 2020 17:00:14 +0100 Subject: [PATCH] [db] add artwork_url to playlist_info --- src/db.c | 3 +++ src/db.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/db.c b/src/db.c index 973d197b..792502c7 100644 --- a/src/db.c +++ b/src/db.c @@ -240,6 +240,7 @@ static const struct col_type_map pli_cols_map[] = { "query_order", pli_offsetof(query_order), DB_TYPE_STRING, DB_FIXUP_NO_SANITIZE }, { "query_limit", pli_offsetof(query_limit), DB_TYPE_INT }, { "media_kind", pli_offsetof(media_kind), DB_TYPE_INT, DB_FIXUP_MEDIA_KIND }, + { "artwork_url", pli_offsetof(artwork_url), DB_TYPE_STRING, DB_FIXUP_NO_SANITIZE }, // Not in the database, but returned via the query's COUNT()/SUM() { "items", pli_offsetof(items), DB_TYPE_INT, DB_FIXUP_STANDARD, DB_FLAG_NO_BIND }, @@ -376,6 +377,7 @@ static const ssize_t dbpli_cols_map[] = dbpli_offsetof(query_order), dbpli_offsetof(query_limit), dbpli_offsetof(media_kind), + dbpli_offsetof(artwork_url), dbpli_offsetof(items), dbpli_offsetof(streams), @@ -673,6 +675,7 @@ free_pli(struct playlist_info *pli, int content_only) free(pli->path); free(pli->virtual_path); free(pli->query_order); + free(pli->artwork_url); if (!content_only) free(pli); diff --git a/src/db.h b/src/db.h index ddd7b895..ba6a77bc 100644 --- a/src/db.h +++ b/src/db.h @@ -254,6 +254,7 @@ struct playlist_info { char *query_order; /* order by clause, used by e.g. a smart playlists */ int32_t query_limit; /* limit, used by e.g. smart playlists */ uint32_t media_kind; + char *artwork_url; /* optional artwork */ uint32_t items; /* number of items (mimc) */ uint32_t streams; /* number of internet streams */ }; @@ -276,6 +277,7 @@ struct db_playlist_info { char *query_order; char *query_limit; char *media_kind; + char *artwork_url; char *items; char *streams; };