Ejemplo n.º 1
0
        public bool TryAddDvrEntry(AddDvrEntryData data, out long dvrEntryId)
        {
            MessageBase res = client.Send(data);

            dvrEntryId = res.Get <long?>("id").GetValueOrDefault(0);
            return(res.Get <long?>("success").GetValueOrDefault(0) == 1);
        }
Ejemplo n.º 2
0
        private bool End(long id, string method)
        {
            dynamic message = new MessageBase(method);

            message.id = id;
            MessageBase res = client.Send(message);

            return(res.Get <long?>("success").GetValueOrDefault(0) == 1);
        }
Ejemplo n.º 3
0
        protected override void UpdateInternal(MessageBase d)
        {
            ChannelId   = d.Get("channelId", ChannelId);
            Title       = d.Get("title", Title);
            Description = d.Get("description", Description);
            Summary     = d.Get("summary", Summary);
            var start = d.Get <long?>("start");

            if (start.HasValue)
            {
                Start = start.Value.FromUnixTimestamp();
            }
            var stop = d.Get <long?>("stop");

            if (stop.HasValue)
            {
                Stop = stop.Value.FromUnixTimestamp();
            }
            ContentTypeId = d.Get("contentType", ContentTypeId);
            NextEventId   = d.Get("nextEventId", NextEventId);
        }
Ejemplo n.º 4
0
        public bool TryUpdateDvrEntry(UpdateDvrEntryData data)
        {
            MessageBase res = client.Send(data);

            return(res.Get <long?>("success").GetValueOrDefault(0) == 1);
        }
Ejemplo n.º 5
0
        protected override void UpdateInternal(MessageBase data)
        {
            Title = data.Get <string>("title", Title);
            var en = data.Get <long?>("enabled");

            if (en.HasValue)
            {
                Enabled = en.GetValueOrDefault(0) == 1;
            }
            Name      = data.Get <string>("name", Name);
            ChannelId = data.Get <long>("channel", ChannelId);
            var dw = data.Get <long?>("daysOfWeek");

            if (dw.HasValue)
            {
                DaysOfWeek = (DaysOfWeek)dw.Value;
            }

            Stop            = data.Get("stop", Stop);
            Start           = data.Get("start", Start);
            Retention       = data.Get("retention", Retention);
            Directory       = data.Get("directory", Directory);
            ConfigurationId = data.Get("configName", ConfigurationId);
            Priority        = data.Get("priority", Priority);
        }
Ejemplo n.º 6
0
 protected override string ExtractId(MessageBase msg)
 {
     return(msg.Get <string>("id"));
 }