public GetProgramExists ( TvDatabase.Channel channel, System.DateTime startTime, System.DateTime endTime ) : IList |
||
channel | TvDatabase.Channel | |
startTime | System.DateTime | |
endTime | System.DateTime | |
return | IList |
private void OnGetIMDBInfo() { IMDBMovie movieDetails = new IMDBMovie(); movieDetails.SearchString = _currentProgram.Title; if (IMDBFetcher.GetInfoFromIMDB(this, ref movieDetails, false, false)) { TvBusinessLayer dbLayer = new TvBusinessLayer(); IList<Program> progs = dbLayer.GetProgramExists(Channel.Retrieve(_currentProgram.IdChannel), _currentProgram.StartTime, _currentProgram.EndTime); if (progs != null && progs.Count > 0) { Program prog = (Program)progs[0]; prog.Description = movieDetails.Plot; // prog.Genre = movieDetails.Genre; prog.StarRating = (int)movieDetails.Rating; prog.Persist(); } GUIVideoInfo videoInfo = (GUIVideoInfo)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_INFO); videoInfo.AllocResources(); videoInfo.Movie = movieDetails; GUIButtonControl btnPlay = (GUIButtonControl)videoInfo.GetControl(2); if (btnPlay != null) { btnPlay.Visible = false; } GUICheckButton btnCast = (GUICheckButton)videoInfo.GetControl(4); if (btnCast != null) { btnCast.Visible = false; } GUICheckButton btnWatched = (GUICheckButton)videoInfo.GetControl(6); if (btnWatched != null) { btnWatched.Visible = false; } GUIWindowManager.ActivateWindow((int)Window.WINDOW_VIDEO_INFO); } else { Log.Info("IMDB Fetcher: Nothing found"); } }