Skip to content

Starred Content

StarredContent(subsonic, song=None, album=None, artist=None)

Bases: Model

Object that holds all the info about starred content.

Attributes:

Name Type Description
songs list[Song] | None

List that holds all the info about all the starred songs.

albums list[Album] | None

List that holds all the info about all the starred albums.

artists list[Artist] | None

List that holds all the info about all the starred artists.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_starred_content.py
def __init__(
    self,
    subsonic: "Subsonic",
    song: list[dict[str, Any]] | None = None,
    album: list[dict[str, Any]] | None = None,
    artist: list[dict[str, Any]] | None = None,
) -> None:
    super().__init__(subsonic)

    self.songs = (
        [Song(subsonic=self._subsonic, **song) for song in song] if song else None
    )
    self.albums = (
        [Album(subsonic=self._subsonic, **album) for album in album]
        if album
        else None
    )
    self.artists = (
        [Artist(subsonic=self._subsonic, **artist) for artist in artist]
        if artist
        else None
    )