private TvHeadendChannelInfo GetNameAndUrl(Mux mux) { return(new TvHeadendChannelInfo { Name = mux.Services.FirstOrDefault()?.svcname ?? mux.iptv_muxname, Url = mux.iptv_url, UUID = mux.uuid }); }
private Mux CreateMux(string name) { _logger.InfoFormat("Create new TVH mux with service for {0}", name); var mux = new Mux { network_uuid = DefaultNetwork.uuid }; DefaultNetwork.Muxes.Add(mux); return(mux); }
public void AddChannel(int number, string name, string url, bool epg) { var mux = new Mux { network_uuid = DefaultNetwork.uuid, enabled = true, epg = epg ? 1 : 0, iptv_url = url, iptv_atsc = false, iptv_muxname = name, channel_number = number, iptv_sname = name }; mux.CreateOnTvh(_communicationFactory()); _logger.Info($"TODO: Add channel '{number}: {name}' with url '{url}' to TvHeadend"); }