Skip to content

Commit

Permalink
Add length check to video finalization failure check
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jun 30, 2024
1 parent 000d5da commit dbbdc0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TwitchDownloaderCore/VideoDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ await FfmpegMetadata.SerializeAsync(metadataPath, videoInfo.owner.displayName, d
} while (ffmpegExitCode != 0 && ffmpegRetries++ < 1);

outputFileInfo.Refresh();
if (ffmpegExitCode != 0 || !outputFileInfo.Exists)
if (ffmpegExitCode != 0 || !outputFileInfo.Exists || outputFileInfo.Length == 0)
{
_shouldClearCache = false;
throw new Exception($"Failed to finalize video. The download cache has not been cleared and can be found at {downloadFolder} along with a log file.");
Expand Down

0 comments on commit dbbdc0b

Please sign in to comment.