示例#1
0
        public static TVProgramme TVProgramme(this RPRecording rpr)
        {
            if (rpr.RequestType != RPRequestTypes.Manual)
            {
                return(mcData.GetTVProgramme(rpr.TVProgrammeID.ToString()));
            }

            // Manual recording is a special case
            TVProgramme tvp = new TVProgramme();

            tvp.Title     = rpr.Title;
            tvp.ServiceID = rpr.ManualRecordingServiceID.ToString();
            tvp.StartTime = rpr.ManualRecordingStartTime.Ticks;
            tvp.StopTime  = tvp.StartTime + (TimeSpan.FromSeconds(rpr.ManualRecordingDuration).Ticks);
            tvp.Id        = "-10";
            return(tvp);
        } // Recording => TV Programme
示例#2
0
        } // Request => Recordings  (from which you can get the tv progs)

        public static RPRequest Request(this RPRecording rpr) // Recording => Request  (linked by ID)
        {
            return(mcData.GetRPRequestWithID(rpr.RPRequestID));
        }
示例#3
0
 // Extension methods as helpers, e.g. bools
 public static bool IsRecurring(this RPRecording rec)
 {
     return((rec.RequestType == RPRequestTypes.Series) || (rec.RequestType == RPRequestTypes.Keyword));
 }