Media Annotation
MediaAnnotation(api, subsonic)
Class that contains all the methods needed to interact with the media annotations endpoints in the Subsonic API.
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
remove_rating(song_id)
Remove the rating entry of a song.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_id |
str
|
The ID of the song which entry should be removed. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
scrobble(song_id, time, submission=True)
Scrobble (register) that some song have been locally played or is being played.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_id |
list[str]
|
The ID of the song to scrobble. |
required |
time |
list[datetime]
|
How many times in second the song has been listened. |
required |
submission |
bool
|
If true it will be registered that the song was played, if false the song will be scrobble as now playing. |
True
|
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
set_rating(song_id, rating)
The the rating of a song.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_id |
str
|
The ID of the song to set its rating. |
required |
rating |
int
|
The rating between 1 and 5 (inclusive) to set the rating of the song to. |
required |
Raises:
Type | Description |
---|---|
InvalidRatingNumber
|
Raised when a number that is not
between 1 and 5 (inclusive) has been pass in into
the |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
star_album(album_id)
Star an album from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
album_id |
str
|
The ID of the album to star. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
star_artist(artist_id)
Star an artist from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
artist_id |
str
|
The ID of the artist to star. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
star_song(song_id)
Star a song from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_id |
str
|
The ID of the song to star. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
unstar_album(album_id)
Unstar an album from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
album_id |
str
|
The ID of the album to unstar. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
unstar_artist(artist_id)
Unstar an artist from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
artist_id |
str
|
The ID of the artist to unstar. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |
Source code in .venv/lib/python3.11/site-packages/knuckles/_media_annotation.py
unstar_song(song_id)
Unstar a song from the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
song_id |
str
|
The ID of the song to unstar. |
required |
Returns:
Type | Description |
---|---|
Subsonic
|
The Subsonic object where this method was called to allow method chaining. |