mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-23 12:43:18 -05:00
[db] add artwork_url to playlist_info
This commit is contained in:
parent
9a0c7e9ad2
commit
e7c62086a2
3
src/db.c
3
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);
|
||||
|
2
src/db.h
2
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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user