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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user