Refactor: standardize namespace and using directive style

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.
This commit is contained in:
2026-02-20 16:26:53 -05:00
parent 44ab9e1d6d
commit af1152b001
1436 changed files with 36615 additions and 15508 deletions
+39 -41
View File
@@ -2,47 +2,45 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace MediaBrowser.Model.Providers
{
/// <summary>
/// Represents the external id information for serialization to the client.
/// </summary>
public class ExternalIdInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="ExternalIdInfo"/> class.
/// </summary>
/// <param name="name">Name of the external id provider (IE: IMDB, MusicBrainz, etc).</param>
/// <param name="key">Key for this id. This key should be unique across all providers.</param>
/// <param name="type">Specific media type for this id.</param>
public ExternalIdInfo(string name, string key, ExternalIdMediaType? type)
{
Name = name;
Key = key;
Type = type;
}
namespace MediaBrowser.Model.Providers;
/// <summary>
/// Represents the external id information for serialization to the client.
/// </summary>
public class ExternalIdInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="ExternalIdInfo"/> class.
/// </summary>
/// <param name="name">Name of the external id provider (IE: IMDB, MusicBrainz, etc).</param>
/// <param name="key">Key for this id. This key should be unique across all providers.</param>
/// <param name="type">Specific media type for this id.</param>
public ExternalIdInfo(string name, string key, ExternalIdMediaType? type)
{
Name = name;
Key = key;
Type = type;
}
/// <summary>
/// Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc).
/// </summary>
// TODO: This should be renamed to ProviderName
public string Name { get; set; }
/// <summary>
/// Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc).
/// </summary>
// TODO: This should be renamed to ProviderName
public string Name { get; set; }
/// <summary>
/// Gets or sets the unique key for this id. This key should be unique across all providers.
/// </summary>
// TODO: This property is not actually unique across the concrete types at the moment. It should be updated to be unique.
public string Key { get; set; }
/// <summary>
/// Gets or sets the unique key for this id. This key should be unique across all providers.
/// </summary>
// TODO: This property is not actually unique across the concrete types at the moment. It should be updated to be unique.
public string Key { get; set; }
/// <summary>
/// Gets or sets the specific media type for this id. This is used to distinguish between the different
/// external id types for providers with multiple ids.
/// A null value indicates there is no specific media type associated with the external id, or this is the
/// default id for the external provider so there is no need to specify a type.
/// </summary>
/// <remarks>
/// This can be used along with the <see cref="Name"/> to localize the external id on the client.
/// </remarks>
public ExternalIdMediaType? Type { get; set; }
}
}
/// <summary>
/// Gets or sets the specific media type for this id. This is used to distinguish between the different
/// external id types for providers with multiple ids.
/// A null value indicates there is no specific media type associated with the external id, or this is the
/// default id for the external provider so there is no need to specify a type.
/// </summary>
/// <remarks>
/// This can be used along with the <see cref="Name"/> to localize the external id on the client.
/// </remarks>
public ExternalIdMediaType? Type { get; set; }
}
@@ -2,84 +2,82 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace MediaBrowser.Model.Providers
{
/// <summary>
/// The specific media type of an <see cref="ExternalIdInfo"/>.
/// </summary>
/// <remarks>
/// Client applications may use this as a translation key.
/// </remarks>
public enum ExternalIdMediaType
{
/// <summary>
/// A music album.
/// </summary>
Album = 1,
namespace MediaBrowser.Model.Providers;
/// <summary>
/// The specific media type of an <see cref="ExternalIdInfo"/>.
/// </summary>
/// <remarks>
/// Client applications may use this as a translation key.
/// </remarks>
public enum ExternalIdMediaType
{
/// <summary>
/// A music album.
/// </summary>
Album = 1,
/// <summary>
/// The artist of a music album.
/// </summary>
AlbumArtist = 2,
/// <summary>
/// The artist of a music album.
/// </summary>
AlbumArtist = 2,
/// <summary>
/// The artist of a media item.
/// </summary>
Artist = 3,
/// <summary>
/// The artist of a media item.
/// </summary>
Artist = 3,
/// <summary>
/// A boxed set of media.
/// </summary>
BoxSet = 4,
/// <summary>
/// A boxed set of media.
/// </summary>
BoxSet = 4,
/// <summary>
/// A series episode.
/// </summary>
Episode = 5,
/// <summary>
/// A series episode.
/// </summary>
Episode = 5,
/// <summary>
/// A movie.
/// </summary>
Movie = 6,
/// <summary>
/// A movie.
/// </summary>
Movie = 6,
/// <summary>
/// An alternative artist apart from the main artist.
/// </summary>
OtherArtist = 7,
/// <summary>
/// An alternative artist apart from the main artist.
/// </summary>
OtherArtist = 7,
/// <summary>
/// A person.
/// </summary>
Person = 8,
/// <summary>
/// A person.
/// </summary>
Person = 8,
/// <summary>
/// A release group.
/// </summary>
ReleaseGroup = 9,
/// <summary>
/// A release group.
/// </summary>
ReleaseGroup = 9,
/// <summary>
/// A single season of a series.
/// </summary>
Season = 10,
/// <summary>
/// A single season of a series.
/// </summary>
Season = 10,
/// <summary>
/// A series.
/// </summary>
Series = 11,
/// <summary>
/// A series.
/// </summary>
Series = 11,
/// <summary>
/// A music track.
/// </summary>
Track = 12,
/// <summary>
/// A music track.
/// </summary>
Track = 12,
/// <summary>
/// A book.
/// </summary>
Book = 13,
/// <summary>
/// A book.
/// </summary>
Book = 13,
/// <summary>
/// A music recording.
/// </summary>
Recording = 14
}
}
/// <summary>
/// A music recording.
/// </summary>
Recording = 14,
}
+14 -16
View File
@@ -5,20 +5,18 @@
#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Providers
{
public class ExternalUrl
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
namespace MediaBrowser.Model.Providers;
public class ExternalUrl
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the type of the item.
/// </summary>
/// <value>The type of the item.</value>
public string Url { get; set; }
}
}
/// <summary>
/// Gets or sets the type of the item.
/// </summary>
/// <value>The type of the item.</value>
public string Url { get; set; }
}
@@ -2,35 +2,33 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Providers;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Providers
{
/// <summary>
/// Class ImageProviderInfo.
/// </summary>
public class ImageProviderInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="ImageProviderInfo" /> class.
/// </summary>
/// <param name="name">The name of the image provider.</param>
/// <param name="supportedImages">The image types supported by the image provider.</param>
public ImageProviderInfo(string name, ImageType[] supportedImages)
{
Name = name;
SupportedImages = supportedImages;
}
/// <summary>
/// Class ImageProviderInfo.
/// </summary>
public class ImageProviderInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="ImageProviderInfo" /> class.
/// </summary>
/// <param name="name">The name of the image provider.</param>
/// <param name="supportedImages">The image types supported by the image provider.</param>
public ImageProviderInfo(string name, ImageType[] supportedImages)
{
Name = name;
SupportedImages = supportedImages;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; }
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; }
/// <summary>
/// Gets the supported image types.
/// </summary>
public ImageType[] SupportedImages { get; }
}
}
/// <summary>
/// Gets the supported image types.
/// </summary>
public ImageType[] SupportedImages { get; }
}
+58 -60
View File
@@ -2,74 +2,72 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace MediaBrowser.Model.Providers;
#nullable disable
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Providers
{
/// <summary>
/// Class RemoteImageInfo.
/// </summary>
public class RemoteImageInfo
{
/// <summary>
/// Gets or sets the name of the provider.
/// </summary>
/// <value>The name of the provider.</value>
public string ProviderName { get; set; }
/// <summary>
/// Class RemoteImageInfo.
/// </summary>
public class RemoteImageInfo
{
/// <summary>
/// Gets or sets the name of the provider.
/// </summary>
/// <value>The name of the provider.</value>
public string ProviderName { get; set; }
/// <summary>
/// Gets or sets the URL.
/// </summary>
/// <value>The URL.</value>
public string Url { get; set; }
/// <summary>
/// Gets or sets the URL.
/// </summary>
/// <value>The URL.</value>
public string Url { get; set; }
/// <summary>
/// Gets or sets a url used for previewing a smaller version.
/// </summary>
public string ThumbnailUrl { get; set; }
/// <summary>
/// Gets or sets a url used for previewing a smaller version.
/// </summary>
public string ThumbnailUrl { get; set; }
/// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
public int? Height { get; set; }
/// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
public int? Height { get; set; }
/// <summary>
/// Gets or sets the width.
/// </summary>
/// <value>The width.</value>
public int? Width { get; set; }
/// <summary>
/// Gets or sets the width.
/// </summary>
/// <value>The width.</value>
public int? Width { get; set; }
/// <summary>
/// Gets or sets the community rating.
/// </summary>
/// <value>The community rating.</value>
public double? CommunityRating { get; set; }
/// <summary>
/// Gets or sets the community rating.
/// </summary>
/// <value>The community rating.</value>
public double? CommunityRating { get; set; }
/// <summary>
/// Gets or sets the vote count.
/// </summary>
/// <value>The vote count.</value>
public int? VoteCount { get; set; }
/// <summary>
/// Gets or sets the vote count.
/// </summary>
/// <value>The vote count.</value>
public int? VoteCount { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
/// <value>The language.</value>
public string Language { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
/// <value>The language.</value>
public string Language { get; set; }
/// <summary>
/// Gets or sets the type.
/// </summary>
/// <value>The type.</value>
public ImageType Type { get; set; }
/// <summary>
/// Gets or sets the type.
/// </summary>
/// <value>The type.</value>
public ImageType Type { get; set; }
/// <summary>
/// Gets or sets the type of the rating.
/// </summary>
/// <value>The type of the rating.</value>
public RatingType RatingType { get; set; }
}
}
/// <summary>
/// Gets or sets the type of the rating.
/// </summary>
/// <value>The type of the rating.</value>
public RatingType RatingType { get; set; }
}
@@ -6,21 +6,23 @@
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Providers
{
public class RemoteImageQuery
{
public RemoteImageQuery(string providerName)
{
ProviderName = providerName;
}
namespace MediaBrowser.Model.Providers;
public class RemoteImageQuery
{
/// <summary>
/// Initializes a new instance of the <see cref="RemoteImageQuery"/> class.
/// </summary>
/// <param name="providerName">The name of the image provider.</param>
public RemoteImageQuery(string providerName)
{
ProviderName = providerName;
}
public string ProviderName { get; }
public string ProviderName { get; }
public ImageType? ImageType { get; set; }
public ImageType? ImageType { get; set; }
public bool IncludeDisabledProviders { get; set; }
public bool IncludeDisabledProviders { get; set; }
public bool IncludeAllLanguages { get; set; }
}
}
public bool IncludeAllLanguages { get; set; }
}
@@ -3,29 +3,27 @@
// </copyright>
#nullable disable
namespace MediaBrowser.Model.Providers
{
/// <summary>
/// Class RemoteImageResult.
/// </summary>
public class RemoteImageResult
{
/// <summary>
/// Gets or sets the images.
/// </summary>
/// <value>The images.</value>
public RemoteImageInfo[] Images { get; set; }
namespace MediaBrowser.Model.Providers;
/// <summary>
/// Class RemoteImageResult.
/// </summary>
public class RemoteImageResult
{
/// <summary>
/// Gets or sets the images.
/// </summary>
/// <value>The images.</value>
public RemoteImageInfo[] Images { get; set; }
/// <summary>
/// Gets or sets the total record count.
/// </summary>
/// <value>The total record count.</value>
public int TotalRecordCount { get; set; }
/// <summary>
/// Gets or sets the total record count.
/// </summary>
/// <value>The total record count.</value>
public int TotalRecordCount { get; set; }
/// <summary>
/// Gets or sets the providers.
/// </summary>
/// <value>The providers.</value>
public string[] Providers { get; set; }
}
}
/// <summary>
/// Gets or sets the providers.
/// </summary>
/// <value>The providers.</value>
public string[] Providers { get; set; }
}
@@ -2,10 +2,10 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
using MediaBrowser.Model.Lyrics;
namespace MediaBrowser.Model.Providers;
using MediaBrowser.Model.Lyrics;
/// <summary>
/// The remote lyric info.
/// </summary>
@@ -5,54 +5,55 @@
#nullable disable
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using global::System;
using global::System.Collections.Generic;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Providers
{
public class RemoteSearchResult : IHasProviderIds
{
public RemoteSearchResult()
{
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Artists = Array.Empty<RemoteSearchResult>();
}
namespace MediaBrowser.Model.Providers;
public class RemoteSearchResult : IHasProviderIds
{
/// <summary>
/// Initializes a new instance of the <see cref="RemoteSearchResult"/> class.
/// </summary>
public RemoteSearchResult()
{
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Artists = Array.Empty<RemoteSearchResult>();
}
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the provider ids.
/// </summary>
/// <value>The provider ids.</value>
public Dictionary<string, string> ProviderIds { get; set; }
/// <summary>
/// Gets or sets the provider ids.
/// </summary>
/// <value>The provider ids.</value>
public Dictionary<string, string> ProviderIds { get; set; }
/// <summary>
/// Gets or sets the year.
/// </summary>
/// <value>The year.</value>
public int? ProductionYear { get; set; }
/// <summary>
/// Gets or sets the year.
/// </summary>
/// <value>The year.</value>
public int? ProductionYear { get; set; }
public int? IndexNumber { get; set; }
public int? IndexNumber { get; set; }
public int? IndexNumberEnd { get; set; }
public int? IndexNumberEnd { get; set; }
public int? ParentIndexNumber { get; set; }
public int? ParentIndexNumber { get; set; }
public DateTime? PremiereDate { get; set; }
public DateTime? PremiereDate { get; set; }
public string ImageUrl { get; set; }
public string ImageUrl { get; set; }
public string SearchProviderName { get; set; }
public string SearchProviderName { get; set; }
public string Overview { get; set; }
public string Overview { get; set; }
public RemoteSearchResult AlbumArtist { get; set; }
public RemoteSearchResult AlbumArtist { get; set; }
public RemoteSearchResult[] Artists { get; set; }
}
}
public RemoteSearchResult[] Artists { get; set; }
}
@@ -5,42 +5,40 @@
#nullable disable
#pragma warning disable CS1591
using System;
using global::System;
namespace MediaBrowser.Model.Providers
{
public class RemoteSubtitleInfo
{
public string ThreeLetterISOLanguageName { get; set; }
namespace MediaBrowser.Model.Providers;
public class RemoteSubtitleInfo
{
public string ThreeLetterISOLanguageName { get; set; }
public string Id { get; set; }
public string Id { get; set; }
public string ProviderName { get; set; }
public string ProviderName { get; set; }
public string Name { get; set; }
public string Name { get; set; }
public string Format { get; set; }
public string Format { get; set; }
public string Author { get; set; }
public string Author { get; set; }
public string Comment { get; set; }
public string Comment { get; set; }
public DateTime? DateCreated { get; set; }
public DateTime? DateCreated { get; set; }
public float? CommunityRating { get; set; }
public float? CommunityRating { get; set; }
public float? FrameRate { get; set; }
public float? FrameRate { get; set; }
public int? DownloadCount { get; set; }
public int? DownloadCount { get; set; }
public bool? IsHashMatch { get; set; }
public bool? IsHashMatch { get; set; }
public bool? AiTranslated { get; set; }
public bool? AiTranslated { get; set; }
public bool? MachineTranslated { get; set; }
public bool? MachineTranslated { get; set; }
public bool? Forced { get; set; }
public bool? Forced { get; set; }
public bool? HearingImpaired { get; set; }
}
}
public bool? HearingImpaired { get; set; }
}
+23 -22
View File
@@ -5,36 +5,37 @@
#nullable disable
#pragma warning disable CS1591
using System;
using global::System;
namespace MediaBrowser.Model.Providers
{
public class SubtitleOptions
{
public SubtitleOptions()
{
DownloadLanguages = Array.Empty<string>();
namespace MediaBrowser.Model.Providers;
public class SubtitleOptions
{
/// <summary>
/// Initializes a new instance of the <see cref="SubtitleOptions"/> class.
/// </summary>
public SubtitleOptions()
{
DownloadLanguages = Array.Empty<string>();
SkipIfAudioTrackMatches = true;
RequirePerfectMatch = true;
}
SkipIfAudioTrackMatches = true;
RequirePerfectMatch = true;
}
public bool SkipIfEmbeddedSubtitlesPresent { get; set; }
public bool SkipIfEmbeddedSubtitlesPresent { get; set; }
public bool SkipIfAudioTrackMatches { get; set; }
public bool SkipIfAudioTrackMatches { get; set; }
public string[] DownloadLanguages { get; set; }
public string[] DownloadLanguages { get; set; }
public bool DownloadMovieSubtitles { get; set; }
public bool DownloadMovieSubtitles { get; set; }
public bool DownloadEpisodeSubtitles { get; set; }
public bool DownloadEpisodeSubtitles { get; set; }
public string OpenSubtitlesUsername { get; set; }
public string OpenSubtitlesUsername { get; set; }
public string OpenSubtitlesPasswordHash { get; set; }
public string OpenSubtitlesPasswordHash { get; set; }
public bool IsOpenSubtitleVipAccount { get; set; }
public bool IsOpenSubtitleVipAccount { get; set; }
public bool RequirePerfectMatch { get; set; }
}
}
public bool RequirePerfectMatch { get; set; }
}
@@ -5,12 +5,10 @@
#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Providers
{
public class SubtitleProviderInfo
{
public string Name { get; set; }
namespace MediaBrowser.Model.Providers;
public class SubtitleProviderInfo
{
public string Name { get; set; }
public string Id { get; set; }
}
}
public string Id { get; set; }
}