void OnSearchResultSelected(GUIListItem item, GUIControl parent) { TorrentMatch selectedmatch = item.AlbumInfoTag as TorrentMatch; Thread backdrop = new Thread(delegate() { if (!string.IsNullOrEmpty(selectedmatch.tvdb)) { TraktShow show = TraktAPI.SeriesOverview(selectedmatch.tvdb); if (!string.IsNullOrEmpty(show.Title)) { GUIPropertyManager.SetProperty("#MyTorrents.Backdrop", show.Images.Fanart); GUIPropertyManager.SetProperty("#MyTorrents.Poster", show.Images.Poster); GUIPropertyManager.SetProperty("#MyTorrents.Title", show.Title); GUIPropertyManager.SetProperty("#MyTorrents.Year", show.Year.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.Summary", show.Overview); GUIPropertyManager.SetProperty("#MyTorrents.Runtime", show.Runtime.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.Certification", show.Certification); GUIPropertyManager.SetProperty("#MyTorrents.Rating", show.Rating); } } else if (!string.IsNullOrEmpty(selectedmatch.imdb)) { TraktMovie movie = TraktAPI.MovieOverview("tt" + Convert.ToInt32(selectedmatch.imdb).ToString("0000000")); if (!string.IsNullOrEmpty(movie.Title)) { GUIPropertyManager.SetProperty("#MyTorrents.Backdrop", movie.Images.Fanart); GUIPropertyManager.SetProperty("#MyTorrents.Poster", movie.Images.Poster); GUIPropertyManager.SetProperty("#MyTorrents.Title", movie.Title); GUIPropertyManager.SetProperty("#MyTorrents.Year", movie.Year); GUIPropertyManager.SetProperty("#MyTorrents.Summary", movie.Overview); GUIPropertyManager.SetProperty("#MyTorrents.Runtime", movie.Runtime.ToString()); GUIPropertyManager.SetProperty("#MyTorrents.Certification", movie.Certification); GUIPropertyManager.SetProperty("#MyTorrents.Rating", movie.Rating); GUIPropertyManager.SetProperty("#MyTorrents.Trailer", movie.Trailer); } } else { GUIPropertyManager.SetProperty("#MyTorrents.Backdrop", ""); GUIPropertyManager.SetProperty("#MyTorrents.Poster", ""); GUIPropertyManager.SetProperty("#MyTorrents.Title", ""); GUIPropertyManager.SetProperty("#MyTorrents.Year", ""); GUIPropertyManager.SetProperty("#MyTorrents.Summary", ""); GUIPropertyManager.SetProperty("#MyTorrents.Runtime", ""); GUIPropertyManager.SetProperty("#MyTorrents.Certification", ""); GUIPropertyManager.SetProperty("#MyTorrents.Rating", ""); } }) { IsBackground = true, Name = "MyTorrent Backdrop Lookup" }; backdrop.Start(); }