From b3a94dbd5da2a21140cbb025f612d0d0af155af6 Mon Sep 17 00:00:00 2001 From: Dinesh Solanki <15937452+DineshSolanki@users.noreply.github.com> Date: Mon, 9 Aug 2021 00:05:14 +0530 Subject: [PATCH] fixed idpicked title issue when AlwaysShowPosterMode is off --- FoliCon/ViewModels/MainWindowViewModel.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/FoliCon/ViewModels/MainWindowViewModel.cs b/FoliCon/ViewModels/MainWindowViewModel.cs index bc9e1f66..570ff455 100644 --- a/FoliCon/ViewModels/MainWindowViewModel.cs +++ b/FoliCon/ViewModels/MainWindowViewModel.cs @@ -338,11 +338,9 @@ private async System.Threading.Tasks.Task ProcessPosterModeAsync() { try { - if (SearchMode == "Game") + if (isPickedById ? mediaType == "Game" : SearchMode == "Game") { - var result = isPickedById - ? response.Result - : response.Result[0]; + var result = response.Result[0]; _igdbObject.ResultPicked(result, fullFolderPath); } else @@ -358,9 +356,13 @@ private async System.Threading.Tasks.Task ProcessPosterModeAsync() } catch (Exception ex) { - MessageBox.Show(ex.Message == "NoPoster" - ? CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), itemTitle) - : CustomMessageBox.Warning(ex.Message, LangProvider.GetLang("ExceptionOccurred"))); + if (ex.Message == "NoPoster") + { + MessageBox.Show(CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), itemTitle)); + } +#if DEBUG + MessageBox.Show(CustomMessageBox.Warning(ex.Message, LangProvider.GetLang("ExceptionOccurred"))); +#endif isAutoPicked = false; }