示例#1
0
        private void AddTimeshiftContext(LiveTvMediaItem timeshiftMediaItem, IChannel channel)
        {
            IProgram         program   = GetCurrentProgram(channel);
            TimeshiftContext tsContext = new TimeshiftContext
            {
                Channel    = channel,
                Program    = program,
                TuneInTime = DateTime.Now
            };

            int tc = timeshiftMediaItem.TimeshiftContexes.Count;

            if (tc > 0)
            {
                ITimeshiftContext lastContext = timeshiftMediaItem.TimeshiftContexes[tc - 1];
                lastContext.TimeshiftDuration = DateTime.Now - lastContext.TuneInTime;
            }
            timeshiftMediaItem.TimeshiftContexes.Add(tsContext);
        }
示例#2
0
    private void AddTimeshiftContext(LiveTvMediaItem timeshiftMediaItem, IChannel channel)
    {
      IProgram program = GetCurrentProgram(channel);
      TimeshiftContext tsContext = new TimeshiftContext
                                     {
                                       Channel = channel,
                                       Program = program,
                                       TuneInTime = DateTime.Now
                                     };

      int tc = timeshiftMediaItem.TimeshiftContexes.Count;
      if (tc > 0)
      {
        ITimeshiftContext lastContext = timeshiftMediaItem.TimeshiftContexes[tc - 1];
        lastContext.TimeshiftDuration = DateTime.Now - lastContext.TuneInTime;
      }
      timeshiftMediaItem.TimeshiftContexes.Add(tsContext);
    }