< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Movies.ImdbExternalId
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Movies/ImdbExternalId.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 39
Line coverage: 85.7%
Branch coverage
50%
Covered branches: 6
Total branches: 12
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
get_ProviderName()100%11100%
get_Key()100%11100%
get_Type()100%11100%
get_UrlFormatString()100%11100%
Supports(...)50%17.341266.66%

File(s)

/srv/git/jellyfin/MediaBrowser.Providers/Movies/ImdbExternalId.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using MediaBrowser.Controller.Entities;
 4using MediaBrowser.Controller.Entities.Movies;
 5using MediaBrowser.Controller.Entities.TV;
 6using MediaBrowser.Controller.LiveTv;
 7using MediaBrowser.Controller.Providers;
 8using MediaBrowser.Model.Entities;
 9using MediaBrowser.Model.Providers;
 10
 11namespace MediaBrowser.Providers.Movies
 12{
 13    public class ImdbExternalId : IExternalId
 14    {
 15        /// <inheritdoc />
 2816        public string ProviderName => "IMDb";
 17
 18        /// <inheritdoc />
 619        public string Key => MetadataProvider.Imdb.ToString();
 20
 21        /// <inheritdoc />
 622        public ExternalIdMediaType? Type => null;
 23
 24        /// <inheritdoc />
 625        public string UrlFormatString => "https://www.imdb.com/title/{0}";
 26
 27        /// <inheritdoc />
 28        public bool Supports(IHasProviderIds item)
 29        {
 30            // Supports images for tv movies
 1131            if (item is LiveTvProgram tvProgram && tvProgram.IsMovie)
 32            {
 033                return true;
 34            }
 35
 1136            return item is Movie || item is MusicVideo || item is Series || item is Episode || item is Trailer;
 37        }
 38    }
 39}