Genre
Genre(subsonic, value, songCount=None, albumCount=None)
Bases: Model
Object that holds all the info about a genre.
Attributes:
Name | Type | Description |
---|---|---|
value |
str
|
The name of the genre. |
song_count |
int | None
|
Number of songs tagged with the genre. |
album_count |
int | None
|
Number of albums tagged with the genre. |
:param subsonic: The subsonic object to make all the internal requests with it. :type subsonic: Subsonic :param value: The name of the genre. :type value: str :param songCount: The number of songs with this genre, defaults to None. :type songCount: int | None, optional :param albumCount: The number of albums with this genre, defaults to None. :type albumCount: int | None, optional
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
generate()
Return a new genre 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().
:return: A new genre object with all the data updated. :rtype: Genre
Source code in .venv/lib/python3.11/site-packages/knuckles/models/_genre.py
ItemGenre(subsonic, name)
Bases: Model
Object that holds all the info about a item genre.
Attributes:
Name | Type | Description |
---|---|---|
name |
The name of the genre. |