From fb2642de2cedeb338a6811a824df335e3b302e72 Mon Sep 17 00:00:00 2001 From: Marco Piovanello <35533749+marcopeocchi@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:23:08 +0200 Subject: [PATCH] added "language" to the Format struct (#194) --- frontend/src/components/FormatsGrid.tsx | 1 + frontend/src/types/index.ts | 1 + server/internal/common_types.go | 1 + 3 files changed, 3 insertions(+) diff --git a/frontend/src/components/FormatsGrid.tsx b/frontend/src/components/FormatsGrid.tsx index 18f18d0..90ae1f7 100644 --- a/frontend/src/components/FormatsGrid.tsx +++ b/frontend/src/components/FormatsGrid.tsx @@ -101,6 +101,7 @@ export default function FormatsGrid({ > {format.format_note} - {format.vcodec === 'none' ? format.acodec : format.vcodec} {(format.filesize_approx > 0) ? " (~" + Math.round(format.filesize_approx / 1024 / 1024) + " MiB)" : ""} + {format.language} )) diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 6be0959..9271f1b 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -82,6 +82,7 @@ export type DLFormat = { vcodec: string acodec: string filesize_approx: number + language: string } export type DirectoryEntry = { diff --git a/server/internal/common_types.go b/server/internal/common_types.go index 7920832..ea18097 100644 --- a/server/internal/common_types.go +++ b/server/internal/common_types.go @@ -58,6 +58,7 @@ type Format struct { VCodec string `json:"vcodec"` ACodec string `json:"acodec"` Size float32 `json:"filesize_approx"` + Language string `json:"language"` } // struct representing the response sent to the client