Files
videodownloader/apps/api/src/jobs/dto.ts
dariusz fbc4fb0834
Some checks failed
deploy / deploy (push) Failing after 1m44s
feat: webowa wersja Video & Sound Downloader Pro (NestJS + React)
Odwzorowanie desktopowego v6.5.6: tryby MP3/MP4/PLAYLISTA/FACEBOOK,
jakość/format, napisy, log na żywo (SSE), STOP. Docker + Gitea CI/CD,
deploy na videodownloader.naurecki.pl.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 10:45:22 +02:00

32 lines
715 B
TypeScript

import { IsBoolean, IsIn, IsOptional, IsString, MaxLength } from 'class-validator';
export type JobMode = 'mp3' | 'mp4' | 'playlist' | 'facebook';
export class ProbeDto {
@IsString()
@MaxLength(2048)
url!: string;
}
export class CreateJobDto {
@IsString()
@MaxLength(2048)
url!: string;
@IsIn(['mp3', 'mp4', 'playlist', 'facebook'])
mode!: JobMode;
// Token formatu zależny od trybu:
// mp3 -> '320' | '256' | '192' | '128' (kbps)
// mp4/fb -> '2160' | '1440' | '1080' | '720' | '480' | 'best'
// playlist -> 'video-1080' | 'video-720' | 'audio-320'
@IsOptional()
@IsString()
@MaxLength(32)
format?: string;
@IsOptional()
@IsBoolean()
subtitles?: boolean;
}