mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-23 02:57:45 -05:00
[library] Some refactoring of the library module
Misc refactoring, e.g. alignment of how modules save tracks and playlists, incl use of mfi and pli. Also try to avoid direct calls between library and player.
This commit is contained in:
@@ -2182,6 +2182,7 @@ queue_tracks_add_playlist(const char *id, int pos)
|
||||
static int
|
||||
queue_tracks_add_byuris(const char *param, int pos, int *total_count)
|
||||
{
|
||||
struct player_status status;
|
||||
char *uris;
|
||||
char *uri;
|
||||
char *ptr;
|
||||
@@ -2227,7 +2228,9 @@ queue_tracks_add_byuris(const char *param, int pos, int *total_count)
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = library_queue_add(uri, pos, &count, NULL);
|
||||
player_get_status(&status);
|
||||
|
||||
ret = library_queue_item_add(uri, pos, status.shuffle, status.item_id, &count, NULL);
|
||||
if (ret != LIBRARY_OK)
|
||||
{
|
||||
DPRINTF(E_LOG, L_WEB, "Invalid uri '%s'\n", uri);
|
||||
|
||||
Reference in New Issue
Block a user