Beispiel #1
0
        internal static bool HasUpcomingProgram(Guid channelId, GuideProgram program, out UpcomingProgram upcomingProgram, ScheduleType scheduleType)
        {
            upcomingProgram = null;
            Guid upcomingProgramId = program.GetUniqueUpcomingProgramId(channelId);

            List<UpcomingProgram> upcomingPrograms = Proxies.SchedulerService.GetAllUpcomingPrograms(scheduleType, true).Result;
            foreach (UpcomingProgram upcoming in upcomingPrograms)
            {
                if (upcoming.UpcomingProgramId == upcomingProgramId)
                {
                    upcomingProgram = upcoming;
                    return true;
                }
            }
            return false;
        }
Beispiel #2
0
        internal static bool HasUpcomingRecording(Guid channelId, GuideProgram program, out UpcomingRecording upcomingRecording)
        {
            upcomingRecording = null;
            Guid upcomingProgramId = program.GetUniqueUpcomingProgramId(channelId);

            var upcomingRecordings = Proxies.ControlService.GetAllUpcomingRecordings(UpcomingRecordingsFilter.All, true).Result;
            foreach (UpcomingRecording recording in upcomingRecordings)
            {
                if (recording.Program.UpcomingProgramId == upcomingProgramId)
                {
                    upcomingRecording = recording;
                    return true;
                }
            }
            return false;
        }
        internal static bool HasUpcomingProgram(Guid channelId, GuideProgram program, out UpcomingProgram upcomingProgram, ScheduleType scheduleType)
        {
            using (SchedulerServiceAgent SchedulerAgent = new SchedulerServiceAgent())
            {
                upcomingProgram = null;
                Guid upcomingProgramId = program.GetUniqueUpcomingProgramId(channelId);

                List<UpcomingProgram> upcomingPrograms = new List<UpcomingProgram>(
                    SchedulerAgent.GetAllUpcomingPrograms(scheduleType, true));
                foreach (UpcomingProgram upcoming in upcomingPrograms)
                {
                    if (upcoming.UpcomingProgramId == upcomingProgramId)
                    {
                        upcomingProgram = upcoming;
                        return true;
                    }
                }
                return false;
            }
        }
        internal static bool HasUpcomingRecording(Guid channelId, GuideProgram program, out UpcomingRecording upcomingRecording)
        {
            using (ControlServiceAgent tvControlAgent = new ControlServiceAgent())
            {
                upcomingRecording = null;
                Guid upcomingProgramId = program.GetUniqueUpcomingProgramId(channelId);

                UpcomingRecording[] upcomingRecordings = tvControlAgent.GetAllUpcomingRecordings(UpcomingRecordingsFilter.All, true);
                foreach (UpcomingRecording recording in upcomingRecordings)
                {
                    if (recording.Program.UpcomingProgramId == upcomingProgramId)
                    {
                        upcomingRecording = recording;
                        return true;
                    }
                }
                return false;
            }
        }
Beispiel #5
0
        internal static bool IsActiveRecording(Guid channelId, GuideProgram guideProgram, out ActiveRecording activeRecording)
        {
            Guid upcomingProgramId = guideProgram.GetUniqueUpcomingProgramId(channelId);

            foreach (ActiveRecording recording in ActiveRecordings)
            {
                if (recording.Program.UpcomingProgramId == upcomingProgramId)
                {
                    activeRecording = recording;
                    return true;
                }
            }
            activeRecording = null;
            return false;
        }