Skip to content

Commit dbbdc0b

Browse files
committed
Add length check to video finalization failure check
1 parent 000d5da commit dbbdc0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TwitchDownloaderCore/VideoDownloader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ await FfmpegMetadata.SerializeAsync(metadataPath, videoInfo.owner.displayName, d
128128
} while (ffmpegExitCode != 0 && ffmpegRetries++ < 1);
129129

130130
outputFileInfo.Refresh();
131-
if (ffmpegExitCode != 0 || !outputFileInfo.Exists)
131+
if (ffmpegExitCode != 0 || !outputFileInfo.Exists || outputFileInfo.Length == 0)
132132
{
133133
_shouldClearCache = false;
134134
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.");

0 commit comments

Comments
 (0)