Add video codec selector and codec/quality columns in done list

Allow users to prefer a specific video codec (H.264, H.265, AV1, VP9)
when adding downloads. The selector filters available formats via
yt-dlp format strings, falling back to best available if the preferred
codec is not found. The completed downloads table now shows Quality
and Codec columns.
This commit is contained in:
CyCl0ne
2026-03-09 08:59:01 +01:00
parent 3b0eaad67e
commit 56826d33fd
8 changed files with 111 additions and 8 deletions
+5 -1
View File
@@ -120,6 +120,7 @@ export class DownloadsService {
subtitleFormat: string,
subtitleLanguage: string,
subtitleMode: string,
videoCodec: string,
) {
return this.http.post<Status>('add', {
url: url,
@@ -133,7 +134,8 @@ export class DownloadsService {
chapter_template: chapterTemplate,
subtitle_format: subtitleFormat,
subtitle_language: subtitleLanguage,
subtitle_mode: subtitleMode
subtitle_mode: subtitleMode,
video_codec: videoCodec,
}).pipe(
catchError(this.handleHTTPError)
);
@@ -183,6 +185,7 @@ export class DownloadsService {
const defaultSubtitleFormat = 'srt';
const defaultSubtitleLanguage = 'en';
const defaultSubtitleMode = 'prefer_manual';
const defaultVideoCodec = 'auto';
return new Promise((resolve, reject) => {
this.add(
@@ -198,6 +201,7 @@ export class DownloadsService {
defaultSubtitleFormat,
defaultSubtitleLanguage,
defaultSubtitleMode,
defaultVideoCodec,
)
.subscribe({
next: (response) => resolve(response),