mirror of
https://github.com/alexta69/metube.git
synced 2026-06-15 16:20:06 +00:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user