2022-05-10 20:23:12 +00:00
|
|
|
from typing import TypedDict
|
|
|
|
|
|
|
|
class Logging(TypedDict):
|
|
|
|
debug: bool
|
2022-05-22 04:37:09 +00:00
|
|
|
writeToFile: bool
|
2022-05-10 20:23:12 +00:00
|
|
|
|
2022-05-12 07:14:23 +00:00
|
|
|
class Posters(TypedDict):
|
|
|
|
enabled: bool
|
|
|
|
imgurClientID: str
|
2024-02-10 07:12:58 +00:00
|
|
|
maxSize: int
|
2022-05-12 07:14:23 +00:00
|
|
|
|
2022-08-25 20:37:50 +00:00
|
|
|
class Button(TypedDict):
|
|
|
|
label: str
|
|
|
|
url: str
|
2024-02-10 20:20:56 +00:00
|
|
|
mediaTypes: list[str]
|
2022-08-25 20:37:50 +00:00
|
|
|
|
2022-05-10 20:23:12 +00:00
|
|
|
class Display(TypedDict):
|
2024-08-30 20:10:46 +00:00
|
|
|
duration: bool
|
|
|
|
genres: bool
|
|
|
|
album: bool
|
2024-10-17 18:19:30 +00:00
|
|
|
albumImage: bool
|
|
|
|
artist: bool
|
|
|
|
artistImage: bool
|
2024-08-30 20:10:46 +00:00
|
|
|
year: bool
|
2024-08-31 10:48:44 +00:00
|
|
|
statusIcon: bool
|
2024-09-23 11:53:02 +00:00
|
|
|
progressMode: str
|
2024-08-30 20:10:46 +00:00
|
|
|
paused: bool
|
2022-05-12 07:14:23 +00:00
|
|
|
posters: Posters
|
2022-08-25 20:37:50 +00:00
|
|
|
buttons: list[Button]
|
2022-05-10 20:23:12 +00:00
|
|
|
|
2022-05-11 00:03:51 +00:00
|
|
|
class Server(TypedDict, total = False):
|
2022-05-10 20:23:12 +00:00
|
|
|
name: str
|
2022-05-11 01:50:06 +00:00
|
|
|
listenForUser: str
|
2022-05-10 20:23:12 +00:00
|
|
|
blacklistedLibraries: list[str]
|
|
|
|
whitelistedLibraries: list[str]
|
2023-11-05 10:24:36 +00:00
|
|
|
ipcPipeNumber: int
|
2022-05-10 20:23:12 +00:00
|
|
|
|
|
|
|
class User(TypedDict):
|
|
|
|
token: str
|
|
|
|
servers: list[Server]
|
|
|
|
|
|
|
|
class Config(TypedDict):
|
|
|
|
logging: Logging
|
|
|
|
display: Display
|
|
|
|
users: list[User]
|