From 71838fb188a319c5bef9f3565080c619d7dbea28 Mon Sep 17 00:00:00 2001 From: Dinesh Solanki <15937452+DineshSolanki@users.noreply.github.com> Date: Tue, 23 Jun 2020 21:20:22 +0530 Subject: [PATCH] Added option to skip/ignore all ambigous titles. --- Folicon_Native/MainWindow.xaml | 1 + Folicon_Native/MainWindow.xaml.vb | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Folicon_Native/MainWindow.xaml b/Folicon_Native/MainWindow.xaml index 3bca4c6b..ea87c2e0 100644 --- a/Folicon_Native/MainWindow.xaml +++ b/Folicon_Native/MainWindow.xaml @@ -12,6 +12,7 @@ + diff --git a/Folicon_Native/MainWindow.xaml.vb b/Folicon_Native/MainWindow.xaml.vb index 0951a3db..709b8a88 100644 --- a/Folicon_Native/MainWindow.xaml.vb +++ b/Folicon_Native/MainWindow.xaml.vb @@ -10,6 +10,7 @@ Class MainWindow ReadOnly _serviceClient As New Net.TMDb.ServiceClient(ApikeyTmdb) ReadOnly _igdbClient = IGDB.Client.Create(ApikeyIgdb) Dim stopIconDownload As Boolean = False + Dim ignoreAmbigousTitle As Boolean = False Public Sub New() @@ -77,8 +78,9 @@ Class MainWindow For Each itemTitle As String In Fnames Cursor = Cursors.Wait isAutoPicked = False - Dim sr As New SearchResult() - sr.Owner = Me + Dim sr As New SearchResult With { + .Owner = Me + } SearchTitle = New TitleCleaner().Clean(itemTitle) Dim response = @@ -111,7 +113,7 @@ Class MainWindow isAutoPicked = True ElseIf resultCount > 1 Then - sr.ShowDialog() + If Not ignoreAmbigousTitle Then : sr.ShowDialog() : End If End If If isAutoPicked OrElse sr.DialogResult Then FinalistView.Items.Add(New ListItem() With { @@ -351,4 +353,12 @@ Class MainWindow End Sub + + Private Sub chkIgnoreAmbiguous_Click(sender As Object, e As RoutedEventArgs) Handles chkIgnoreAmbiguous.Click + If chkIgnoreAmbiguous.IsChecked Then + ignoreAmbigousTitle = True + Else + ignoreAmbigousTitle = False + End If + End Sub End Class