< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.Plugins.Tmdb.Api.TmdbController
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 41
Line coverage: 0%
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%210%

File(s)

/srv/git/jellyfin/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs

#LineLine coverage
 1using System.Net.Mime;
 2using System.Threading.Tasks;
 3using Microsoft.AspNetCore.Authorization;
 4using Microsoft.AspNetCore.Http;
 5using Microsoft.AspNetCore.Mvc;
 6using TMDbLib.Objects.General;
 7
 8namespace MediaBrowser.Providers.Plugins.Tmdb.Api
 9{
 10    /// <summary>
 11    /// The TMDb API controller.
 12    /// </summary>
 13    [ApiController]
 14    [Authorize]
 15    [Route("[controller]")]
 16    [Produces(MediaTypeNames.Application.Json)]
 17    public class TmdbController : ControllerBase
 18    {
 19        private readonly TmdbClientManager _tmdbClientManager;
 20
 21        /// <summary>
 22        /// Initializes a new instance of the <see cref="TmdbController"/> class.
 23        /// </summary>
 24        /// <param name="tmdbClientManager">The TMDb client manager.</param>
 025        public TmdbController(TmdbClientManager tmdbClientManager)
 26        {
 027            _tmdbClientManager = tmdbClientManager;
 028        }
 29
 30        /// <summary>
 31        /// Gets the TMDb image configuration options.
 32        /// </summary>
 33        /// <returns>The image portion of the TMDb client configuration.</returns>
 34        [HttpGet("ClientConfiguration")]
 35        [ProducesResponseType(StatusCodes.Status200OK)]
 36        public async Task<ConfigImageTypes> TmdbClientConfiguration()
 37        {
 38            return (await _tmdbClientManager.GetClientConfiguration().ConfigureAwait(false)).Images;
 39        }
 40    }
 41}