lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.68k stars 261 forks source link

collision not working #1126

Closed superbonaci closed 3 months ago

superbonaci commented 3 months ago

Checklist

Edition

Command Line Interface

Describe your issue here

If output exists crashes:

TwitchDownloaderCLI videodownload -u 2162178597 -o 2162178597.mp4 -q best --oauth 1234 --temp-path './temp' --collision Exit
TwitchDownloaderCLI 1.54.7 Copyright (c) lay295 and contributors
Unhandled exception. System.AggregateException: One or more errors occurred. (No destination file was provided, aborting.)
 ---> System.IO.FileNotFoundException: No destination file was provided, aborting.
   at TwitchDownloaderCore.TwitchHelper.ClaimFile(String path, Func`2 fileAlreadyExistsCallback, ITaskLogger logger)
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean )
   at System.Threading.Tasks.Task.Wait(Int32 , CancellationToken )
   at System.Threading.Tasks.Task.Wait()
   at TwitchDownloaderCLI.Modes.DownloadVideo.Download(VideoDownloadArgs inputOptions)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at TwitchDownloaderCLI.Program.Main(String[] args)

Add any related files or extra information here

No response

ScrubN commented 3 months ago

If output exists crashes

Originally it just returned gracefully, but the WPF task queue needed an exception to properly register as a failure (I hate the design of the task queue)