2022-05-11 01:53:12 +05:30
|
|
|
from typing import TypedDict
|
|
|
|
|
|
|
|
class Logging(TypedDict):
|
|
|
|
debug: bool
|
2022-05-22 10:07:09 +05:30
|
|
|
writeToFile: bool
|
2022-05-11 01:53:12 +05:30
|
|
|
|
2022-05-12 12:44:23 +05:30
|
|
|
class Posters(TypedDict):
|
|
|
|
enabled: bool
|
|
|
|
imgurClientID: str
|
2024-02-10 12:42:58 +05:30
|
|
|
maxSize: int
|
2022-05-12 12:44:23 +05:30
|
|
|
|
2022-08-26 02:07:50 +05:30
|
|
|
class Button(TypedDict):
|
|
|
|
label: str
|
|
|
|
url: str
|
2024-02-11 01:50:56 +05:30
|
|
|
mediaTypes: list[str]
|
2022-08-26 02:07:50 +05:30
|
|
|
|
2022-05-11 01:53:12 +05:30
|
|
|
class Display(TypedDict):
|
2024-08-31 01:40:46 +05:30
|
|
|
duration: bool
|
|
|
|
genres: bool
|
|
|
|
album: bool
|
|
|
|
year: bool
|
2024-08-31 16:18:44 +05:30
|
|
|
statusIcon: bool
|
2024-08-31 01:40:46 +05:30
|
|
|
remainingTime: bool
|
|
|
|
paused: bool
|
2022-05-12 12:44:23 +05:30
|
|
|
posters: Posters
|
2022-08-26 02:07:50 +05:30
|
|
|
buttons: list[Button]
|
2022-05-11 01:53:12 +05:30
|
|
|
|
2022-05-11 05:33:51 +05:30
|
|
|
class Server(TypedDict, total = False):
|
2022-05-11 01:53:12 +05:30
|
|
|
name: str
|
2022-05-11 07:20:06 +05:30
|
|
|
listenForUser: str
|
2022-05-11 01:53:12 +05:30
|
|
|
blacklistedLibraries: list[str]
|
|
|
|
whitelistedLibraries: list[str]
|
2023-11-05 15:54:36 +05:30
|
|
|
ipcPipeNumber: int
|
2022-05-11 01:53:12 +05:30
|
|
|
|
|
|
|
class User(TypedDict):
|
|
|
|
token: str
|
|
|
|
servers: list[Server]
|
|
|
|
|
|
|
|
class Config(TypedDict):
|
|
|
|
logging: Logging
|
|
|
|
display: Display
|
|
|
|
users: list[User]
|