public WebProgram(Program prog) { this.classification = prog.Classification; this.description = prog.Description; this.endTime = prog.EndTime; this.episodeName = prog.EpisodeName; this.episodeNum = prog.EpisodeNum; this.episodeNumber = prog.EpisodeNumber; this.episodePart = prog.EpisodePart; this.genre = prog.Genre; this.idChannel = prog.IdChannel; this.idProgram = prog.IdProgram; this.originalAirDate = prog.OriginalAirDate; this.parentalRating = prog.ParentalRating; this.seriesNum = prog.SeriesNum; this.starRating = prog.StarRating; this.startTime = prog.StartTime; this.Title = prog.Title; this.channelName = prog.ReferencedChannel().DisplayName; }
public void SetProperties(Schedule schedule, Program prog) { GUIPropertyManager.SetProperty("#TV.Scheduled.Title", String.Empty); GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", String.Empty); GUIPropertyManager.SetProperty("#TV.Scheduled.Time", String.Empty); GUIPropertyManager.SetProperty("#TV.Scheduled.Description", String.Empty); GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", String.Empty); GUIPropertyManager.SetProperty("#TV.Scheduled.Channel", String.Empty); string strTime = String.Format("{0} {1} - {2}", Utils.GetShortDayString(schedule.StartTime), schedule.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat), schedule.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat)); GUIPropertyManager.SetProperty("#TV.Scheduled.Title", prog.Title); GUIPropertyManager.SetProperty("#TV.Scheduled.Time", strTime); if (prog != null) { GUIPropertyManager.SetProperty("#TV.Scheduled.Channel", prog.ReferencedChannel().DisplayName); GUIPropertyManager.SetProperty("#TV.Scheduled.Description", prog.Description); GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", prog.Genre); } else { GUIPropertyManager.SetProperty("#TV.Scheduled.Description", String.Empty); GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", String.Empty); } string logo = Utils.GetCoverArt(Thumbs.TVChannel, schedule.ReferencedChannel().DisplayName); if (string.IsNullOrEmpty(logo)) { GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", "defaultVideoBig.png"); } else { GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", logo); } }