mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 04:02:36 +01:00
f411ce99e1
TODO: Localication + "Netflix fix errors"
25 lines
818 B
C#
25 lines
818 B
C#
namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
|
{
|
|
public class NetflixCheckMaxDuration : INetflixQualityChecker
|
|
{
|
|
|
|
/// <summary>
|
|
/// Maximum duration: 7 seconds per subtitle event
|
|
/// </summary>
|
|
public void Check(Subtitle subtitle, NetflixQualityController controller)
|
|
{
|
|
foreach (Paragraph p in subtitle.Paragraphs)
|
|
{
|
|
if (p.Duration.TotalMilliseconds > 7000)
|
|
{
|
|
var fixedParagraph = new Paragraph(p, false);
|
|
fixedParagraph.Duration.TotalMilliseconds = 7000;
|
|
string comment = "Maximum duration: 7 seconds per subtitle event";
|
|
controller.AddRecord(p, fixedParagraph, comment);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|