Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jun 19, 2024
1 parent 2842ae6 commit 7594e18
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions TwitchDownloaderCore/VideoDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,9 @@ private Range GetStreamListTrim(IList<M3U8.Stream> streamList, VideoInfo videoIn
var videoPart = streamList[i];
if (endTime - videoPart.PartInfo.Duration < trimTotalSeconds)
{
if (endTime - trimTotalSeconds > 0)
{
endOffset = videoPart.PartInfo.Duration - (endTime - trimTotalSeconds);
}
var offset = endTime - trimTotalSeconds;
if (offset > 0) endOffset = videoPart.PartInfo.Duration - offset;

break;
}

Expand Down

0 comments on commit 7594e18

Please sign in to comment.