< Summary - Jellyfin

Information
Class: Jellyfin.LiveTv.TunerHosts.HdHomerun.HdHomerunChannelCommands
Assembly: Jellyfin.LiveTv
File(s): /srv/git/jellyfin/src/Jellyfin.LiveTv/TunerHosts/HdHomerun/HdHomerunChannelCommands.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 35
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%

File(s)

/srv/git/jellyfin/src/Jellyfin.LiveTv/TunerHosts/HdHomerun/HdHomerunChannelCommands.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using System;
 4using System.Collections.Generic;
 5
 6namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
 7{
 8    public class HdHomerunChannelCommands : IHdHomerunChannelCommands
 9    {
 10        private string? _channel;
 11        private string? _profile;
 12
 13        public HdHomerunChannelCommands(string? channel, string? profile)
 14        {
 015            _channel = channel;
 016            _profile = profile;
 017        }
 18
 19        public IEnumerable<(string CommandName, string CommandValue)> GetCommands()
 20        {
 21            if (!string.IsNullOrEmpty(_channel))
 22            {
 23                if (!string.IsNullOrEmpty(_profile)
 24                    && !string.Equals(_profile, "native", StringComparison.OrdinalIgnoreCase))
 25                {
 26                    yield return ("vchannel", $"{_channel} transcode={_profile}");
 27                }
 28                else
 29                {
 30                    yield return ("vchannel", _channel);
 31                }
 32            }
 33        }
 34    }
 35}