Organize downloaded files into per-job subdirectories under "downloads" instead of a flat structure. Update DownloadController and VideoService to read, write, and delete files within these job-specific directories. Add helper methods for directory management and improve logging. Update download/delete endpoints and result URLs to reflect the new structure. Clean up empty job directories after file deletion.
27 lines
872 B
C#
27 lines
872 B
C#
namespace TuneRipper.Shared.Models;
|
|
|
|
public class ProcessVideoRequest
|
|
{
|
|
public string? Url { get; set; }
|
|
public string? Format { get; set; } = "mp3";
|
|
public string? Quality { get; set; } = "128";
|
|
public string? SessionId { get; set; } // Add session ID support
|
|
}
|
|
|
|
public class ProcessVideoResponse
|
|
{
|
|
public bool Success { get; set; }
|
|
public string? Message { get; set; }
|
|
public string? FileName { get; set; }
|
|
public string? DownloadUrl { get; set; }
|
|
public YouTubeVideoDetails? VideoDetails { get; set; }
|
|
public string? SessionId { get; set; } // Include session ID in response
|
|
}
|
|
|
|
public class DownloadProgress
|
|
{
|
|
public int PercentageComplete { get; set; }
|
|
public string? Status { get; set; }
|
|
public string? Message { get; set; }
|
|
public YouTubeVideoDetails? VideoDetails { get; set; } // Add optional video details
|
|
} |