@@ -42,10 +42,11 @@ public async Task<IImportfile> AnalyseAsync(string fileContent)
4242 } ;
4343 try
4444 {
45- var options = await _localStorageOptionsProvider . GetOptionsAsync < ImportOptions > ( ) ;
46- var importProfile = options . SelectedImportProfile ?? throw new InvalidOperationException ( "Selected import profiles is not set!" ) ;
45+ var importOptions = await _localStorageOptionsProvider . GetOptionsAsync < ImportOptions > ( ) ;
46+ var applicationOptions = await _localStorageOptionsProvider . GetOptionsAsync < ApplicationOptions > ( ) ;
47+ var importProfile = importOptions . SelectedImportProfile ?? throw new InvalidOperationException ( "Selected import profiles is not set!" ) ;
4748 SearchForCuesheetData ( ref importFile , fileContent , importProfile ) ;
48- SearchForTrackData ( ref importFile , fileContent , importProfile ) ;
49+ SearchForTrackData ( ref importFile , fileContent , importProfile , applicationOptions . DefaultIsLinkedToPreviousTrack ) ;
4950 }
5051 catch ( Exception ex )
5152 {
@@ -135,7 +136,7 @@ private static void SearchForCuesheetData(ref Importfile importFile, string file
135136 }
136137 }
137138
138- private static void SearchForTrackData ( ref Importfile importFile , string fileContent , Importprofile importProfile )
139+ private static void SearchForTrackData ( ref Importfile importFile , string fileContent , Importprofile importProfile , bool defaultIsLinkedToPreviousTrack )
139140 {
140141 if ( string . IsNullOrWhiteSpace ( importProfile . SchemeTracks ) == false )
141142 {
@@ -155,7 +156,7 @@ private static void SearchForTrackData(ref Importfile importFile, string fileCon
155156 importFile . FileContentRecognized = regex . Replace ( importFile . FileContentRecognized ,
156157 match =>
157158 {
158- var track = new ImportTrack ( ) ;
159+ var track = new ImportTrack ( ) { IsLinkedToPreviousTrack = defaultIsLinkedToPreviousTrack } ;
159160 string marked = ApplyRegexAndMarkGroups ( track , regex , match . Value , importProfile . TimeSpanFormat ) ;
160161 cuesheet ! . Tracks . Add ( track ) ;
161162 return marked ;
@@ -173,7 +174,7 @@ private static void SearchForTrackData(ref Importfile importFile, string fileCon
173174 // Check if this line is already analyzed
174175 if ( line . Contains ( CuesheetConstants . MarkHTMLStart ) == false )
175176 {
176- var track = new ImportTrack ( ) ;
177+ var track = new ImportTrack ( ) { IsLinkedToPreviousTrack = defaultIsLinkedToPreviousTrack } ;
177178 var markedLine = ApplyRegexAndMarkGroups ( track , regex , line , importProfile . TimeSpanFormat ) ;
178179 if ( ! string . Equals ( markedLine , line ) )
179180 {
0 commit comments