mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-25 12:06:12 -05:00
Change db_pl_add/db_pl_update so input is playlist struct
- so they work like db_file_add/update and can accept all the struct data (incl. parent_id)
This commit is contained in:
10
src/db.h
10
src/db.h
@@ -165,7 +165,7 @@ struct media_file_info {
|
||||
#define mfi_offsetof(field) offsetof(struct media_file_info, field)
|
||||
|
||||
enum pl_type {
|
||||
PL_PLAIN,
|
||||
PL_PLAIN = 0,
|
||||
PL_SMART,
|
||||
PL_MAX
|
||||
};
|
||||
@@ -181,8 +181,8 @@ struct playlist_info {
|
||||
char *path; /* path of underlying playlist */
|
||||
uint32_t index; /* index of playlist for paths with multiple playlists */
|
||||
uint32_t special_id; /* iTunes identifies certain 'special' playlists with special meaning */
|
||||
char *virtual_path; /* virtual path of underlying playlist */
|
||||
uint32_t parent_id; /* Id of parent playlist if the playlist is nested */
|
||||
char *virtual_path; /* virtual path of underlying playlist */
|
||||
};
|
||||
|
||||
#define pli_offsetof(field) offsetof(struct playlist_info, field)
|
||||
@@ -198,8 +198,8 @@ struct db_playlist_info {
|
||||
char *path;
|
||||
char *index;
|
||||
char *special_id;
|
||||
char *virtual_path;
|
||||
char *parent_id;
|
||||
char *virtual_path;
|
||||
};
|
||||
|
||||
#define dbpli_offsetof(field) offsetof(struct db_playlist_info, field)
|
||||
@@ -463,7 +463,7 @@ struct playlist_info *
|
||||
db_pl_fetch_bytitlepath(char *title, char *path);
|
||||
|
||||
int
|
||||
db_pl_add(char *title, char *path, char *virtual_path, int *id);
|
||||
db_pl_add(struct playlist_info *pli, int *id);
|
||||
|
||||
int
|
||||
db_pl_add_item_bypath(int plid, char *path);
|
||||
@@ -475,7 +475,7 @@ void
|
||||
db_pl_clear_items(int id);
|
||||
|
||||
int
|
||||
db_pl_update(char *title, char *path, char *virtual_path, int id);
|
||||
db_pl_update(struct playlist_info *pli);
|
||||
|
||||
void
|
||||
db_pl_delete(int id);
|
||||
|
||||
Reference in New Issue
Block a user