fix subtitle unit tests

This commit is contained in:
Luke Pulverenti
2014-08-31 14:28:20 -04:00
parent 6e25c572fa
commit bdc04cda17
9 changed files with 46 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
using System;
using MediaBrowser.Common.Extensions;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
@@ -42,6 +43,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
subEvent.StartPositionTicks = GetTicks(sections[headers["Start"]]);
subEvent.EndPositionTicks = GetTicks(sections[headers["End"]]);
subEvent.Text = string.Join(",", sections.Skip(headers["Text"]));
subEvent.Text = subEvent.Text.Replace(@"\N", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase);
trackInfo.TrackEvents.Add(subEvent);