예제 #1
0
        /// <summary>
        /// Startet eine Aufzeichnung im VCR.NET auf dem aktuellen Sender.
        /// </summary>
        /// <param name="duration"></param>
        private void StartRecording(int duration)
        {
            // Read the status
            var status = VCRNETRestProxy.GetStatusSync(m_serverRoot, Profile);

            // Not connected to us
            if (!StringComparer.InvariantCultureIgnoreCase.Equals(status.target, Adaptor.Target))
            {
                return;
            }

            // Configure the new schedule
            var schedule =
                new VCRNETRestProxy.Schedule
            {
                lastDay    = new DateTime(2999, 12, 31),
                name       = "Gestartet vom DVB.NET Viewer",
                firstStart = DateTime.UtcNow,
                duration   = duration,
            };

            // Configure the new job
            var job = new VCRNETRestProxy.Job
            {
                sourceName    = CurrentSource.nameWithProvider,
                name          = "Manuelle Aufzeichnung",
                withSubtitles = true,
                withVideotext = true,
                includeDolby  = true,
                allLanguages  = true,
                device        = Profile,
            };

            // Send it
            VCRNETRestProxy.CreateNewSync(Adaptor.EndPoint, job, schedule);
        }