From 59d43bb1c36ccae186c31c2529dce9e73a8be2c6 Mon Sep 17 00:00:00 2001 From: Kevin Heritage Date: Fri, 17 Feb 2023 19:27:30 +0100 Subject: [PATCH] chore: apply changes to format end seek --- FFMpegCore/FFMpeg/Arguments/EndSeekArgument.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/FFMpegCore/FFMpeg/Arguments/EndSeekArgument.cs b/FFMpegCore/FFMpeg/Arguments/EndSeekArgument.cs index 5ced1c4..ea57339 100644 --- a/FFMpegCore/FFMpeg/Arguments/EndSeekArgument.cs +++ b/FFMpegCore/FFMpeg/Arguments/EndSeekArgument.cs @@ -1,6 +1,4 @@ -using System; - -namespace FFMpegCore.Arguments +namespace FFMpegCore.Arguments { /// /// Represents seek parameter @@ -14,15 +12,18 @@ public EndSeekArgument(TimeSpan? seekTo) SeekTo = seekTo; } - public string Text { - get { - if(SeekTo.HasValue) + public string Text + { + get + { + if (SeekTo.HasValue) { - int hours = SeekTo.Value.Hours; - if(SeekTo.Value.Days > 0) + var hours = SeekTo.Value.Hours; + if (SeekTo.Value.Days > 0) { hours += SeekTo.Value.Days * 24; } + return $"-to {hours.ToString("00")}:{SeekTo.Value.Minutes.ToString("00")}:{SeekTo.Value.Seconds.ToString("00")}.{SeekTo.Value.Milliseconds.ToString("000")}"; } else