Concurrent CLI Downloads/Renders
Will the CLI ever be able to support concurrent video downloads or renders? When I try to execute multiple downloads concurrently, i get this error:
Unhandled exception. System.AggregateException: One or more errors occurred. (The process cannot access the file '462.ts' because it is being used by another process.) ---> System.IO.IOException: The process cannot access the file '462.ts' because it is being used by another process. at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel) at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive) at System.IO.Directory.Delete(String path, Boolean recursive) at TwitchDownloaderCore.VideoDownloader.Cleanup(String downloadFolder) at TwitchDownloaderCore.VideoDownloader.DownloadAsync(IProgress`1 progress, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at TwitchDownloaderCLI.Program.DownloadVideo(Options inputOptions) at TwitchDownloaderCLI.Program.Main(String[] args)
Edit: Using Windows CLI
It seems you're downloading the same VOD concurrently. Are you downloading the same VOD concurrently, with like a different resolution or cropping times? The download folder is just the VOD ID so I guess there would be conflicts if downloading the same VOD at the same time.
I planned to rewrite the cache system with concurrency in mind when .NET 6 was released, and have just been putting it off since I've just finished school and was applying for jobs etc and am now in the middle of moving to my 1st real job as a software dev.
A lot of the file handling just wasn't written with concurrency in mind (It was just a WinForms application with no CLI at the start), and I wanna refactor the render code too since it's a hot mess. So, eventually, I just can't really guarantee when I'll get around to doing it.
Yep, it's the same VOD concurrently with different cropping times. No rush and thanks for all the work you've put in so far.