From bc9cc880a2bf85830c1d639f9d11cafcf3393a50 Mon Sep 17 00:00:00 2001 From: Dinesh Solanki <15937452+DineshSolanki@users.noreply.github.com> Date: Fri, 6 Aug 2021 00:24:48 +0530 Subject: [PATCH] made changes for All except game. --- FoliCon/Models/ListItem.cs | 6 +- FoliCon/Modules/DialogServiceExtensions.cs | 10 +- FoliCon/Modules/IGDBClass.cs | 15 ++- FoliCon/Modules/TMDB.cs | 121 +++++++++++++++++--- FoliCon/Modules/Util.cs | 31 ++++- FoliCon/ViewModels/MainWindowViewModel.cs | 43 ++++--- FoliCon/ViewModels/PosterPickerViewModel.cs | 16 ++- FoliCon/ViewModels/SearchResultViewModel.cs | 11 +- 8 files changed, 198 insertions(+), 55 deletions(-) diff --git a/FoliCon/Models/ListItem.cs b/FoliCon/Models/ListItem.cs index 342ad4d0..4c6b889d 100644 --- a/FoliCon/Models/ListItem.cs +++ b/FoliCon/Models/ListItem.cs @@ -10,14 +10,15 @@ public class ListItem : BindableBase private string _folder; private string _overview; private string _poster; + private int _id; public string Title { get => _title; set => SetProperty(ref _title, value); } public string Year { get => _year; set => SetProperty(ref _year, value); } public string Rating { get => _rating; set => SetProperty(ref _rating, value); } public string Folder { get => _folder; set => SetProperty(ref _folder, value); } public string Overview { get => _overview; set => SetProperty(ref _overview, value); } public string Poster { get => _poster; set => SetProperty(ref _poster, value); } - - public ListItem(string title, string year, string rating, string overview = null, string poster = null, string folder = "") + public int Id { get => _id; set => SetProperty(ref _id, value); } + public ListItem(string title, string year, string rating, string overview = null, string poster = null, string folder = "", int id = 0) { Title = title; Year = year; @@ -25,6 +26,7 @@ public ListItem(string title, string year, string rating, string overview = null Overview = overview; Poster = poster; Folder = folder; + Id = id; } public ListItem() diff --git a/FoliCon/Modules/DialogServiceExtensions.cs b/FoliCon/Modules/DialogServiceExtensions.cs index 70995157..a022815f 100644 --- a/FoliCon/Modules/DialogServiceExtensions.cs +++ b/FoliCon/Modules/DialogServiceExtensions.cs @@ -15,14 +15,15 @@ public static void ShowMessageBox(this IDialogService dialogService, string mess } public static void ShowSearchResult(this IDialogService dialogService, string searchMode, string query, - string folderPath, ResultResponse result, Tmdb tmdbObject, IgdbClass igdbObject, + string folderPath, ResultResponse result, Tmdb tmdbObject, IgdbClass igdbObject, bool isPickedById, Action callBack) { var p = new DialogParameters { {"query", query}, {"result", result}, {"searchmode", searchMode}, {"tmdbObject", tmdbObject}, {"igdbObject", igdbObject}, - {"folderpath", folderPath} + {"folderpath", folderPath}, + {"isPickedById" , isPickedById} }; dialogService.ShowDialog("SearchResult", p, callBack); } @@ -57,11 +58,12 @@ public static void ShowAboutBox(this IDialogService dialogService, Action resultData, Action callBack) + public static void ShowPosterPicker(this IDialogService dialogService, Tmdb tmdbObject, ResultResponse result,int pickedIndex, System.Collections.ObjectModel.ObservableCollection resultData, bool isPickedById, Action callBack) { var p = new DialogParameters { - {"pickedIndex", pickedIndex}, {"result", result}, {"tmdbObject",tmdbObject} , {"resultList", resultData} + {"pickedIndex", pickedIndex}, {"result", result}, {"tmdbObject",tmdbObject} , {"resultList", resultData}, + {"isPickedById" , isPickedById} }; dialogService.ShowDialog("PosterPicker", p, callBack); } diff --git a/FoliCon/Modules/IGDBClass.cs b/FoliCon/Modules/IGDBClass.cs index e2bc149b..7c4a1785 100644 --- a/FoliCon/Modules/IGDBClass.cs +++ b/FoliCon/Modules/IGDBClass.cs @@ -50,6 +50,18 @@ public async Task SearchGameAsync(string query) }; return response; } + public async Task SearchGameByIdAsync(string id) + { + Contract.Assert(_serviceClient != null); + var r = await _serviceClient.QueryAsync(IGDBClient.Endpoints.Games, + $"fields name,first_release_date,total_rating,summary,cover.*; where id = {id}"); + var response = new ResultResponse + { + MediaType = MediaTypes.Game, + Result = r + }; + return response; + } public static ObservableCollection ExtractGameDetailsIntoListItem(Game[] result) { @@ -81,7 +93,8 @@ public void ResultPicked(Game result, string fullFolderPath, string rating = "") var year = result.FirstReleaseDate != null ? result.FirstReleaseDate.Value.Year.ToString(CultureInfo.InvariantCulture) : ""; var posterUrl = ImageHelper.GetImageUrl(result.Cover.Value.ImageId, ImageSize.HD720); Util.AddToPickedListDataTable(_listDataTable, localPosterPath, result.Name, rating, fullFolderPath, folderName, - year); + year, (int)(result.Id ?? 0)); + if (result.Id != null) Util.SaveMediaInfo((int)result.Id, "Game", fullFolderPath); var tempImage = new ImageToDownload { LocalPath = localPosterPath, diff --git a/FoliCon/Modules/TMDB.cs b/FoliCon/Modules/TMDB.cs index b5a65481..f80a5dd6 100644 --- a/FoliCon/Modules/TMDB.cs +++ b/FoliCon/Modules/TMDB.cs @@ -7,8 +7,11 @@ using System.IO; using System.Threading.Tasks; using TMDbLib.Client; +using TMDbLib.Objects.Collections; using TMDbLib.Objects.General; +using TMDbLib.Objects.Movies; using TMDbLib.Objects.Search; +using TMDbLib.Objects.TvShows; namespace FoliCon.Modules { @@ -128,6 +131,47 @@ public static ObservableCollection ExtractResourceDetailsIntoListItem( return items; } + public static ObservableCollection ExtractTvDetailsIntoListItem(TvShow result) + { + var items = new ObservableCollection(); + var mediaName = result.Name; + var year = result.FirstAirDate != null ? result.FirstAirDate.Value.Year.ToString(CultureInfo.InvariantCulture) : ""; + var rating = result.VoteAverage.ToString(CultureInfo.CurrentCulture); + var overview = result.Overview; + var poster = result.PosterPath != null ? SmallPosterBase + result.PosterPath : null; + items.Add(new ListItem(mediaName, year, rating, overview, poster)); + + return items; + } + + public static ObservableCollection ExtractCollectionDetailsIntoListItem( + Collection result) + { + var items = new ObservableCollection(); + var mediaName = result.Name; + const string year = ""; + const string rating = ""; + const string overview = ""; + var poster = Convert.ToString(result.PosterPath != null ? SmallPosterBase + result.PosterPath : null, CultureInfo.InvariantCulture); + items.Add(new ListItem(mediaName, year, rating, overview, poster)); + + return items; + } + + public static ObservableCollection ExtractMoviesDetailsIntoListItem( + Movie result) + { + var items = new ObservableCollection(); + var mediaName = result.Title; + var year = result.ReleaseDate != null ? result.ReleaseDate.Value.Year.ToString(CultureInfo.InvariantCulture) : ""; + var rating = result.VoteAverage.ToString(CultureInfo.CurrentCulture); + var overview = result.Overview; + var poster = result.PosterPath != null ? SmallPosterBase + result.PosterPath : null; + items.Add(new ListItem(mediaName, year, rating, overview, poster)); + + return items; + } + public static ObservableCollection ExtractTvDetailsIntoListItem(SearchContainer result) { var items = new ObservableCollection(); @@ -143,7 +187,6 @@ public static ObservableCollection ExtractTvDetailsIntoListItem(Search return items; } - /// /// Prepares the Selected Result for Download And final List View /// @@ -152,14 +195,17 @@ public static ObservableCollection ExtractTvDetailsIntoListItem(Search /// Full Path to the current Media Folder /// Rating for media /// TODO: Merge parameter response and resultType. - public void ResultPicked(dynamic result, string resultType, string fullFolderPath, string rating = "") + public void ResultPicked(dynamic result, string resultType, string fullFolderPath, string rating = "",bool isPickedById = false) { if (result.PosterPath == null) { throw new InvalidDataException("NoPoster"); } + + var id = 0; + var type = resultType; if (string.IsNullOrWhiteSpace(rating) && resultType != MediaTypes.Collection) - { rating = result.VoteAverage.ToString(CultureInfo.CurrentCulture); } + { rating = result.VoteAverage.ToString(CultureInfo.InvariantCulture); } var folderName = Path.GetFileName(fullFolderPath); var localPosterPath = fullFolderPath + @"\" + folderName + ".png"; @@ -167,24 +213,27 @@ public void ResultPicked(dynamic result, string resultType, string fullFolderPat if (resultType == MediaTypes.Tv) { - var pickedResult = (SearchTv)result; - var year = pickedResult.FirstAirDate != null ? pickedResult.FirstAirDate.Value.Year.ToString(CultureInfo.InvariantCulture) : ""; + dynamic pickedResult = isPickedById ? (TvShow)result : (SearchTv)result; + var year = pickedResult.FirstAirDate != null ? pickedResult.FirstAirDate.Year.ToString(CultureInfo.InvariantCulture) : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Name, rating, fullFolderPath, folderName, - year); + year, pickedResult.Id); + id = pickedResult.Id; } else if (resultType == MediaTypes.Movie) { - var pickedResult = (SearchMovie)result; - var year = pickedResult.ReleaseDate != null ? pickedResult.ReleaseDate.Value.Year.ToString(CultureInfo.InvariantCulture) : ""; + dynamic pickedResult = isPickedById ? (Movie)result : (SearchMovie)result; + var year = pickedResult.ReleaseDate != null ? pickedResult.ReleaseDate.Year.ToString(CultureInfo.InvariantCulture) : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Title, - rating, fullFolderPath, folderName, year); + rating, fullFolderPath, folderName, year, pickedResult.Id); + id = pickedResult.Id; } else if (resultType == MediaTypes.Collection) { - var searchResult = (SearchCollection)result; - Util.AddToPickedListDataTable(_listDataTable, localPosterPath, searchResult.Name, rating, fullFolderPath, - folderName); + dynamic pickedResult = isPickedById ? (Collection)result : (SearchCollection)result; + Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Name, rating, fullFolderPath, + folderName, "", pickedResult.Id); + id = pickedResult.Id; } else if (resultType == MediaTypes.Mtv) { @@ -193,29 +242,37 @@ public void ResultPicked(dynamic result, string resultType, string fullFolderPat { case MediaType.Tv: { - SearchTv pickedResult = result; + type = "TV"; + dynamic pickedResult = isPickedById ? (TvShow)result : (SearchTv)result; var year = pickedResult.FirstAirDate != null - ? pickedResult.FirstAirDate.Value.Year.ToString(CultureInfo.InvariantCulture) + ? pickedResult.FirstAirDate.Year.ToString(CultureInfo.InvariantCulture) : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Name, rating, fullFolderPath, folderName, - year); + year, pickedResult.Id); + id = pickedResult.Id; break; } case MediaType.Movie: { - SearchMovie pickedResult = result; + type = "Movie"; + dynamic pickedResult = isPickedById ? (Movie)result : (SearchMovie)result; var year = pickedResult.ReleaseDate != null - ? pickedResult.ReleaseDate.Value.Year.ToString(CultureInfo.InvariantCulture) + ? pickedResult.ReleaseDate.Year.ToString(CultureInfo.InvariantCulture) : ""; Util.AddToPickedListDataTable(_listDataTable, localPosterPath, pickedResult.Title, rating, fullFolderPath, folderName, - year); + year, pickedResult.Id); + id = pickedResult.Id; break; } } } + if (!isPickedById && id != 0) + { + Util.SaveMediaInfo(id, type, fullFolderPath); + } var tempImage = new ImageToDownload { LocalPath = localPosterPath, @@ -265,5 +322,33 @@ public async Task SearchAsync(string query, string searchMode) }; return response; } + /// + /// Searches TMDB for a query in Specified search mode + /// + /// Title to search + /// Search Mode such as Movie,TV + /// Returns Search result with its Media Type + public ResultResponse SearchByIdAsync(int id, string mediaType) + { + object r = null; + if (mediaType == MediaTypes.Movie) + { + r = _serviceClient.GetMovieAsync(id).Result; + } + else if (mediaType == MediaTypes.Collection) + { + r = _serviceClient.GetCollectionAsync(id).Result; + } + else if (mediaType == MediaTypes.Tv) + { + r = _serviceClient.GetTvShowAsync(id).Result; + } + var response = new ResultResponse + { + Result = r, + MediaType = mediaType + }; + return response; + } } } \ No newline at end of file diff --git a/FoliCon/Modules/Util.cs b/FoliCon/Modules/Util.cs index c6f784be..7188b756 100644 --- a/FoliCon/Modules/Util.cs +++ b/FoliCon/Modules/Util.cs @@ -26,10 +26,13 @@ using FoliCon.Properties.Langs; using HandyControl.Tools.Extension; using TMDbLib.Objects.General; +using TMDbLib.Objects.Movies; using TMDbLib.Objects.Search; +using TMDbLib.Objects.TvShows; using Vanara.PInvoke; using static Vanara.PInvoke.Gdi32; using static Vanara.PInvoke.Shell32; +using Collection = TMDbLib.Objects.Collections.Collection; using MessageBox = HandyControl.Controls.MessageBox; using PosterIcon = FoliCon.Models.PosterIcon; @@ -244,7 +247,7 @@ public static VistaFolderBrowserDialog NewFolderBrowserDialog(string description /// Short Folder Name /// Media Year public static void AddToPickedListDataTable(DataTable dataTable, string poster, string title, string rating, - string fullFolderPath, string folderName, string year = "") + string fullFolderPath, string folderName, string year = "", int id = 0) { if (rating == "0") { @@ -261,20 +264,20 @@ public static void AddToPickedListDataTable(DataTable dataTable, string poster, dataTable.Rows.Add(nRow); } - public static ObservableCollection FetchAndAddDetailsToListView(ResultResponse result, string query) + public static ObservableCollection FetchAndAddDetailsToListView(ResultResponse result, string query, bool isPickedById) { var source = new ObservableCollection(); if (result.MediaType == MediaTypes.Tv) { - var ob = (SearchContainer)result.Result; + dynamic ob = isPickedById ? (TvShow) result.Result : (SearchContainer)result.Result; source = Tmdb.ExtractTvDetailsIntoListItem(ob); } else if (result.MediaType == MediaTypes.Movie || result.MediaType == MediaTypes.Collection) { if (query.ToLower(CultureInfo.InvariantCulture).Contains("collection")) { - var ob = (SearchContainer)result.Result; + dynamic ob = isPickedById ? (Collection) result.Result : (SearchContainer)result.Result; source = Tmdb.ExtractCollectionDetailsIntoListItem(ob); } else @@ -282,12 +285,12 @@ public static ObservableCollection FetchAndAddDetailsToListView(Result dynamic ob; try { - ob = (SearchContainer)result.Result; + ob = isPickedById ? (Movie) result.Result : (SearchContainer)result.Result; source = Tmdb.ExtractMoviesDetailsIntoListItem(ob); } catch (Exception) { - ob = (SearchContainer)result.Result; + ob = isPickedById ? (Collection) result.Result : (SearchContainer)result.Result; source = Tmdb.ExtractCollectionDetailsIntoListItem(ob); } } @@ -572,5 +575,21 @@ public static CultureInfo GetCultureInfoByLanguage(Languages language) return cultureInfo; } + + public static void SaveMediaInfo(int id, string mediaType, string folderPath) + { + var filePath = $@"{folderPath}\folicon.folicon"; + InIHelper.AddValue("ID", id.ToString(),null,filePath); + InIHelper.AddValue("MediaType", mediaType,null,filePath); + } + + public static (string ID, string MediaType) ReadMediaInfo(string folderPath) + { + var filePath = $@"{folderPath}\folicon.folicon"; + var id = File.Exists(filePath) ? InIHelper.ReadValue("ID", null, filePath) : null; + var mediaType = File.Exists(filePath) ? InIHelper.ReadValue("MediaType", null, filePath) : null; + var mediaInfo = (ID:id, MediaType:mediaType); + return mediaInfo; + } } } \ No newline at end of file diff --git a/FoliCon/ViewModels/MainWindowViewModel.cs b/FoliCon/ViewModels/MainWindowViewModel.cs index cd9242fe..090350b8 100644 --- a/FoliCon/ViewModels/MainWindowViewModel.cs +++ b/FoliCon/ViewModels/MainWindowViewModel.cs @@ -300,17 +300,28 @@ private async System.Threading.Tasks.Task ProcessPosterModeAsync() // TODO: Set cursor to WAIT. var isAutoPicked = false; var searchTitle = TitleCleaner.Clean(itemTitle); - var response = SearchMode == "Game" - ? await _igdbObject.SearchGameAsync(searchTitle) - : await _tmdbObject.SearchAsync(searchTitle, SearchMode); - int resultCount = SearchMode == "Game" ? response.Result.Length : response.Result.TotalResults; + var (id, mediaType) = Util.ReadMediaInfo(fullFolderPath); + var isPickedById = false; + ResultResponse response; + if (id != null && mediaType != null ) + { + isPickedById = true; + response = mediaType == "Game" ? await _igdbObject.SearchGameByIdAsync(id) : _tmdbObject.SearchByIdAsync(int.Parse(id), mediaType); + } + else + { + response = SearchMode == "Game" + ? await _igdbObject.SearchGameAsync(searchTitle) + : await _tmdbObject.SearchAsync(searchTitle, SearchMode); + } + int resultCount = isPickedById ? response.Result != null ? 1 : 0 : SearchMode == "Game" ? response.Result.Length : response.Result.TotalResults; switch (resultCount) { case 0: MessageBox.Show(CustomMessageBox.Info(LangProvider.GetLang("NothingFoundFor").Format(itemTitle), LangProvider.GetLang("NoResultFound"))); _dialogService.ShowSearchResult(SearchMode, searchTitle, fullFolderPath, response, - _tmdbObject, _igdbObject, + _tmdbObject, _igdbObject,isPickedById, r => { dialogResult = r.Result switch @@ -328,23 +339,27 @@ private async System.Threading.Tasks.Task ProcessPosterModeAsync() { if (SearchMode == "Game") { - _igdbObject.ResultPicked(response.Result[0], fullFolderPath); + var result = isPickedById + ? response.Result + : response.Result[0]; + _igdbObject.ResultPicked(result, fullFolderPath); } else { - _tmdbObject.ResultPicked(response.Result.Results[0], response.MediaType, - fullFolderPath); + var result = isPickedById + ? response.Result + : response.Result.Results[0]; + _tmdbObject.ResultPicked(result, response.MediaType, + fullFolderPath, "", isPickedById); } isAutoPicked = true; } catch (Exception ex) { - if (ex.Message == "NoPoster") - { - MessageBox.Show(CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), itemTitle)); - } - + MessageBox.Show(ex.Message == "NoPoster" + ? CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), itemTitle) + : CustomMessageBox.Warning(ex.Message, LangProvider.GetLang("ExceptionOccurred"))); isAutoPicked = false; } @@ -357,7 +372,7 @@ private async System.Threading.Tasks.Task ProcessPosterModeAsync() if (IsPosterWindowShown || !IsSkipAmbiguous) { _dialogService.ShowSearchResult(SearchMode, searchTitle, fullFolderPath, - response, _tmdbObject, _igdbObject, + response, _tmdbObject, _igdbObject, isPickedById, r => { dialogResult = r.Result switch diff --git a/FoliCon/ViewModels/PosterPickerViewModel.cs b/FoliCon/ViewModels/PosterPickerViewModel.cs index b058c954..596137da 100644 --- a/FoliCon/ViewModels/PosterPickerViewModel.cs +++ b/FoliCon/ViewModels/PosterPickerViewModel.cs @@ -9,8 +9,11 @@ using System.Collections.ObjectModel; using System.Globalization; using FoliCon.Properties.Langs; +using TMDbLib.Objects.Collections; using TMDbLib.Objects.General; +using TMDbLib.Objects.Movies; using TMDbLib.Objects.Search; +using TMDbLib.Objects.TvShows; namespace FoliCon.ViewModels { @@ -25,6 +28,7 @@ public class PosterPickerViewModel : BindableBase, IDialogAware public event Action RequestClose; private ResultResponse _result; private int _totalPosters; + private bool _isPickedById; #endregion #region Properties @@ -82,26 +86,27 @@ public void OnDialogOpened(IDialogParameters parameters) PickedIndex = parameters.GetValue("pickedIndex"); TmdbObject = parameters.GetValue("tmdbObject"); resultList = parameters.GetValue>("resultList"); - LoadData(Result.Result.Results[PickedIndex], Result.MediaType); + _isPickedById = parameters.GetValue("isPickedById"); + LoadData(_isPickedById ? Result.Result : Result.Result.Results[PickedIndex], Result.MediaType); } public void LoadData(dynamic result, string resultType) { ImagesWithId images = new(); if (resultType == MediaTypes.Tv) { - var pickedResult = (SearchTv)result; + dynamic pickedResult = _isPickedById ? (TvShow)result : (SearchTv)result; Title = pickedResult.Name; images = TmdbObject.SearchTvImages(pickedResult.Id); } else if (resultType == MediaTypes.Movie) { - var pickedResult = (SearchMovie)result; + dynamic pickedResult = _isPickedById ? (Movie)result : (SearchMovie)result; Title = pickedResult.Title; images = TmdbObject.SearchMovieImages(pickedResult.Id); } else if (resultType == MediaTypes.Collection) { - var pickedResult = (SearchCollection)result; + dynamic pickedResult = _isPickedById ? (Collection)result : (SearchCollection)result; Title = pickedResult.Name; images = TmdbObject.SearchCollectionImages(pickedResult.Id); } @@ -166,7 +171,8 @@ private async void LoadImages(ImagesWithId images) private void PickMethod(object parameter) { var link = (string)parameter; - Result.Result.Results[PickedIndex].PosterPath = link; + var result = _isPickedById ? Result.Result : Result.Result.Results[PickedIndex]; + result.PosterPath = link; resultList[PickedIndex].Poster = link; CloseDialog("true"); } diff --git a/FoliCon/ViewModels/SearchResultViewModel.cs b/FoliCon/ViewModels/SearchResultViewModel.cs index f2d2b520..76de1c98 100644 --- a/FoliCon/ViewModels/SearchResultViewModel.cs +++ b/FoliCon/ViewModels/SearchResultViewModel.cs @@ -29,7 +29,7 @@ public class SearchResultViewModel : BindableBase, IDialogAware private string _fullFolderPath; private readonly IDialogService _dialogService; private bool _isSearchFocused; - + private bool _isPickedById; public event Action RequestClose; private Tmdb _tmdbObject; @@ -114,6 +114,7 @@ public virtual void OnDialogOpened(IDialogParameters parameters) _tmdbObject = parameters.GetValue("tmdbObject"); _igdbObject = parameters.GetValue("igdbObject"); _fullFolderPath = parameters.GetValue("folderpath"); + _isPickedById = parameters.GetValue("isPickedById"); LoadData(SearchTitle); } @@ -140,10 +141,10 @@ private async void StartSearch(bool useBusy) private void LoadData(string searchTitle) { if (SearchResult != null - && (SearchMode == "Game" ? SearchResult.Result.Length : SearchResult.Result.TotalResults) != null - && (SearchMode == "Game" ? SearchResult?.Result.Length : SearchResult?.Result.TotalResults) != 0) + && (_isPickedById ? SearchResult.Result != null ? 1 : null : SearchMode == "Game" ? SearchResult.Result.Length : SearchResult.Result.TotalResults) != null + && (_isPickedById ? SearchResult.Result != null ? 1 : 0 : SearchMode == "Game" ? SearchResult?.Result?.Length : SearchResult?.Result?.TotalResults) != 0) { - ResultListViewData.Data = Util.FetchAndAddDetailsToListView(SearchResult, searchTitle); + ResultListViewData.Data = Util.FetchAndAddDetailsToListView(SearchResult, searchTitle,_isPickedById); if (ResultListViewData.Data.Count != 0) ResultListViewData.SelectedItem = ResultListViewData.Data[0]; } @@ -204,7 +205,7 @@ private void MouseDoubleClick() { if (SearchMode != MediaTypes.Game) { - _dialogService.ShowPosterPicker(_tmdbObject, SearchResult, pickedIndex, ResultListViewData.Data, r => { }); + _dialogService.ShowPosterPicker(_tmdbObject, SearchResult, pickedIndex, ResultListViewData.Data,_isPickedById, r => { }); } } catch (Exception ex)