diff --git a/app/library/common.py b/app/library/common.py deleted file mode 100644 index a8736f04..00000000 --- a/app/library/common.py +++ /dev/null @@ -1,40 +0,0 @@ -import logging - -from .config import Config -from .DownloadQueue import DownloadQueue -from .encoder import Encoder -from .ItemDTO import Item - -LOG = logging.getLogger("common") - - -class Common: - """ - This class is used to share common methods between the socket and the API gateways. - """ - - def __init__( - self, - queue: DownloadQueue | None = None, - encoder: Encoder | None = None, - config: Config | None = None, - ): - super().__init__() - self.queue: DownloadQueue = queue or DownloadQueue.get_instance() - self.encoder: Encoder = encoder or Encoder() - config: Config = config or Config.get_instance() - self.default_preset: str = config.default_preset - - async def add(self, item: Item) -> dict[str, str]: - """ - Add an item to the download queue. - - Args: - item (Item): The item to be added to the queue. - - Returns: - dict[str, str]: The status of the download. - { "status": "text" } - - """ - return await self.queue.add(item=item) diff --git a/ui/@types/logs.ts b/ui/@types/logs.ts new file mode 100644 index 00000000..04f94c8a --- /dev/null +++ b/ui/@types/logs.ts @@ -0,0 +1,8 @@ +type log_line = { + id: number, + line: string, + datetime?: string, +} + + +export type { log_line }; diff --git a/ui/@types/tasks.ts b/ui/@types/tasks.ts new file mode 100644 index 00000000..c1a25d40 --- /dev/null +++ b/ui/@types/tasks.ts @@ -0,0 +1,17 @@ +type task_item = { + id: string, + name: string, + url: string, + preset?: string, + folder?: string, + template?: string, + cli?: string, + timer?: string, + in_progress?: boolean, +} + +type exported_task = task_item & { _type: string, _version: string } + +type error_response = { error: string } + +export type { task_item, exported_task, error_response }; diff --git a/ui/components/EmbedPlayer.vue b/ui/components/EmbedPlayer.vue index ce22b216..2f6afe04 100644 --- a/ui/components/EmbedPlayer.vue +++ b/ui/components/EmbedPlayer.vue @@ -7,6 +7,7 @@ width: 80vw; } + Not downloaded yet. @@ -14,10 +15,8 @@ - diff --git a/ui/components/GetInfo.vue b/ui/components/GetInfo.vue index b6696825..8624f49d 100644 --- a/ui/components/GetInfo.vue +++ b/ui/components/GetInfo.vue @@ -1,47 +1,50 @@ - + - - - - copyText(JSON.stringify(data, null, 4))" + + + copyText(JSON.stringify(data, null, 4))" style="position: absolute; top:0; right:0;"> - + - + - - - - copyText(JSON.stringify(data, null, 4))" - style="position: absolute; top:0; right:0;"> - - - + + + copyText(JSON.stringify(data, null, 4))" + style="position: absolute; top:0; right:0;"> + + - diff --git a/ui/components/ImageView.vue b/ui/components/ImageView.vue index 8a5a22a4..b1cb53d5 100644 --- a/ui/components/ImageView.vue +++ b/ui/components/ImageView.vue @@ -1,30 +1,31 @@ - + - + - diff --git a/ui/components/Modal.vue b/ui/components/Modal.vue index 20582c57..e5d13024 100644 --- a/ui/components/Modal.vue +++ b/ui/components/Modal.vue @@ -2,19 +2,19 @@ - + - + - diff --git a/ui/components/VideoPlayer.vue b/ui/components/VideoPlayer.vue index 3a17ccbe..02adc713 100644 --- a/ui/components/VideoPlayer.vue +++ b/ui/components/VideoPlayer.vue @@ -10,8 +10,8 @@ - + - diff --git a/ui/pages/logs.vue b/ui/pages/logs.vue index 87b33546..572a6ac7 100644 --- a/ui/pages/logs.vue +++ b/ui/pages/logs.vue @@ -89,19 +89,19 @@ code { [{{ moment(log.datetime).format('HH:mm:ss') }}] - {{ log.line }} - - - - - - No logs match this query: {{ query }} - - - - No logs available - - +{{ log.line }} + + + + + + No logs match this query: {{ query }} + + + + No logs available + + @@ -109,30 +109,45 @@ code { -
+ copyText(JSON.stringify(data, null, 4))" style="position: absolute; top:0; right:0;"> -