owntone-server
owntone-server copied to clipboard
IOS remote: play next next fails after server restart
When the server is restarted (and in STOPPED
state),play next
on albums or playlists does not add to Q to play. add next
does adds items to the Q
Current master and log via -Ddacp,daac,db
[DEBUG] dacp: DACP request: '/ctrl-int/1/playqueue-edit?command=add&query='daap.songalbumid:1722214560191693504'&mode=3&session-id=2030899506'
[DEBUG] daap: Trying DAAP query -'daap.songalbumid:1722214560191693504'-
[DEBUG] daap: DAAP SQL query: -(f.songalbumid = 1722214560191693504)-
[DEBUG] db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND (f.songalbumid = 1722214560191693504);'
[DEBUG] db: Starting query 'SELECT f.* FROM files f WHERE f.disabled = 0 AND (f.songalbumid = 1722214560191693504) LIMIT 1;'
[DEBUG] dacp: Found index song (id 36)
[DEBUG] daap: Trying DAAP query -'daap.songalbumid:1722214560191693504'-
[DEBUG] daap: DAAP SQL query: -(f.songalbumid = 1722214560191693504)-
[DEBUG] db: Running query 'SELECT pos FROM queue WHERE id = 0;'
[ INFO] db: No matching row found for query: SELECT pos FROM queue WHERE id = 0;
[ LOG] dacp: Could not build song queue
It seems like this fix works in Dacp_queueitem_add
player_get_status(&status);
db_queue_get_count(&count); // this
if (mode == 3 && count > 0)
ret = db_queue_add_by_queryafteritemid(&qp, status.item_id);
else
ret = db_queue_add_by_query(&qp, status.shuffle, status.item_id, -1, NULL, NULL);
Fixed in https://github.com/ejurgensen/forked-daapd/pull/840