Play Queue
PlayQueue(subsonic, entry, current=None, position=None, username=None, changed=None, changedBy=None)
Bases: Model
Object that holds al the info about a play queue.
Attributes:
Name | Type | Description |
---|---|---|
songs |
list[Song]
|
All the info about all the songs in the play queue. |
current |
Song | None
|
The current playing song in the play queue. |
position |
int | None
|
The index of the current playing song in the play queue. |
user |
User | None
|
The user owner of the play queue. |
changed |
timedate | None
|
The timestamp when the play queue received any change. |
changed_by |
str | None
|
The name of the client that made the last modification to the play queue. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
generate()
Return a new play queue object with all the data updated from the API, using the endpoint that return the most information possible.
Useful for making copies with updated data or updating the object
itself with immutability, e.g., foo = foo.generate()
.
Returns:
Type | Description |
---|---|
PlayQueue
|
A new object with all the updated info. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_play_queue.py
save()
Calls the "savePlayQueue" endpoint of the API.
Saves the play queue using the parameters in the object.
:return: description :rtype: Self