Skip to content

System

License(subsonic, valid, email=None, licenseExpires=None, trialExpires=None)

Bases: Model

Object that holds all the info about the license status of the server.

Attributes:

Name Type Description
valid bool

If the license of the server is valid.

email str | None

The email of the authenticated user.

license_expires datetime | None

The timestamp when the license expires.

trial_expires datetime | None

The timestamp when the trial expires if it has not already.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_system.py
def __init__(
    self,
    subsonic: "Subsonic",
    valid: bool,
    email: str | None = None,
    licenseExpires: str | None = None,
    trialExpires: str | None = None,
) -> None:
    super().__init__(subsonic)

    self.valid: bool = valid
    self.email: str | None = email

    self.license_expires: datetime | None
    if licenseExpires is not None:
        self.license_expires = parser.parse(licenseExpires)
    else:
        self.license_expires = None

    self.trial_expires: datetime | None
    if trialExpires is not None:
        self.trial_expires = parser.parse(trialExpires)
    else:
        self.trial_expires = None

SubsonicResponse(subsonic, status, version, type=None, serverVersion=None, openSubsonic=None, **kwargs)

Bases: Model

Object that holds all the generic info about a response in a OpenSubsonic REST API call.

Attributes:

Name Type Description
status str

The status of the response, can be "ok" or "failed".

version str

The server supported version of the OpenSubonic REST API.

type str | None

The name of the server reported by itself.

server_version str | None

The server actual version.

open_subsonic bool | None

If the server supports OpenSubsonic REST API extensions.

Source code in .venv/lib/python3.11/site-packages/knuckles/models/_system.py
def __init__(
    self,
    subsonic: "Subsonic",
    status: str,
    version: str,
    type: str | None = None,
    serverVersion: str | None = None,
    openSubsonic: bool | None = None,
    **kwargs,
) -> None:
    super().__init__(subsonic)

    self.status = status
    self.version = version
    self.type = type
    self.server_version = serverVersion
    self.open_subsonic = openSubsonic