< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Movies.ImdbExternalId
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Movies/ImdbExternalId.cs
Line coverage
50%
Covered lines: 3
Uncovered lines: 3
Coverable lines: 6
Total lines: 36
Line coverage: 50%
Branch coverage
0%
Covered branches: 0
Total branches: 12
Branch coverage: 0%
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%
Supports(...)0%156120%

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 />
 2716        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 />
 25        public bool Supports(IHasProviderIds item)
 26        {
 27            // Supports images for tv movies
 028            if (item is LiveTvProgram tvProgram && tvProgram.IsMovie)
 29            {
 030                return true;
 31            }
 32
 033            return item is Movie || item is MusicVideo || item is Series || item is Episode || item is Trailer;
 34        }
 35    }
 36}