Skip to content

Commit

Permalink
Update CuesheetImportfile.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoCoderMatrix86 committed Jun 17, 2024
1 parent a3f2cdd commit 97d27dc
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions AudioCuesheetEditor/Model/IO/Import/CuesheetImportfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public CuesheetImportfile(MemoryStream fileContent, ApplicationOptions applicati
var regexCDTextfile = new Regex("^" + CuesheetConstants.CuesheetCDTextfile + " \"(?'" + cuesheetCDTextfileGroupName + "'.{0,})\"");
var regexCatalogueNumber = new Regex("^" + CuesheetConstants.CuesheetCatalogueNumber + " (?'" + cuesheetCatalogueNumberGroupName + "'.{0,})");
Track? track = null;
List<String?> lines = new();
List<String?>? recognizedLines = new();
List<String?> lines = [];
List<String?>? recognizedLines = [];
while (reader.EndOfStream == false)
{
var line = reader.ReadLine();
Expand Down Expand Up @@ -214,9 +214,9 @@ public CuesheetImportfile(MemoryStream fileContent, ApplicationOptions applicati
var matchGroup = match.Groups.GetValueOrDefault(trackPreGapGroupName);
if (matchGroup != null)
{
var minutes = int.Parse(matchGroup.Value.Substring(0, matchGroup.Value.IndexOf(":")));
var seconds = int.Parse(matchGroup.Value.Substring(matchGroup.Value.IndexOf(":") + 1, 2));
var frames = int.Parse(matchGroup.Value.Substring(matchGroup.Value.LastIndexOf(":") + 1));
var minutes = int.Parse(matchGroup.Value.Substring(0, matchGroup.Value.IndexOf(':')));
var seconds = int.Parse(matchGroup.Value.Substring(matchGroup.Value.IndexOf(':') + 1, 2));
var frames = int.Parse(matchGroup.Value.Substring(matchGroup.Value.LastIndexOf(':') + 1));
if (track != null)
{
track.PreGap = new TimeSpan(0, 0, minutes, seconds, Convert.ToInt32((frames / 75.0) * 1000));
Expand All @@ -238,9 +238,9 @@ public CuesheetImportfile(MemoryStream fileContent, ApplicationOptions applicati
var matchGroup = match.Groups.GetValueOrDefault(trackIndex01GroupName);
if (matchGroup != null)
{
var minutes = int.Parse(matchGroup.Value.Substring(0, matchGroup.Value.IndexOf(":")));
var seconds = int.Parse(matchGroup.Value.Substring(matchGroup.Value.IndexOf(":") + 1, 2));
var frames = int.Parse(matchGroup.Value.Substring(matchGroup.Value.LastIndexOf(":") + 1));
var minutes = int.Parse(matchGroup.Value.Substring(0, matchGroup.Value.IndexOf(':')));
var seconds = int.Parse(matchGroup.Value.Substring(matchGroup.Value.IndexOf(':') + 1, 2));
var frames = int.Parse(matchGroup.Value.Substring(matchGroup.Value.LastIndexOf(':') + 1));
if (track != null)
{
track.Begin = new TimeSpan(0, 0, minutes, seconds, Convert.ToInt32((frames / 75.0) * 1000));
Expand Down Expand Up @@ -270,9 +270,9 @@ public CuesheetImportfile(MemoryStream fileContent, ApplicationOptions applicati
var matchGroup = match.Groups.GetValueOrDefault(trackPostGapGroupName);
if (matchGroup != null)
{
var minutes = int.Parse(matchGroup.Value.Substring(0, matchGroup.Value.IndexOf(":")));
var seconds = int.Parse(matchGroup.Value.Substring(matchGroup.Value.IndexOf(":") + 1, 2));
var frames = int.Parse(matchGroup.Value.Substring(matchGroup.Value.LastIndexOf(":") + 1));
var minutes = int.Parse(matchGroup.Value.Substring(0, matchGroup.Value.IndexOf(':')));
var seconds = int.Parse(matchGroup.Value.Substring(matchGroup.Value.IndexOf(':') + 1, 2));
var frames = int.Parse(matchGroup.Value.Substring(matchGroup.Value.LastIndexOf(':') + 1));
if (track != null)
{
track.PostGap = new TimeSpan(0, 0, minutes, seconds, Convert.ToInt32((frames / 75.0) * 1000));
Expand Down

0 comments on commit 97d27dc

Please sign in to comment.