Artist
Artist(subsonic, id, name=None, coverArt=None, albumCount=None, artistImageUrl=None, starred=None, userRating=None, averageRating=None, album=None, musicBrainzId=None, sortName=None, roles=None)
Bases: Model
Object that holds all the info of an artist.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The ID of the artist. |
name |
str | None
|
The name of the artist. |
cover_art |
CoverArt | None
|
The cover art associated with the artist. |
artist_image_url |
str | None
|
The URL of the image of the artist. |
album_count |
int | None
|
The number of albums created by the artist. |
starred |
datetime | None
|
The timestamp when the artist was starred if it is. |
user_rating |
int | None
|
The rating from 0 to 5 (inclusive) that the used has given to the artist if it is rated. |
average_rating |
float | None
|
The average rating given by all the users. |
albums |
list[Album] | None
|
A list that holds all the info about all the albums created by the artist. |
info |
ArtistInfo | None
|
All the extra info about the artist. |
music_brainz_id |
str | None
|
The ID of the MusicBrainz database entry of the artist. |
sort_name |
str | None
|
The sort name of the artist. |
roles |
list[str] | None
|
List with all the roles the artist has been in. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
generate()
Return a new artist info 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 |
---|---|
Artist
|
A new object with the updated model. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
get_artist_info()
Get all the extra info about the artist, it's
set to the info
attribute of the object.
Returns:
Type | Description |
---|---|
ArtistInfo
|
The extra info returned by the server. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
ArtistInfo(subsonic, artist_id, biography, musicBrainzId, lastFmUrl, smallImageUrl, mediumImageUrl, largeImageUrl, similarArtist=None, **kwargs)
Bases: Model
Object that holds all the extra info of an artist.
Attributes:
Name | Type | Description |
---|---|---|
artist_id |
str
|
The ID of the artist. |
biography |
str
|
The biography of an artist. |
music_brainz_id |
str | None
|
The ID of the MusicBrainz database entry of the artist. |
last_fm_url |
str | None
|
The last.fm URL of the artist. |
small_image_url |
str | None
|
The URL of the small sized image of the artist. |
medium_image_url |
str | None
|
The URL of the medium sized image of the artist. |
large_image_url |
str | None
|
The URL of the large sized image of the artist. |
similar_artists |
list[Artist] | None
|
A list that contains the all the info about similar artists. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_artist.py
generate()
Return a new artist info 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 |
---|---|
ArtistInfo
|
A new object with the updated model. |