< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Providers.ExternalIdInfo
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Providers/ExternalIdInfo.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 56
Line coverage: 100%
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%11100%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Providers/ExternalIdInfo.cs

#LineLine coverage
 1using System;
 2
 3namespace MediaBrowser.Model.Providers
 4{
 5    /// <summary>
 6    /// Represents the external id information for serialization to the client.
 7    /// </summary>
 8    public class ExternalIdInfo
 9    {
 10        /// <summary>
 11        /// Initializes a new instance of the <see cref="ExternalIdInfo"/> class.
 12        /// </summary>
 13        /// <param name="name">Name of the external id provider (IE: IMDB, MusicBrainz, etc).</param>
 14        /// <param name="key">Key for this id. This key should be unique across all providers.</param>
 15        /// <param name="type">Specific media type for this id.</param>
 16        /// <param name="urlFormatString">URL format string.</param>
 17        public ExternalIdInfo(string name, string key, ExternalIdMediaType? type, string? urlFormatString)
 18        {
 1919            Name = name;
 1920            Key = key;
 1921            Type = type;
 22#pragma warning disable CS0618 // Type or member is obsolete - Remove 10.11
 1923            UrlFormatString = urlFormatString;
 24#pragma warning restore CS0618 // Type or member is obsolete
 1925        }
 26
 27        /// <summary>
 28        /// Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc).
 29        /// </summary>
 30        // TODO: This should be renamed to ProviderName
 31        public string Name { get; set; }
 32
 33        /// <summary>
 34        /// Gets or sets the unique key for this id. This key should be unique across all providers.
 35        /// </summary>
 36        // TODO: This property is not actually unique across the concrete types at the moment. It should be updated to b
 37        public string Key { get; set; }
 38
 39        /// <summary>
 40        /// Gets or sets the specific media type for this id. This is used to distinguish between the different
 41        /// external id types for providers with multiple ids.
 42        /// A null value indicates there is no specific media type associated with the external id, or this is the
 43        /// default id for the external provider so there is no need to specify a type.
 44        /// </summary>
 45        /// <remarks>
 46        /// This can be used along with the <see cref="Name"/> to localize the external id on the client.
 47        /// </remarks>
 48        public ExternalIdMediaType? Type { get; set; }
 49
 50        /// <summary>
 51        /// Gets or sets the URL format string.
 52        /// </summary>
 53        [Obsolete("Obsolete in 10.10, to be removed in 10.11")]
 54        public string? UrlFormatString { get; set; }
 55    }
 56}