Expand MusicBrainz support to be much more comprehensive

This commit is contained in:
Danielle McLean 2024-07-11 12:12:56 +10:00
parent 60116fd616
commit 09fe3b3e6c
Signed by: 00dani
GPG key ID: 6854781A0488421C
8 changed files with 188 additions and 72 deletions

View file

@ -0,0 +1,32 @@
from dataclasses import dataclass
from enum import StrEnum
from pathlib import Path
from .artwork import Artwork
from .musicbrainz import MusicBrainzIds
class PlaybackState(StrEnum):
play = "play"
pause = "pause"
stop = "stop"
@dataclass(slots=True)
class Song:
state: PlaybackState
queue_index: int
queue_length: int
file: Path
title: str | None
artist: list[str]
composer: list[str]
album: list[str]
album_artist: list[str]
track: int | None
disc: int | None
genre: list[str]
duration: float
elapsed: float
art: Artwork
musicbrainz: MusicBrainzIds