Jukebox
JukeboxControl(api, subsonic)
Class that contains all the methods needed to interact with the jukebox control endpoint in the Subsonic API.
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
add(songs_ids)
Add songs to the jukebox playlist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
songs_ids |
list[str]
|
A list of song IDs to add to the jukebox playlist. |
required |
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
clear()
Clear the playlist of the jukebox.
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
get()
Get all the info related with the current playlist of the jukebox.
Returns:
Type | Description |
---|---|
Jukebox
|
An object that holds all the info related with the playlist of the jukebox. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
remove(index)
Remove a song from the playlist of the jukebox.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index |
int
|
The index of the song to remove from the playlist. |
required |
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
set(songs_ids)
Set the song playlist for the jukebox.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
songs_ids |
list[str]
|
A list of song IDs to set the jukebox playlist. |
required |
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
set_gain(gain)
Set the gain of the playback of the jukebox.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gain |
float
|
A number between 0 and 1 (inclusive) to be set as the gain. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Raised if the given gain is not between 0 and 1. |
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
shuffle()
Shuffle all the songs in the playlist of the jukebox.
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
skip(index, offset=0)
Skip the playback of the current song in the jukebox playlist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index |
int
|
The index of the song to skip to. |
required |
offset |
float
|
The offset of seconds to start playing the next song. |
0
|
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
start()
Start the playback of the current song in the jukebox playlist.
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
status()
Get all the info related with the current state of the jukebox.
Returns:
Type | Description |
---|---|
Jukebox
|
An object that holds all the info related with the scate of the jukebox. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_jukebox.py
stop()
Stop the playback of the current song in the jukebox playlist.
Returns:
Type | Description |
---|---|
Jukebox
|
An object that contains the updated jukebox status and playlist. |