< Summary - Jellyfin

Information
Class: MediaBrowser.Model.MediaInfo.AudioCodec
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/MediaInfo/AudioCodec.cs
Line coverage
55%
Covered lines: 5
Uncovered lines: 4
Coverable lines: 9
Total lines: 34
Line coverage: 55.5%
Branch coverage
50%
Covered branches: 4
Total branches: 8
Branch coverage: 50%
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
GetFriendlyName(...)50%13.62855.55%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/MediaInfo/AudioCodec.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using System;
 4
 5namespace MediaBrowser.Model.MediaInfo
 6{
 7    public static class AudioCodec
 8    {
 9        public static string GetFriendlyName(string codec)
 10        {
 211            if (codec.Length == 0)
 12            {
 013                return codec;
 14            }
 15
 216            if (string.Equals(codec, "ac3", StringComparison.OrdinalIgnoreCase))
 17            {
 018                return "Dolby Digital";
 19            }
 20
 221            if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase))
 22            {
 023                return "Dolby Digital+";
 24            }
 25
 226            if (string.Equals(codec, "dca", StringComparison.OrdinalIgnoreCase))
 27            {
 028                return "DTS";
 29            }
 30
 231            return codec.ToUpperInvariant();
 32        }
 33    }
 34}

Methods/Properties

GetFriendlyName(System.String)