2021-10-06 09:30:45 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|
|
|
{
|
|
|
|
public class HdHomerunChannelCommands : IHdHomerunChannelCommands
|
|
|
|
{
|
|
|
|
private string? _channel;
|
|
|
|
private string? _profile;
|
|
|
|
|
|
|
|
public HdHomerunChannelCommands(string? channel, string? profile)
|
|
|
|
{
|
|
|
|
_channel = channel;
|
|
|
|
_profile = profile;
|
|
|
|
}
|
|
|
|
|
2021-12-24 21:18:24 +00:00
|
|
|
public IEnumerable<(string CommandName, string CommandValue)> GetCommands()
|
2021-10-06 09:30:45 +00:00
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(_channel))
|
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(_profile)
|
|
|
|
&& !string.Equals(_profile, "native", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
yield return ("vchannel", $"{_channel} transcode={_profile}");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
yield return ("vchannel", _channel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|