Refactor: Use jobId_title.ext for downloads & improve UX

Adopt GUID-based {jobId}_{title}.ext filename convention for all downloads, ensuring unique, human-readable, and traceable files. Update DownloadController to use precise jobId-based file matching and generate user-friendly download names. Pass jobId to VideoService for consistent naming; add robust title sanitization. Remove fallback file search logic for predictability. Update README and API docs to reflect new format and workflow. Improve logging and error messages for clarity.
This commit is contained in:
Michal Vrba
2025-12-12 10:28:48 +01:00
parent 406cf31b49
commit 3ecff7ca73
4 changed files with 247 additions and 102 deletions
@@ -194,6 +194,7 @@ public class VideoController : ControllerBase
var downloadedFileName = await _videoService.ProcessVideoWithProgressAsync(
job.Request.Url!,
job.Request.Format ?? "mp3",
jobId, // Pass the job ID for filename generation
(percentage, message) =>
{
// Update progress from yt-dlp