Files
mpv.net/src/MpvNet/Chapter.cs
2023-10-24 11:17:45 +02:00

29 lines
565 B
C#

using MpvNet.ExtensionMethod;
namespace MpvNet;
public class Chapter
{
public string Title { get; set; } = "";
public double Time { get; set; }
string? _timeDisplay;
public string TimeDisplay
{
get
{
if (_timeDisplay == null)
{
_timeDisplay = TimeSpan.FromSeconds(Time).ToString();
if (_timeDisplay.ContainsEx("."))
_timeDisplay = _timeDisplay[.._timeDisplay.LastIndexOf(".")];
}
return _timeDisplay;
}
}
}