Migrate to file-scoped namespaces

This commit is contained in:
Shadowghost 2023-01-31 12:18:10 +01:00
parent 58b3945805
commit f5f890e685
163 changed files with 23939 additions and 24102 deletions

View File

@ -2,8 +2,8 @@
using System;
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Internal produces image attribute.
/// </summary>
@ -27,4 +27,3 @@ namespace Jellyfin.Api.Attributes
/// <returns>the configured content types.</returns>
public string[] ContentTypes => _contentTypes;
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Produces file attribute of "image/*".
/// </summary>
@ -15,4 +15,3 @@
{
}
}
}

View File

@ -2,8 +2,8 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Routing;
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Identifies an action that supports the HTTP GET method.
/// </summary>
@ -27,4 +27,3 @@ namespace Jellyfin.Api.Attributes
: base(_supportedMethods, template)
=> ArgumentNullException.ThrowIfNull(template);
}
}

View File

@ -2,8 +2,8 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Routing;
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Identifies an action that supports the HTTP GET method.
/// </summary>
@ -27,4 +27,3 @@ namespace Jellyfin.Api.Attributes
: base(_supportedMethods, template)
=> ArgumentNullException.ThrowIfNull(template);
}
}

View File

@ -1,7 +1,7 @@
using System;
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Attribute to mark a parameter as obsolete.
/// </summary>
@ -9,4 +9,3 @@ namespace Jellyfin.Api.Attributes
public sealed class ParameterObsoleteAttribute : Attribute
{
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Produces file attribute of "image/*".
/// </summary>
@ -15,4 +15,3 @@
{
}
}
}

View File

@ -2,8 +2,8 @@
using System;
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Internal produces image attribute.
/// </summary>
@ -27,4 +27,3 @@ namespace Jellyfin.Api.Attributes
/// <returns>the configured content types.</returns>
public string[] ContentTypes => _contentTypes;
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Produces file attribute of "image/*".
/// </summary>
@ -15,4 +15,3 @@
{
}
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Produces file attribute of "image/*".
/// </summary>
@ -15,4 +15,3 @@
{
}
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Attributes
{
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Produces file attribute of "video/*".
/// </summary>
@ -15,4 +15,3 @@
{
}
}
}

View File

@ -4,8 +4,8 @@ using Jellyfin.Api.Results;
using Jellyfin.Extensions.Json;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api
{
namespace Jellyfin.Api;
/// <summary>
/// Base api controller for the API setting a default route.
/// </summary>
@ -35,4 +35,3 @@ namespace Jellyfin.Api
protected ActionResult<T> Ok<T>(T value)
=> new OkResult<T>(value);
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Constants
{
namespace Jellyfin.Api.Constants;
/// <summary>
/// Authentication schemes for user authentication in the API.
/// </summary>
@ -10,4 +10,3 @@ namespace Jellyfin.Api.Constants
/// </summary>
public const string CustomAuthentication = "CustomAuthentication";
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Constants
{
namespace Jellyfin.Api.Constants;
/// <summary>
/// Internal claim types for authorization.
/// </summary>
@ -40,4 +40,3 @@
/// </summary>
public const string IsApiKey = "Jellyfin-IsApiKey";
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Constants
{
namespace Jellyfin.Api.Constants;
/// <summary>
/// Policies for the API authorization.
/// </summary>
@ -75,4 +75,3 @@ namespace Jellyfin.Api.Constants
/// </summary>
public const string SyncPlayIsInGroup = "SyncPlayIsInGroup";
}
}

View File

@ -1,5 +1,5 @@
namespace Jellyfin.Api.Constants
{
namespace Jellyfin.Api.Constants;
/// <summary>
/// Constants for user roles used in the authentication and authorization for the API.
/// </summary>
@ -20,4 +20,3 @@ namespace Jellyfin.Api.Constants
/// </summary>
public const string Administrator = "Administrator";
}
}

View File

@ -8,8 +8,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Activity log controller.
/// </summary>
@ -54,4 +54,3 @@ namespace Jellyfin.Api.Controllers
}).ConfigureAwait(false);
}
}
}

View File

@ -7,8 +7,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Authentication controller.
/// </summary>
@ -73,4 +73,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -17,8 +17,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The artists controller.
/// </summary>
@ -477,4 +477,3 @@ namespace Jellyfin.Api.Controllers
return _dtoService.GetBaseItemDto(item, dtoOptions);
}
}
}

View File

@ -10,8 +10,8 @@ using MediaBrowser.Model.Dlna;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The audio controller.
/// </summary>
@ -361,4 +361,3 @@ namespace Jellyfin.Api.Controllers
return await _audioHelper.GetAudioStream(_transcodingJobType, streamingRequest).ConfigureAwait(false);
}
}
}

View File

@ -4,8 +4,8 @@ using MediaBrowser.Model.Branding;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Branding controller.
/// </summary>
@ -54,4 +54,3 @@ namespace Jellyfin.Api.Controllers
return options.CustomCss ?? string.Empty;
}
}
}

View File

@ -18,8 +18,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Channels Controller.
/// </summary>
@ -248,4 +248,3 @@ namespace Jellyfin.Api.Controllers
return await _channelManager.GetLatestChannelItems(query, CancellationToken.None).ConfigureAwait(false);
}
}
}

View File

@ -11,8 +11,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Client log controller.
/// </summary>
@ -78,4 +78,3 @@ namespace Jellyfin.Api.Controllers
return (clientName, clientVersion);
}
}
}

View File

@ -11,8 +11,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The collection controller.
/// </summary>
@ -108,4 +108,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -13,8 +13,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Configuration Controller.
/// </summary>
@ -133,4 +133,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The dashboard controller.
/// </summary>
@ -113,4 +113,3 @@ namespace Jellyfin.Api.Controllers
return _pluginManager.Plugins.SelectMany(GetPluginPages);
}
}
}

View File

@ -13,8 +13,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Devices Controller.
/// </summary>
@ -138,4 +138,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Display Preferences Controller.
/// </summary>
@ -211,4 +211,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -7,8 +7,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Dlna Controller.
/// </summary>
@ -130,4 +130,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Dlna Server Controller.
/// </summary>
@ -321,4 +321,3 @@ namespace Jellyfin.Api.Controllers
return dlnaEventManager.CancelEventSubscription(subscriptionId);
}
}
}

View File

@ -30,8 +30,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Dynamic hls controller.
/// </summary>
@ -2052,4 +2052,3 @@ namespace Jellyfin.Api.Controllers
}
}
}
}

View File

@ -12,8 +12,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Environment Controller.
/// </summary>
@ -194,4 +194,3 @@ namespace Jellyfin.Api.Controllers
return new DefaultDirectoryBrowserInfoDto();
}
}
}

View File

@ -12,8 +12,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Filters controller.
/// </summary>
@ -213,4 +213,3 @@ namespace Jellyfin.Api.Controllers
return filters;
}
}
}

View File

@ -18,8 +18,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Genre = MediaBrowser.Controller.Entities.Genre;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The genres controller.
/// </summary>
@ -208,4 +208,3 @@ namespace Jellyfin.Api.Controllers
return result;
}
}
}

View File

@ -15,8 +15,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The hls segment controller.
/// </summary>
@ -189,4 +189,3 @@ namespace Jellyfin.Api.Controllers
return FileStreamResponseHelpers.GetStaticFileResult(path, MimeTypes.GetMimeType(path));
}
}
}

View File

@ -30,8 +30,8 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Image controller.
/// </summary>
@ -2097,4 +2097,3 @@ namespace Jellyfin.Api.Controllers
return PhysicalFile(imagePath, imageContentType ?? MediaTypeNames.Text.Plain);
}
}
}

View File

@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The instant mix controller.
/// </summary>
@ -358,4 +358,3 @@ namespace Jellyfin.Api.Controllers
return result;
}
}
}

View File

@ -18,8 +18,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Item lookup controller.
/// </summary>
@ -271,4 +271,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -9,8 +9,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Item Refresh Controller.
/// </summary>
@ -83,4 +83,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Item update controller.
/// </summary>
@ -446,4 +446,3 @@ namespace Jellyfin.Api.Controllers
return list;
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The items controller.
/// </summary>
@ -870,4 +870,3 @@ namespace Jellyfin.Api.Controllers
returnItems);
}
}
}

View File

@ -37,8 +37,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Library Controller.
/// </summary>
@ -969,4 +969,3 @@ namespace Jellyfin.Api.Controllers
return metadataOptions.Any(i => !i.DisabledImageFetchers.Contains(name, StringComparison.OrdinalIgnoreCase));
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The library structure controller.
/// </summary>
@ -324,4 +324,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -35,8 +35,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Live tv controller.
/// </summary>
@ -1231,4 +1231,3 @@ namespace Jellyfin.Api.Controllers
}
}
}
}

View File

@ -6,8 +6,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Localization controller.
/// </summary>
@ -73,4 +73,3 @@ namespace Jellyfin.Api.Controllers
return Ok(_localization.GetLocalizationOptions());
}
}
}

View File

@ -19,8 +19,8 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The media info controller.
/// </summary>
@ -310,4 +310,3 @@ namespace Jellyfin.Api.Controllers
}
}
}
}

View File

@ -18,8 +18,8 @@ using MediaBrowser.Model.Querying;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Movies controller.
/// </summary>
@ -323,4 +323,3 @@ namespace Jellyfin.Api.Controllers
.DistinctNames();
}
}
}

View File

@ -18,8 +18,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The music genres controller.
/// </summary>
@ -195,4 +195,3 @@ namespace Jellyfin.Api.Controllers
return result;
}
}
}

View File

@ -11,8 +11,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Package Controller.
/// </summary>
@ -164,4 +164,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -15,8 +15,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Persons controller.
/// </summary>
@ -136,4 +136,3 @@ namespace Jellyfin.Api.Controllers
return _dtoService.GetBaseItemDto(item, dtoOptions);
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Playlists controller.
/// </summary>
@ -218,4 +218,3 @@ namespace Jellyfin.Api.Controllers
return result;
}
}
}

View File

@ -17,8 +17,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Playstate controller.
/// </summary>
@ -379,4 +379,3 @@ namespace Jellyfin.Api.Controllers
return method;
}
}
}

View File

@ -17,8 +17,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Plugins controller.
/// </summary>
@ -263,4 +263,3 @@ namespace Jellyfin.Api.Controllers
return NotFound();
}
}
}

View File

@ -13,8 +13,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Quick connect controller.
/// </summary>
@ -135,4 +135,3 @@ namespace Jellyfin.Api.Controllers
}
}
}
}

View File

@ -15,8 +15,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Remote Images Controller.
/// </summary>
@ -176,4 +176,3 @@ namespace Jellyfin.Api.Controllers
return Path.Combine(_applicationPaths.CachePath, "remote-images", filename.Substring(0, 1), filename);
}
}
}

View File

@ -8,8 +8,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Scheduled Tasks Controller.
/// </summary>
@ -158,4 +158,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Search controller.
/// </summary>
@ -263,4 +263,3 @@ namespace Jellyfin.Api.Controllers
return item.GetParents().OfType<T>().FirstOrDefault(i => i.HasImage(type));
}
}
}

View File

@ -19,8 +19,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The session controller.
/// </summary>
@ -495,4 +495,3 @@ namespace Jellyfin.Api.Controllers
return _userManager.GetPasswordResetProviders();
}
}
}

View File

@ -10,8 +10,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The startup wizard controller.
/// </summary>
@ -147,4 +147,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Studios controller.
/// </summary>
@ -153,4 +153,3 @@ namespace Jellyfin.Api.Controllers
return _dtoService.GetBaseItemDto(item, dtoOptions);
}
}
}

View File

@ -30,8 +30,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Subtitle controller.
/// </summary>
@ -548,4 +548,3 @@ namespace Jellyfin.Api.Controllers
return Ok();
}
}
}

View File

@ -13,8 +13,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The suggestions controller.
/// </summary>
@ -89,4 +89,3 @@ namespace Jellyfin.Api.Controllers
dtoList);
}
}
}

View File

@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The sync play controller.
/// </summary>
@ -421,4 +421,3 @@ namespace Jellyfin.Api.Controllers
return NoContent();
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The system controller.
/// </summary>
@ -220,4 +220,3 @@ namespace Jellyfin.Api.Controllers
return Ok(result);
}
}
}

View File

@ -3,8 +3,8 @@ using MediaBrowser.Model.SyncPlay;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The time sync controller.
/// </summary>
@ -31,4 +31,3 @@ namespace Jellyfin.Api.Controllers
return new UtcTimeResponse(requestReceptionTime, responseTransmissionTime);
}
}
}

View File

@ -10,8 +10,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The trailers controller.
/// </summary>
@ -296,4 +296,3 @@ namespace Jellyfin.Api.Controllers
enableImages);
}
}
}

View File

@ -19,8 +19,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The tv shows controller.
/// </summary>
@ -381,4 +381,3 @@ namespace Jellyfin.Api.Controllers
return items;
}
}
}

View File

@ -20,8 +20,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The universal audio controller.
/// </summary>
@ -337,4 +337,3 @@ namespace Jellyfin.Api.Controllers
return deviceProfile;
}
}
}

View File

@ -25,8 +25,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// User controller.
/// </summary>
@ -585,4 +585,3 @@ namespace Jellyfin.Api.Controllers
return result;
}
}
}

View File

@ -23,8 +23,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// User library controller.
/// </summary>
@ -425,4 +425,3 @@ namespace Jellyfin.Api.Controllers
return NotFound();
}
}
}

View File

@ -17,8 +17,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// User views controller.
/// </summary>
@ -135,4 +135,3 @@ namespace Jellyfin.Api.Controllers
.AsEnumerable());
}
}
}

View File

@ -10,8 +10,8 @@ using MediaBrowser.Controller.MediaEncoding;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Attachments controller.
/// </summary>
@ -79,4 +79,3 @@ namespace Jellyfin.Api.Controllers
}
}
}
}

View File

@ -32,8 +32,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// The videos controller.
/// </summary>
@ -672,4 +672,3 @@ namespace Jellyfin.Api.Controllers
streamOptions);
}
}
}

View File

@ -19,8 +19,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
{
namespace Jellyfin.Api.Controllers;
/// <summary>
/// Years controller.
/// </summary>
@ -223,4 +223,3 @@ namespace Jellyfin.Api.Controllers
.Select(year => _libraryManager.GetYear(year));
}
}
}

View File

@ -7,8 +7,8 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;
using Microsoft.AspNetCore.Http;
namespace Jellyfin.Api.Extensions
{
namespace Jellyfin.Api.Extensions;
/// <summary>
/// Dto Extensions.
/// </summary>
@ -113,4 +113,3 @@ namespace Jellyfin.Api.Extensions
return dtoOptions;
}
}
}

View File

@ -2,8 +2,8 @@ using Jellyfin.Extensions.Json;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;
namespace Jellyfin.Api.Formatters
{
namespace Jellyfin.Api.Formatters;
/// <summary>
/// Camel Case Json Profile Formatter.
/// </summary>
@ -18,4 +18,3 @@ namespace Jellyfin.Api.Formatters
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.CamelCaseMediaType));
}
}
}

View File

@ -3,8 +3,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Formatters;
namespace Jellyfin.Api.Formatters
{
namespace Jellyfin.Api.Formatters;
/// <summary>
/// Css output formatter.
/// </summary>
@ -33,4 +33,3 @@ namespace Jellyfin.Api.Formatters
return stringResponse is null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
}
}
}

View File

@ -3,8 +3,8 @@ using Jellyfin.Extensions.Json;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;
namespace Jellyfin.Api.Formatters
{
namespace Jellyfin.Api.Formatters;
/// <summary>
/// Pascal Case Json Profile Formatter.
/// </summary>
@ -21,4 +21,3 @@ namespace Jellyfin.Api.Formatters
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.PascalCaseMediaType));
}
}
}

View File

@ -4,8 +4,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Formatters;
namespace Jellyfin.Api.Formatters
{
namespace Jellyfin.Api.Formatters;
/// <summary>
/// Xml output formatter.
/// </summary>
@ -30,4 +30,3 @@ namespace Jellyfin.Api.Formatters
return stringResponse is null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
}
}
}

View File

@ -16,8 +16,8 @@ using MediaBrowser.Model.Net;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// Audio helper.
/// </summary>
@ -177,4 +177,3 @@ namespace Jellyfin.Api.Helpers
cancellationTokenSource).ConfigureAwait(false);
}
}
}

View File

@ -25,8 +25,8 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// Dynamic hls helper.
/// </summary>
@ -746,4 +746,3 @@ namespace Jellyfin.Api.Helpers
return newPlaylist.Contains(",fLaC\"", StringComparison.Ordinal) ? newPlaylist : string.Empty;
}
}
}

View File

@ -11,8 +11,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Net.Http.Headers;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// The stream response helpers.
/// </summary>
@ -117,4 +117,3 @@ namespace Jellyfin.Api.Helpers
}
}
}
}

View File

@ -2,8 +2,8 @@
using System.Globalization;
using System.Text;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// Hls Codec string helpers.
/// </summary>
@ -180,4 +180,3 @@ namespace Jellyfin.Api.Helpers
return result.ToString();
}
}
}

View File

@ -8,8 +8,8 @@ using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// The hls helpers.
/// </summary>
@ -135,4 +135,3 @@ namespace Jellyfin.Api.Helpers
return text;
}
}
}

View File

@ -25,8 +25,8 @@ using MediaBrowser.Model.Session;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// Media info helper.
/// </summary>
@ -497,4 +497,3 @@ namespace Jellyfin.Api.Helpers
return maxBitrate;
}
}
}

View File

@ -6,8 +6,8 @@ using System.Threading.Tasks;
using Jellyfin.Api.Models.PlaybackDtos;
using MediaBrowser.Model.IO;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// A progressive file stream for transferring transcoded files as they are written to.
/// </summary>
@ -180,4 +180,3 @@ namespace Jellyfin.Api.Helpers
return bytesRead > 0 || (_job?.HasExited ?? elapsed >= _timeoutMs);
}
}
}

View File

@ -16,8 +16,8 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
using Microsoft.AspNetCore.Http;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// Request Extensions.
/// </summary>
@ -145,4 +145,3 @@ namespace Jellyfin.Api.Helpers
dtos.ToArray());
}
}
}

View File

@ -22,8 +22,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// The streaming helpers.
/// </summary>
@ -780,4 +780,3 @@ namespace Jellyfin.Api.Helpers
}
}
}
}

View File

@ -27,8 +27,8 @@ using MediaBrowser.Model.Session;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Helpers
{
namespace Jellyfin.Api.Helpers;
/// <summary>
/// Transcoding job helpers.
/// </summary>
@ -911,4 +911,3 @@ namespace Jellyfin.Api.Helpers
}
}
}
}

View File

@ -7,8 +7,8 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using static MediaBrowser.Controller.Extensions.ConfigurationExtensions;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Redirect requests without baseurl prefix to the baseurl prefixed URL.
/// </summary>
@ -78,4 +78,3 @@ namespace Jellyfin.Api.Middleware
await _next(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -12,8 +12,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Exception Middleware.
/// </summary>
@ -148,4 +148,3 @@ namespace Jellyfin.Api.Middleware
StringComparison.OrdinalIgnoreCase);
}
}
}

View File

@ -4,8 +4,8 @@ using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using Microsoft.AspNetCore.Http;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Validates the IP of requests coming from local networks wrt. remote access.
/// </summary>
@ -47,4 +47,3 @@ namespace Jellyfin.Api.Middleware
await _next(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -5,8 +5,8 @@ using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using Microsoft.AspNetCore.Http;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Validates the LAN host IP based on application configuration.
/// </summary>
@ -42,4 +42,3 @@ namespace Jellyfin.Api.Middleware
await _next(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -3,8 +3,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Removes /emby and /mediabrowser from requested route.
/// </summary>
@ -51,4 +51,3 @@ namespace Jellyfin.Api.Middleware
await _next(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -2,8 +2,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// URL decodes the querystring before binding.
/// </summary>
@ -36,4 +36,3 @@ namespace Jellyfin.Api.Middleware
await _next(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -7,8 +7,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Response time middleware.
/// </summary>
@ -66,4 +66,3 @@ namespace Jellyfin.Api.Middleware
await this._next(context).ConfigureAwait(false);
}
}
}

View File

@ -3,8 +3,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Redirect requests to robots.txt to web/robots.txt.
/// </summary>
@ -44,4 +44,3 @@ namespace Jellyfin.Api.Middleware
await _next(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -5,8 +5,8 @@ using MediaBrowser.Controller;
using MediaBrowser.Model.Globalization;
using Microsoft.AspNetCore.Http;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Shows a custom message during server startup.
/// </summary>
@ -48,4 +48,3 @@ namespace Jellyfin.Api.Middleware
await httpContext.Response.WriteAsync(message, httpContext.RequestAborted).ConfigureAwait(false);
}
}
}

View File

@ -6,8 +6,8 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Primitives;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Defines the <see cref="UrlDecodeQueryFeature"/>.
/// </summary>
@ -81,4 +81,3 @@ namespace Jellyfin.Api.Middleware
}
}
}
}

View File

@ -2,8 +2,8 @@ using System.Threading.Tasks;
using MediaBrowser.Controller.Net;
using Microsoft.AspNetCore.Http;
namespace Jellyfin.Api.Middleware
{
namespace Jellyfin.Api.Middleware;
/// <summary>
/// Handles WebSocket requests.
/// </summary>
@ -37,4 +37,3 @@ namespace Jellyfin.Api.Middleware
await webSocketManager.WebSocketRequestHandler(httpContext).ConfigureAwait(false);
}
}
}

View File

@ -5,8 +5,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.ModelBinders
{
namespace Jellyfin.Api.ModelBinders;
/// <summary>
/// Comma delimited array model binder.
/// Returns an empty array of specified type if there is no query parameter.
@ -87,4 +87,3 @@ namespace Jellyfin.Api.ModelBinders
return typedValues;
}
}
}

Some files were not shown because too many files have changed in this diff Show More