Expand MusicBrainz support to be much more comprehensive
This commit is contained in:
parent
60116fd616
commit
09fe3b3e6c
8 changed files with 188 additions and 72 deletions
32
src/mpd_now_playable/song/song.py
Normal file
32
src/mpd_now_playable/song/song.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue