diff --git a/FoliCon/ViewModels/PosterPickerViewModel.cs b/FoliCon/ViewModels/PosterPickerViewModel.cs index ebd3d235..8b5b16fb 100644 --- a/FoliCon/ViewModels/PosterPickerViewModel.cs +++ b/FoliCon/ViewModels/PosterPickerViewModel.cs @@ -113,7 +113,7 @@ public async void LoadData() var resultType = Result.MediaType; var response = _isPickedById ? resultType == MediaTypes.Game ? Result.Result[0] : Result.Result - : resultType == MediaTypes.Game ? Result.Result : Result.Result.Results[PickedIndex]; + : resultType == MediaTypes.Game ? Result.Result[PickedIndex] : Result.Result.Results[PickedIndex]; if (resultType != MediaTypes.Game) { @@ -240,7 +240,7 @@ private void PickMethod(object parameter) var link = (string)parameter; var result = _isPickedById ? Result.MediaType == MediaTypes.Game ? Result.Result[0] : Result.Result - : Result.MediaType == MediaTypes.Game ? Result.Result : Result.Result.Results[PickedIndex]; + : Result.MediaType == MediaTypes.Game ? Result.Result[PickedIndex] : Result.Result.Results[PickedIndex]; if (Result.MediaType == MediaTypes.Game) { result.Cover.Value.ImageId = link; diff --git a/FoliCon/ViewModels/SearchResultViewModel.cs b/FoliCon/ViewModels/SearchResultViewModel.cs index a1cdf0ae..eaa92db0 100644 --- a/FoliCon/ViewModels/SearchResultViewModel.cs +++ b/FoliCon/ViewModels/SearchResultViewModel.cs @@ -248,7 +248,7 @@ private void PickMethod() else { _tmdbObject.ResultPicked(SearchResult.Result, SearchResult.MediaType, - _fullFolderPath, rating,_isPickedById); + _fullFolderPath, rating, _isPickedById); } } else if (SearchMode == MediaTypes.Game) @@ -289,15 +289,16 @@ private void MouseDoubleClick() return; } } - _dialogService.ShowPosterPicker(_tmdbObject,_igdbObject, SearchResult, pickedIndex, ResultListViewData.Data, - _isPickedById, r => { }); + + _dialogService.ShowPosterPicker(_tmdbObject, _igdbObject, SearchResult, pickedIndex, + ResultListViewData.Data, + _isPickedById, r => { }); } catch (Exception ex) { - if (ex.Message == "NoPoster") - { - MessageBox.Show(CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), SearchTitle)); - } + MessageBox.Show(ex.Message == "NoPoster" + ? CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), SearchTitle) + : CustomMessageBox.Warning(ex.Message, LangProvider.GetLang("ExceptionOccurred"))); } } }