< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Plugins.Tmdb.Movies.TmdbMovieExternalId
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs
Line coverage
50%
Covered lines: 3
Uncovered lines: 3
Coverable lines: 6
Total lines: 35
Line coverage: 50%
Branch coverage
0%
Covered branches: 0
Total branches: 4
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%2040%

File(s)

/srv/git/jellyfin/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs

#LineLine coverage
 1using MediaBrowser.Controller.Entities.Movies;
 2using MediaBrowser.Controller.LiveTv;
 3using MediaBrowser.Controller.Providers;
 4using MediaBrowser.Model.Entities;
 5using MediaBrowser.Model.Providers;
 6
 7namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
 8{
 9    /// <summary>
 10    /// External id for a TMDb movie.
 11    /// </summary>
 12    public class TmdbMovieExternalId : IExternalId
 13    {
 14        /// <inheritdoc />
 2915        public string ProviderName => TmdbUtils.ProviderName;
 16
 17        /// <inheritdoc />
 818        public string Key => MetadataProvider.Tmdb.ToString();
 19
 20        /// <inheritdoc />
 821        public ExternalIdMediaType? Type => ExternalIdMediaType.Movie;
 22
 23        /// <inheritdoc />
 24        public bool Supports(IHasProviderIds item)
 25        {
 26            // Supports images for tv movies
 027            if (item is LiveTvProgram tvProgram && tvProgram.IsMovie)
 28            {
 029                return true;
 30            }
 31
 032            return item is Movie;
 33        }
 34    }
 35}