af1152b001
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
// <copyright file="TmdbController.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace MediaBrowser.Providers.Plugins.Tmdb.Api
|
|
{
|
|
using System.Net.Mime;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using TMDbLib.Objects.General;
|
|
|
|
/// <summary>
|
|
/// The TMDb API controller.
|
|
/// </summary>
|
|
[ApiController]
|
|
[Authorize]
|
|
[Route("[controller]")]
|
|
[Produces(MediaTypeNames.Application.Json)]
|
|
public class TmdbController : ControllerBase
|
|
{
|
|
private readonly TmdbClientManager _tmdbClientManager;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="TmdbController"/> class.
|
|
/// </summary>
|
|
/// <param name="tmdbClientManager">The TMDb client manager.</param>
|
|
public TmdbController(TmdbClientManager tmdbClientManager)
|
|
{
|
|
_tmdbClientManager = tmdbClientManager;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the TMDb image configuration options.
|
|
/// </summary>
|
|
/// <returns>The image portion of the TMDb client configuration.</returns>
|
|
[HttpGet("ClientConfiguration")]
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
public async Task<ConfigImageTypes> TmdbClientConfiguration()
|
|
{
|
|
return (await _tmdbClientManager.GetClientConfiguration().ConfigureAwait(false)).Images;
|
|
}
|
|
}
|
|
}
|