Skip to content

Lists

Lists(api, subsonic)

Class that contains all the methods needed to interact with the lists endpoints in the Subsonic API.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def __init__(self, api: Api, subsonic: "Subsonic") -> None:
    self.api = api

    # Only to pass it to the models
    self.subsonic = subsonic

get_album_list_alphabetical_by_artist(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized alphabetically by their artist name. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized alphabetically by their artist name.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_artist(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized alphabetically
    by their artist name. Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized alphabetically by their artist name.
    """

    return self._get_album_list_generic(
        "alphabeticalByArtist", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_alphabetical_by_artist_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized alphabetically by their artist name. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized alphabetically by their artist name.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_artist_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized alphabetically
    by their artist name. Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized alphabetically by their artist name.
    """

    return self._get_album_list_generic(
        "alphabeticalByArtist",
        num_of_albums,
        album_list_offset,
        music_folder_id,
        False,
    )

get_album_list_alphabetical_by_name(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized alphabetically by their names. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized alphabetically by their names.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_name(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized alphabetically
    by their names. Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized alphabetically by their names.
    """

    return self._get_album_list_generic(
        "alphabeticalByName", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_alphabetical_by_name_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized alphabetically by their names. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized alphabetically by their names.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_alphabetical_by_name_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized alphabetically
    by their names. Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized alphabetically by their names.
    """

    return self._get_album_list_generic(
        "alphabeticalByName",
        num_of_albums,
        album_list_offset,
        music_folder_id,
        False,
    )

get_album_list_by_genre(genre_name, num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get all the albums that are tagged with the given genre. Not organized according ID3 tags.

Parameters:

Name Type Description Default
genre_name str

The name of the genre that all the albums must be tagged with.

required
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums that are tagged with the given album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_genre(
    self,
    genre_name: str,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get all the albums that are tagged with the given genre. Not organized
    according ID3 tags.

    Args:
        genre_name: The name of the genre that all the albums must be tagged
            with.
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            that are tagged with the given album.
    """

    return self._get_album_list_generic(
        "byGenre",
        num_of_albums,
        album_list_offset,
        music_folder_id,
        genre=genre_name,
    )

get_album_list_by_genre_non_id3(genre_name, num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get all the albums that are tagged with the given genre. Not organized according ID3 tags.

Parameters:

Name Type Description Default
genre_name str

The name of the genre that all the albums must be tagged with.

required
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums that are tagged with the given album.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_genre_non_id3(
    self,
    genre_name: str,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get all the albums that are tagged with the given genre.
    Not organized according ID3 tags.

    Args:
        genre_name: The name of the genre that all the albums
            must be tagged with.
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            that are tagged with the given album.
    """

    return self._get_album_list_generic(
        "byGenre",
        num_of_albums,
        album_list_offset,
        music_folder_id,
        False,
        genre=genre_name,
    )

get_album_list_by_year(from_year, to_year, num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get all the album registered by the server that were created between the given year range.

Parameters:

Name Type Description Default
from_year int

The minimum year of the range where the albums were created.

required
to_year int

The maximum year of the range where the albums were created.

required
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums that where released in the given year range.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_year(
    self,
    from_year: int,
    to_year: int,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get all the album registered by the server that were created between
    the given year range.

    Args:
        from_year: The minimum year of the range where the albums
            were created.
        to_year: The maximum year of the range where the albums
            were created.
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            that where released in the given year range.
    """

    return self._get_album_list_generic(
        "byYear",
        num_of_albums,
        album_list_offset,
        music_folder_id,
        fromYear=from_year,
        toYear=to_year,
    )

get_album_list_by_year_non_id3(from_year, to_year, num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get all the album registered by the server that were created between the given year range.

Parameters:

Name Type Description Default
from_year int

The minimum year of the range where the albums were created.

required
to_year int

The maximum year of the range where the albums were created.

required
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums that where released in the given year range.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_by_year_non_id3(
    self,
    from_year: int,
    to_year: int,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get all the album registered by the server that were created between
    the given year range.

    Args:
        from_year: The minimum year of the range where the albums
            were created.
        to_year: The maximum year of the range where the albums
            were created.
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            that where released in the given year range.
    """

    return self._get_album_list_generic(
        "byYear",
        num_of_albums,
        album_list_offset,
        music_folder_id,
        False,
        fromYear=from_year,
        toYear=to_year,
    )

get_album_list_frequent(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the most frequent listened to the least. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from the most frequent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_frequent(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the most frequent listened to the least.
    Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from the most frequent listened to the least.
    """

    return self._get_album_list_generic(
        "frequent", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_frequent_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the most frequent listened to the least. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from the most frequent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_frequent_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the most frequent listened to the least.
    Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from the most frequent listened to the least.
    """

    return self._get_album_list_generic(
        "frequent", num_of_albums, album_list_offset, music_folder_id, False
    )

get_album_list_highest(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the highest rated to the lowest ones. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

The number of albums to be in the list.

None
album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from the highest rated to the lowest ones.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_highest(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the highest rated to the lowest ones. Not organized according ID3 tags.

    Args:
        num_of_albums: The number of albums to be in the list.
        album_list_offset: The number of album to offset in the list,
            useful for pagination.
        music_folder_id: The ID of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from the highest rated to the lowest ones.
    """

    return self._get_album_list_generic(
        "highest", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_highest_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the highest rated to the lowest ones. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

The number of albums to be in the list.

None
album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from the highest rated to the lowest ones.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_highest_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the highest rated to the lowest ones. Not organized according ID3 tags.

    Args:
        num_of_albums: The number of albums to be in the list.
        album_list_offset: The number of album to offset in the list,
            useful for pagination.
        music_folder_id: The ID of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from the highest rated to the lowest ones.
    """

    return self._get_album_list_generic(
        "highest", num_of_albums, album_list_offset, music_folder_id, False
    )

get_album_list_newest(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the newest added to the oldest. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

The number of albums to be in the list.

None
album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from newest to oldest.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_newest(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the newest added to the oldest. Not organized according ID3 tags.

    Args:
        num_of_albums: The number of albums to be in the list.
        album_list_offset: The number of album to offset in the list,
            useful for pagination.
        music_folder_id: The ID of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from newest to oldest.
    """

    return self._get_album_list_generic(
        "newest", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_newest_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the newest added to the oldest. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

The number of albums to be in the list.

None
album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from newest to oldest.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_newest_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the newest added to the oldest. Not organized according ID3 tags.

    Args:
        num_of_albums: The number of albums to be in the list.
        album_list_offset: The number of album to offset in the list,
            useful for pagination.
        music_folder_id: The ID of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from newest to oldest.
    """

    return self._get_album_list_generic(
        "newest", num_of_albums, album_list_offset, music_folder_id, False
    )

get_album_list_random(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a random list of albums from the server.

Parameters:

Name Type Description Default
num_of_albums int | None

The number of albums to be in the list.

None
album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about random albums.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_random(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a random list of albums from the server.

    Args:
        num_of_albums: The number of albums to be in the list.
        album_list_offset: The number of album to offset in the list,
            useful for pagination.
        music_folder_id: The ID of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about random albums.
    """

    return self._get_album_list_generic(
        "random", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_random_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a random list of albums from the server. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

The number of albums to be in the list.

None
album_list_offset int | None

The number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

The ID of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about random albums.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_random_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a random list of albums from the server. Not organized
    according ID3 tags.

    Args:
        num_of_albums: The number of albums to be in the list.
        album_list_offset: The number of album to offset in the list,
            useful for pagination.
        music_folder_id: The ID of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about random albums.
    """

    return self._get_album_list_generic(
        "random", num_of_albums, album_list_offset, music_folder_id, False
    )

get_album_list_recent(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the most recent listened to the least. not organized according id3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from the most recent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_recent(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the most recent listened to the least.
    not organized according id3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from the most recent listened to the least.
    """

    return self._get_album_list_generic(
        "recent", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_recent_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of albums from the server organized from the most recent listened to the least. not organized according id3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums organized from the most recent listened to the least.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_recent_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of albums from the server organized from
    the most recent listened to the least.
    not organized according id3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            organized from the most recent listened to the least.
    """

    return self._get_album_list_generic(
        "recent", num_of_albums, album_list_offset, music_folder_id, False
    )

get_album_list_starred(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of the albums that have been starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums starred by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_starred(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of the albums that have been starred by
    the authenticated user. Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            starred by the user.
    """

    return self._get_album_list_generic(
        "starred", num_of_albums, album_list_offset, music_folder_id
    )

get_album_list_starred_non_id3(num_of_albums=None, album_list_offset=None, music_folder_id=None)

Get a list of the albums that have been starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default
num_of_albums int | None

the number of albums to be in the list.

None
album_list_offset int | None

the number of album to offset in the list, useful for pagination.

None
music_folder_id str | None

the id of a music folder to list where the album are from.

None

Returns:

Type Description
list[Album]

A list that contains the info about the albums starred by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_album_list_starred_non_id3(
    self,
    num_of_albums: int | None = None,
    album_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Album]:
    """Get a list of the albums that have been starred by
    the authenticated user. Not organized according ID3 tags.

    args:
        num_of_albums: the number of albums to be in the list.
        album_list_offset: the number of album to offset in the list,
            useful for pagination.
        music_folder_id: the id of a music folder to list where the album
            are from.

    Returns:
        A list that contains the info about the albums
            starred by the user.
    """

    return self._get_album_list_generic(
        "starred", num_of_albums, album_list_offset, music_folder_id, False
    )

get_now_playing()

Get the songs that are currently playing by all the users.

Returns:

Type Description
list[NowPlayingEntry]

A list that holds all the info about all the song that are current playing by all the users.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_now_playing(self) -> list[NowPlayingEntry]:
    """Get the songs that are currently playing by all the users.

    Returns:
        A list that holds all the info about all the
            song that are current playing by all the users.
    """

    response = self.api.json_request("getNowPlaying")["nowPlaying"]["entry"]

    return [NowPlayingEntry(subsonic=self.subsonic, **entry) for entry in response]

get_random_songs(num_of_songs=None, genre_name=None, from_year=None, to_year=None, music_folder_id=None)

Get random songs registered in the server.

Parameters:

Name Type Description Default
num_of_songs int | None

The number of songs to return.

None
genre_name str | None

The genre that the songs must have it tagged on them.

None
from_year int | None

The minimum year where the songs were released.

None
to_year int | None

The maximum year where the songs were released.

None
music_folder_id str | None

An ID of a music folder to limit where the songs should be from.

None

Returns:

Type Description
list[Song]

A list that contains all the info about that were randomly selected by the server.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_random_songs(
    self,
    num_of_songs: int | None = None,
    genre_name: str | None = None,
    from_year: int | None = None,
    to_year: int | None = None,
    music_folder_id: str | None = None,
) -> list[Song]:
    """Get random songs registered in the server.

    Args:
        num_of_songs: The number of songs to return.
        genre_name: The genre that the songs must
            have it tagged on them.
        from_year: The minimum year where the songs
            were released.
        to_year: The maximum year where the songs
            were released.
        music_folder_id: An ID of a music folder
            to limit where the songs should be from.

    Returns:
        A list that contains all the info about
            that were randomly selected by the server.
    """

    response = self.api.json_request(
        "getRandomSongs",
        {
            "size": num_of_songs,
            "genre": genre_name,
            "fromYear": from_year,
            "toYear": to_year,
            "musicFolderId": music_folder_id,
        },
    )["randomSongs"]["song"]

    return [Song(subsonic=self.subsonic, **song) for song in response]

get_songs_by_genre(genre_name, num_of_songs=None, song_list_offset=None, music_folder_id=None)

Get all the songs tagged with the given genre.

Parameters:

Name Type Description Default
genre_name str

The name of the genre that all the songs must be tagged with.

required
num_of_songs int | None

The number of songs that the list should have.

None
song_list_offset int | None

the number of songs to offset in the list, useful for pagination.

None
music_folder_id str | None

An ID of a music folder where all the songs should be from.

None

Returns:

Type Description
list[Song]

A list that contains all the info about that are tagged with the given genre.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_songs_by_genre(
    self,
    genre_name: str,
    num_of_songs: int | None = None,
    song_list_offset: int | None = None,
    music_folder_id: str | None = None,
) -> list[Song]:
    """Get all the songs tagged with the given genre.

    Args:
        genre_name: The name of the genre that all the songs
            must be tagged with.
        num_of_songs: The number of songs that the list
            should have.
        song_list_offset: the number of songs to offset in the list,
            useful for pagination.
        music_folder_id: An ID of a music folder where all the songs
            should be from.

    Returns:
        A list that contains all the info about
            that are tagged with the given genre.
    """

    response = self.api.json_request(
        "getSongsByGenre",
        {
            "genre": genre_name,
            "count": num_of_songs,
            "offset": song_list_offset,
            "musicFolderId": music_folder_id,
        },
    )["songsByGenre"]["song"]

    return [Song(subsonic=self.subsonic, **song) for song in response]

get_starred(music_folder_id=None)

Get all the songs, albums and artists starred by the authenticated user.

Parameters:

Name Type Description Default
music_folder_id str | None

An ID of a music folder where all the songs albums, and artists should be from.

None

Returns:

Type Description
StarredContent

An object that holds all the info about all the starred songs, albums and artists by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_starred(self, music_folder_id: str | None = None) -> StarredContent:
    """Get all the songs, albums and artists starred by the authenticated
    user.

    Args:
        music_folder_id: An ID of a music folder where all the songs
            albums, and artists should be from.

    Returns:
        An object that holds all the info about all the starred
            songs, albums and artists by the user.
    """

    response = self.api.json_request(
        "getStarred2", {"musicFolderId": music_folder_id}
    )["starred2"]

    return StarredContent(subsonic=self.subsonic, **response)

get_starred_non_id3(music_folder_id=None)

Get all the songs, albums and artists starred by the authenticated user. Not organized according ID3 tags.

Parameters:

Name Type Description Default
music_folder_id str | None

An ID of a music folder where all the songs albums, and artists should be from.

None

Returns:

Type Description
StarredContent

An object that holds all the info about all the starred songs, albums and artists by the user.

Source code in .venv/lib/python3.11/site-packages/knuckles/_lists.py
def get_starred_non_id3(self, music_folder_id: str | None = None) -> StarredContent:
    """Get all the songs, albums and artists starred by the authenticated
    user. Not organized according ID3 tags.

    Args:
        music_folder_id: An ID of a music folder where all the songs
            albums, and artists should be from.

    Returns:
        An object that holds all the info about all the starred
            songs, albums and artists by the user.
    """

    response = self.api.json_request(
        "getStarred", {"musicFolderId": music_folder_id}
    )["starred"]

    return StarredContent(subsonic=self.subsonic, **response)