Skip to content

Commit

Permalink
Added option to skip/ignore all ambigous titles.
Browse files Browse the repository at this point in the history
  • Loading branch information
DineshSolanki committed Jun 23, 2020
1 parent 04be4b3 commit 71838fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions Folicon_Native/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<MenuItem Header="Settings">
<MenuItem x:Name="chkIsRatingVisible" Header="Show Rating badge" IsCheckable="True" ToolTip="Controls whether to hide or show Rating Shield"/>
<MenuItem x:Name="chkIsPosterOverlayVisible" Header="Use Poster overlay" IsCheckable="True" ToolTip="Controls whether to use poster Overlay or Plain Posters"/>
<MenuItem x:Name="chkIgnoreAmbiguous" Header="Ignore Ambigous title" IsCheckable="True" ToolTip="Skip ambigous titles from search"/>
<MenuItem x:Name="MenuApiConfigBtn" Header="_API keys Configuration"/>
<Separator/>
</MenuItem>
Expand Down
16 changes: 13 additions & 3 deletions Folicon_Native/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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

0 comments on commit 71838fb

Please sign in to comment.