@@ -136,28 +136,28 @@ public void AutoProcessAll()
136
136
StatusText = "Auto Processing" ;
137
137
while ( displayedMatchIndex < Matches . Count && Matches [ displayedMatchIndex ] . Similarity > ConfigService . AutoProcessorThreashold )
138
138
{
139
- DisplayedMatch = Matches [ displayedMatchIndex ] ;
139
+ ImageMatch processingMatch = Matches [ displayedMatchIndex ] ;
140
140
ImageCountText = $ "{ displayedMatchIndex + 1 } / { Matches . Count } ";
141
141
PercentComplete = Convert . ToInt32 ( ( decimal . Divide ( displayedMatchIndex + 1 , Matches . Count ) * 100 ) ) ;
142
- PreviewAutoProcessor ( ) ;
142
+ PreviewAutoProcessor ( processingMatch ) ;
143
143
144
144
if ( AutoProcessProperty != null && AutoProcessProperty != "" && AutoProcessProperty != "None" && AutoProcessSide != 0 )
145
145
{
146
146
try
147
147
{
148
- if ( AutoProcessSide < 0 && DisplayedMatch . Image1 != null )
149
- DeleteFile ( DisplayedMatch . Image1 . Image . FullName ) ;
150
- else if ( AutoProcessSide > 0 && DisplayedMatch . Image2 != null )
151
- DeleteFile ( DisplayedMatch . Image2 . Image . FullName ) ;
148
+ if ( AutoProcessSide < 0 && processingMatch . Image1 != null )
149
+ DeleteFile ( processingMatch . Image1 . Image . FullName ) ;
150
+ else if ( AutoProcessSide > 0 && processingMatch . Image2 != null )
151
+ DeleteFile ( processingMatch . Image2 . Image . FullName ) ;
152
152
}
153
153
catch {
154
- LogService . Log ( $ "Error Auto-Processing current match: '{ DisplayedMatch . Image1 . Image . FullName } ' - '{ DisplayedMatch . Image2 . Image . FullName } '", LogLevel . Error ) ;
154
+ LogService . Log ( $ "Error Auto-Processing current match: '{ processingMatch . Image1 . Image . FullName } ' - '{ processingMatch . Image2 . Image . FullName } '", LogLevel . Error ) ;
155
155
}
156
156
}
157
157
else
158
158
{
159
159
if ( ConfigService . CacheNoMatch )
160
- CacheService . AddNoMatch ( DisplayedMatch . Image1 . Image . FullName , DisplayedMatch . Image2 . Image . FullName ) ;
160
+ CacheService . AddNoMatch ( processingMatch . Image1 . Image . FullName , processingMatch . Image2 . Image . FullName ) ;
161
161
}
162
162
163
163
displayedMatchIndex ++ ;
@@ -299,7 +299,7 @@ public void Search(object? sender, RoutedEventArgs e)
299
299
DisplayedMatch = Matches . First ( ) ;
300
300
StatusText = "Showing Matches: " ;
301
301
ImageCountText = $ "1 / { Matches . Count } ";
302
- PreviewAutoProcessor ( ) ;
302
+ PreviewAutoProcessor ( DisplayedMatch ) ;
303
303
Displaying = true ;
304
304
}
305
305
else
@@ -349,23 +349,23 @@ private void NextPair(bool forward = true)
349
349
ImageCountText = $ "{ displayedMatchIndex + 1 } / { Matches . Count } ";
350
350
PercentComplete = Convert . ToInt32 ( ( decimal . Divide ( displayedMatchIndex + 1 , Matches . Count ) * 100 ) ) ;
351
351
352
- PreviewAutoProcessor ( ) ;
352
+ PreviewAutoProcessor ( DisplayedMatch ) ;
353
353
} else
354
354
{
355
355
LogService . Log ( "No more matches to show, stopping displaying matches" ) ;
356
356
ResetUI ( ) ;
357
357
}
358
358
}
359
359
360
- public void PreviewAutoProcessor ( )
360
+ public void PreviewAutoProcessor ( ImageMatch previewMatch )
361
361
{
362
362
try
363
363
{
364
364
List < string > autoProcessors = ConfigService . AutoProcessors ;
365
365
int currentProcessor = 0 ;
366
366
while ( currentProcessor < autoProcessors . Count )
367
367
{
368
- int processingResult = AutoProcessorService . Processors . First ( p => p . DisplayName == autoProcessors [ currentProcessor ] ) . Process ( DisplayedMatch . Image1 . Image , DisplayedMatch . Image2 . Image ) ;
368
+ int processingResult = AutoProcessorService . Processors . First ( p => p . DisplayName == autoProcessors [ currentProcessor ] ) . Process ( previewMatch . Image1 . Image , previewMatch . Image2 . Image ) ;
369
369
if ( processingResult != 0 )
370
370
{
371
371
AutoProcessSide = processingResult ;
0 commit comments