Album
Album(subsonic, id, parent=None, album=None, title=None, name=None, isDir=None, artist=None, artistId=None, coverArt=None, songCount=None, duration=None, playCount=None, created=None, starred=None, year=None, genre=None, played=None, userRating=None, song=None, recordLabels=None, musicBrainzId=None, genres=None, artists=None, displayArtist=None, releaseTypes=None, moods=None, sortName=None, originalReleaseDate=None, releaseDate=None, isCompilation=None, discTitles=None, **kargs)
Bases: Model
Object that holds all the info of an album.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The ID of the album. |
parent |
str | None
|
The ID of the parent media of the album. |
name |
str | None
|
The name of the album. |
album |
str | None
|
The name of the album (Can differ the |
is_dir |
bool | None
|
If the album is a directory. |
title |
str | None
|
The name of the album (Can differ the |
artist |
Artist | None
|
The artist of the album. |
cover_art |
CoverArt
|
All the info about the cover art of the album. |
song_count |
int | None
|
The number of songs inside the album. |
duration |
int | None
|
The total duration of the album in seconds. |
play_count |
int | None
|
The times the album has been played. |
created |
datetime | None
|
The timestamp when the album was created. |
starred |
datetime | None
|
The timestamp when the album was starred if it is. |
year |
int | None
|
The year when the album was released. |
genre |
str | None
|
The genre of the album. |
played |
datetime | None
|
The timestamp when the album was played. |
user_rating |
int | None
|
The rating from 0 to 5 (inclusive) that the used has given to the album if it is rated. |
songs |
list[Song] | None
|
The list of songs that the album contains. |
info |
AlbumInfo | None
|
Extra info about the album. |
record_labels |
list[RecordLabel] | None
|
List of all the record labels that have licensed the album. |
music_brainz_id |
str | None
|
The ID of the MusicBrainz database entry of the album. |
genres |
list[ItemGenre] | None
|
List of all the genres that the album has. |
artists |
list[Artist] | None
|
List of all the artists involved with the album. |
display_artist |
str | None
|
String that condense all the artists involved with the album. |
release_types |
list[str] | None
|
The types of album that the album is. |
moods |
list[str] | None
|
List of all the moods that the album has. |
sort_name |
str | None
|
The name of the album used for sorting. |
original_release_date |
ReleaseDate | None
|
The original release date of the album. |
release_date |
ReleaseDate | None
|
The release date of the album. |
is_compilation |
bool | None
|
If the album is a compilation or not. |
discs |
list[Disc] | None
|
|
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
|
generate()
Return a new album 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 |
---|---|
Album
|
A new object with all the updated info. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
get_album_info()
Get all the extra info about the album, it's
set to the info
attribute of the object.
Returns:
Type | Description |
---|---|
AlbumInfo
|
The extra info returned by the server. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
AlbumInfo(subsonic, album_id, notes=None, musicBrainzId=None, lastFmUrl=None, smallImageUrl=None, mediumImageUrl=None, largeImageUrl=None, **kargs)
Bases: Model
Object that holds all the info about the extra info of an album.
Attributes:
Name | Type | Description |
---|---|---|
album_id |
str
|
The ID of the album where the extra info is from. |
notes |
str
|
Notes of the album. |
music_brainz_id |
str | None
|
The music brainz ID of the album. |
last_fm_url |
str | None
|
The last.fm URL of the album |
small_image_user |
str | None
|
The URL of the small sized image of the album. |
medium_image_user |
str | None
|
The URL of the medium sized image of the album. |
large_image_user |
str | None
|
The URL of the large sized image of the album. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
generate()
Return a new album info 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 |
---|---|
AlbumInfo
|
A new object with all the updated info. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
Disc(subsonic, disc, title)
Bases: Model
Object that holds all the info about a disc.
Attributes:
Name | Type | Description |
---|---|---|
disc_number |
int
|
The number of the disc. |
title |
str
|
The title of the disc. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
RecordLabel(subsonic, name)
Bases: Model
Object that holds all the info about a record label.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the record label. |
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_album.py
ReleaseDate(subsonic, year=None, month=None, day=None)
Bases: Model
Object that holds all the info about the release date of a media.
Attributes:
Name | Type | Description |
---|---|---|
year |
int
|
The year when it was released. |
month |
int
|
The month when it was released. |
day |
int
|
The day when it was released. |