[Bug]: /api/v1/play plays song even with dismissed queue #2825
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#2825
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Preflight Checklist
YouTube Music (Application) Version
3.7.1
Checklists
What operating system are you using?
Windows
Operating System Version
Windows 11 24H2
What CPU architecture are you using?
x64
Last Known Working YouTube Music (Application) version
No response
Reproduction steps
API server should be enabled
Expected Behavior
I think it should be unavailable to launch song since there's no songs in queue.
Actual Behavior
Sending request launches last played song after dismissing queue. It is showed by sending /api/v1/song
But at same moment queue is empty
Enabled plugins
Additional Information
I see 2 ways of fixing this - simple and kinda complicated.
Simple is one is just checking queue for items - if there is no
items[]
in queue, so return error on /api/v1/play that there is no songsOther way is checking if
videoId
in current song info (/api/v1/song
) is presented in queue, but I'm not sure about queue structure since it looks kinda spaghetti raw JSONWhen you dismiss the queue, YouTube Music (web) retains the current playing song and just resets the playback at
0s
, which is kinda weird personally.If we make a workaround just for the API server, the data from the API would differ from the source of truth (YouTube Music itself).