mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-28 05:04:16 -05:00
Refactor adding non library items to the queue
Instead of asking a client to first scan the path into a media_file_info object and afterwards add it to the queue, we now offer a library function to directly add a path. The library-source that can handle the given path translates the path into new queue item(s) and adds them to the queue.
This commit is contained in:
17
src/db.h
17
src/db.h
@@ -454,6 +454,12 @@ struct db_queue_item
|
||||
uint32_t queue_version;
|
||||
};
|
||||
|
||||
struct db_queue_add_info
|
||||
{
|
||||
int queue_version;
|
||||
int pos;
|
||||
};
|
||||
|
||||
char *
|
||||
db_escape_string(const char *str); // TODO Remove this, use db_mprintf instead
|
||||
|
||||
@@ -484,6 +490,9 @@ free_queue_item(struct db_queue_item *queue_item, int content_only);
|
||||
void
|
||||
unicode_fixup_mfi(struct media_file_info *mfi);
|
||||
|
||||
void
|
||||
fixup_tags_mfi(struct media_file_info *mfi);
|
||||
|
||||
/* Maintenance and DB hygiene */
|
||||
void
|
||||
db_hook_post_scan(void);
|
||||
@@ -764,7 +773,13 @@ int
|
||||
db_queue_add_by_fileid(int id, char reshuffle, uint32_t item_id);
|
||||
|
||||
int
|
||||
db_queue_add_item(struct db_queue_item *queue_item, char reshuffle, uint32_t item_id);
|
||||
db_queue_add_start(struct db_queue_add_info *queue_add_info);
|
||||
|
||||
void
|
||||
db_queue_add_end(struct db_queue_add_info *queue_add_info, int ret);
|
||||
|
||||
int
|
||||
db_queue_add_item(struct db_queue_add_info *queue_add_info, struct db_queue_item *item);
|
||||
|
||||
int
|
||||
db_queue_enum_start(struct query_params *qp);
|
||||
|
||||
Reference in New Issue
Block a user