diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index cef82ebbcc..b688af5286 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -2590,9 +2590,9 @@ namespace Emby.Server.Implementations.Library
{
/*
Anime series don't generally have a season in their file name, however,
- tvdb needs a season to correctly get the metadata.
+ TVDb needs a season to correctly get the metadata.
Hence, a null season needs to be filled with something. */
- // FIXME perhaps this would be better for tvdb parser to ask for season 1 if no season is specified
+ // FIXME perhaps this would be better for TVDb parser to ask for season 1 if no season is specified
episode.ParentIndexNumber = 1;
}
diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
index 8f9e5f01b1..84d4688aff 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
@@ -376,7 +376,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
if (!justName.IsEmpty)
{
- // check for tmdb id
+ // Check for TMDb id
var tmdbid = justName.GetAttributeValue("tmdbid");
if (!string.IsNullOrWhiteSpace(tmdbid))
@@ -387,7 +387,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
if (!string.IsNullOrEmpty(item.Path))
{
- // check for imdb id - we use full media path, as we can assume, that this will match in any use case (either id in parent dir or in file name)
+ // Check for IMDb id - we use full media path, as we can assume that this will match in any use case (whether id in parent dir or in file name)
var imdbid = item.Path.AsSpan().GetAttributeValue("imdbid");
if (!string.IsNullOrWhiteSpace(imdbid))
diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs
index 33b67b3898..3ee5b8d737 100644
--- a/Jellyfin.Api/Controllers/ItemsController.cs
+++ b/Jellyfin.Api/Controllers/ItemsController.cs
@@ -87,9 +87,9 @@ namespace Jellyfin.Api.Controllers
/// Optional. The minimum last saved date for the current user. Format = ISO.
/// Optional. The maximum premiere date. Format = ISO.
/// Optional filter by items that have an overview or not.
- /// Optional filter by items that have an imdb id or not.
- /// Optional filter by items that have a tmdb id or not.
- /// Optional filter by items that have a tvdb id or not.
+ /// Optional filter by items that have an IMDb id or not.
+ /// Optional filter by items that have a TMDb id or not.
+ /// Optional filter by items that have a TVDb id or not.
/// Optional filter for live tv movies.
/// Optional filter for live tv series.
/// Optional filter for live tv news.
@@ -100,7 +100,7 @@ namespace Jellyfin.Api.Controllers
/// Optional. The maximum number of records to return.
/// When searching within folders, this determines whether or not the search will be recursive. true/false.
/// Optional. Filter based on a search term.
- /// Sort Order - Ascending,Descending.
+ /// Sort Order - Ascending, Descending.
/// Specify this to localize the search to a specific item or folder. Omit to use the root.
/// Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.
/// Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
@@ -536,9 +536,9 @@ namespace Jellyfin.Api.Controllers
/// Optional. The minimum last saved date for the current user. Format = ISO.
/// Optional. The maximum premiere date. Format = ISO.
/// Optional filter by items that have an overview or not.
- /// Optional filter by items that have an imdb id or not.
- /// Optional filter by items that have a tmdb id or not.
- /// Optional filter by items that have a tvdb id or not.
+ /// Optional filter by items that have an IMDb id or not.
+ /// Optional filter by items that have a TMDb id or not.
+ /// Optional filter by items that have a TVDb id or not.
/// Optional filter for live tv movies.
/// Optional filter for live tv series.
/// Optional filter for live tv news.
@@ -549,7 +549,7 @@ namespace Jellyfin.Api.Controllers
/// Optional. The maximum number of records to return.
/// When searching within folders, this determines whether or not the search will be recursive. true/false.
/// Optional. Filter based on a search term.
- /// Sort Order - Ascending,Descending.
+ /// Sort Order - Ascending, Descending.
/// Specify this to localize the search to a specific item or folder. Omit to use the root.
/// Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.
/// Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.cs
index 8195fc7609..03f864b4a7 100644
--- a/Jellyfin.Api/Controllers/MoviesController.cs
+++ b/Jellyfin.Api/Controllers/MoviesController.cs
@@ -193,7 +193,7 @@ namespace Jellyfin.Api.Controllers
new InternalItemsQuery(user)
{
Person = name,
- // Account for duplicates by imdb id, since the database doesn't support this yet
+ // Account for duplicates by IMDb id, since the database doesn't support this yet
Limit = itemLimit + 2,
PersonTypes = new[] { PersonType.Director },
IncludeItemTypes = itemTypes.ToArray(),
@@ -232,15 +232,15 @@ namespace Jellyfin.Api.Controllers
foreach (var name in names)
{
var items = _libraryManager.GetItemList(new InternalItemsQuery(user)
- {
- Person = name,
- // Account for duplicates by imdb id, since the database doesn't support this yet
- Limit = itemLimit + 2,
- IncludeItemTypes = itemTypes.ToArray(),
- IsMovie = true,
- EnableGroupByMetadataKey = true,
- DtoOptions = dtoOptions
- }).GroupBy(i => i.GetProviderId(MediaBrowser.Model.Entities.MetadataProvider.Imdb) ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture))
+ {
+ Person = name,
+ // Account for duplicates by IMDb id, since the database doesn't support this yet
+ Limit = itemLimit + 2,
+ IncludeItemTypes = itemTypes.ToArray(),
+ IsMovie = true,
+ EnableGroupByMetadataKey = true,
+ DtoOptions = dtoOptions
+ }).GroupBy(i => i.GetProviderId(MediaBrowser.Model.Entities.MetadataProvider.Imdb) ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture))
.Select(x => x.First())
.Take(itemLimit)
.ToList();
diff --git a/Jellyfin.Api/Controllers/TrailersController.cs b/Jellyfin.Api/Controllers/TrailersController.cs
index b296d1c960..53a839e431 100644
--- a/Jellyfin.Api/Controllers/TrailersController.cs
+++ b/Jellyfin.Api/Controllers/TrailersController.cs
@@ -55,9 +55,9 @@ namespace Jellyfin.Api.Controllers
/// Optional. The minimum last saved date for the current user. Format = ISO.
/// Optional. The maximum premiere date. Format = ISO.
/// Optional filter by items that have an overview or not.
- /// Optional filter by items that have an imdb id or not.
- /// Optional filter by items that have a tmdb id or not.
- /// Optional filter by items that have a tvdb id or not.
+ /// Optional filter by items that have an IMDb id or not.
+ /// Optional filter by items that have a TMDb id or not.
+ /// Optional filter by items that have a TVDb id or not.
/// Optional filter for live tv movies.
/// Optional filter for live tv series.
/// Optional filter for live tv news.
@@ -68,7 +68,7 @@ namespace Jellyfin.Api.Controllers
/// Optional. The maximum number of records to return.
/// When searching within folders, this determines whether or not the search will be recursive. true/false.
/// Optional. Filter based on a search term.
- /// Sort Order - Ascending,Descending.
+ /// Sort Order - Ascending, Descending.
/// Specify this to localize the search to a specific item or folder. Omit to use the root.
/// Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.
/// Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.
diff --git a/MediaBrowser.Common/Providers/ProviderIdParsers.cs b/MediaBrowser.Common/Providers/ProviderIdParsers.cs
index 487b5a6d29..d569167b1d 100644
--- a/MediaBrowser.Common/Providers/ProviderIdParsers.cs
+++ b/MediaBrowser.Common/Providers/ProviderIdParsers.cs
@@ -20,7 +20,7 @@ namespace MediaBrowser.Common.Providers
/// True if parsing was successful, false otherwise.
public static bool TryFindImdbId(ReadOnlySpan text, out ReadOnlySpan imdbId)
{
- // imdb id is at least 9 chars (tt + 7 numbers)
+ // IMDb id is at least 9 chars (tt + 7 numbers)
while (text.Length >= 2 + ImdbMinNumbers)
{
var ttPos = text.IndexOf(ImdbPrefix);
@@ -42,7 +42,7 @@ namespace MediaBrowser.Common.Providers
}
}
- // skip if more than 8 digits + 2 chars for tt
+ // Skip if more than 8 digits + 2 chars for tt
if (i <= ImdbMaxNumbers + 2 && i >= ImdbMinNumbers + 2)
{
imdbId = text.Slice(0, i);
diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs
index 77e70f8fbd..3c12acd90d 100644
--- a/MediaBrowser.Controller/Entities/Movies/Movie.cs
+++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs
@@ -33,9 +33,9 @@ namespace MediaBrowser.Controller.Entities.Movies
.ToArray();
///
- /// Gets or sets the name of the TMDB collection.
+ /// Gets or sets the name of the TMDb collection.
///
- /// The name of the TMDB collection.
+ /// The name of the TMDb collection.
public string TmdbCollectionName { get; set; }
[JsonIgnore]
diff --git a/MediaBrowser.Controller/Providers/IHasOrder.cs b/MediaBrowser.Controller/Providers/IHasOrder.cs
index 9fde0e6958..77b0407a20 100644
--- a/MediaBrowser.Controller/Providers/IHasOrder.cs
+++ b/MediaBrowser.Controller/Providers/IHasOrder.cs
@@ -1,9 +1,14 @@
-#pragma warning disable CS1591
-
namespace MediaBrowser.Controller.Providers
{
+ ///
+ /// Interface IHasOrder.
+ ///
public interface IHasOrder
{
+ ///
+ /// Gets the order.
+ ///
+ /// The order.
int Order { get; }
}
}
diff --git a/MediaBrowser.Controller/Providers/IRemoteMetadataProvider.cs b/MediaBrowser.Controller/Providers/IRemoteMetadataProvider.cs
index f146decb60..888ca6c72c 100644
--- a/MediaBrowser.Controller/Providers/IRemoteMetadataProvider.cs
+++ b/MediaBrowser.Controller/Providers/IRemoteMetadataProvider.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -8,20 +6,41 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Providers
{
+ ///
+ /// Interface IRemoteMetadataProvider.
+ ///
public interface IRemoteMetadataProvider : IMetadataProvider
{
}
+ ///
+ /// Interface IRemoteMetadataProvider.
+ ///
public interface IRemoteMetadataProvider : IMetadataProvider, IRemoteMetadataProvider, IRemoteSearchProvider
where TItemType : BaseItem, IHasLookupInfo
where TLookupInfoType : ItemLookupInfo, new()
{
+ ///
+ /// Gets the metadata for a specific LookupInfoType.
+ ///
+ /// The LookupInfoType to get metadata for.
+ /// The .
+ /// A task returning a MetadataResult for the specific LookupInfoType.
Task> GetMetadata(TLookupInfoType info, CancellationToken cancellationToken);
}
+ ///
+ /// Interface IRemoteMetadataProvider.
+ ///
public interface IRemoteSearchProvider : IRemoteSearchProvider
where TLookupInfoType : ItemLookupInfo
{
+ ///
+ /// Gets the list of for a specific LookupInfoType.
+ ///
+ /// The LookupInfoType to search for.
+ /// The .
+ /// A task returning RemoteSearchResults for the searchInfo.
Task> GetSearchResults(TLookupInfoType searchInfo, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Model/Entities/MetadataProvider.cs b/MediaBrowser.Model/Entities/MetadataProvider.cs
index 37e3d88645..bd8db99416 100644
--- a/MediaBrowser.Model/Entities/MetadataProvider.cs
+++ b/MediaBrowser.Model/Entities/MetadataProvider.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
namespace MediaBrowser.Model.Entities
{
///
@@ -14,38 +12,78 @@ namespace MediaBrowser.Model.Entities
Custom = 0,
///
- /// The imdb.
+ /// The IMDb provider.
///
Imdb = 2,
///
- /// The TMDB.
+ /// The TMDb provider.
///
Tmdb = 3,
///
- /// The TVDB.
+ /// The TVDb provider.
///
Tvdb = 4,
///
- /// The tvcom.
+ /// The tvcom providerd.
///
Tvcom = 5,
///
- /// Tmdb Collection Id.
+ /// TMDb collection provider.
///
TmdbCollection = 7,
+
+ ///
+ /// The MusicBrainz album provider.
+ ///
MusicBrainzAlbum = 8,
+
+ ///
+ /// The MusicBrainz album artist provider.
+ ///
MusicBrainzAlbumArtist = 9,
+
+ ///
+ /// The MusicBrainz artist provider.
+ ///
MusicBrainzArtist = 10,
+
+ ///
+ /// The MusicBrainz release group provider.
+ ///
MusicBrainzReleaseGroup = 11,
+
+ ///
+ /// The Zap2It provider.
+ ///
Zap2It = 12,
+
+ ///
+ /// The TvRage provider.
+ ///
TvRage = 15,
+
+ ///
+ /// The AudioDb artist provider.
+ ///
AudioDbArtist = 16,
+
+ ///
+ /// The AudioDb collection provider.
+ ///
AudioDbAlbum = 17,
+
+ ///
+ /// The MusicBrainz track provider.
+ ///
MusicBrainzTrack = 18,
+
+ ///
+ /// The TvMaze provider.
+ ///
TvMaze = 19
}
}
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index e6c3a6c260..6fa1d778ad 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -126,7 +126,7 @@ namespace MediaBrowser.Model.Querying
ProductionLocations,
///
- /// Imdb, tmdb, etc.
+ /// The ids from IMDb, TMDb, etc.
///
ProviderIds,
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index bbb33ddf0e..552ded0c45 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -183,7 +183,7 @@ namespace MediaBrowser.Providers.Manager
}
}
- // thetvdb will sometimes serve a rubbish 404 html page with a 200 OK code, because reasons...
+ // TVDb will sometimes serve a rubbish 404 html page with a 200 OK code, because reasons...
if (contentType.Equals(MediaTypeNames.Text.Html, StringComparison.OrdinalIgnoreCase))
{
throw new HttpRequestException("Invalid image received.", null, HttpStatusCode.NotFound);
diff --git a/MediaBrowser.Providers/Plugins/StudioImages/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/StudioImages/Configuration/PluginConfiguration.cs
index cb422ef3d6..0bfab98245 100644
--- a/MediaBrowser.Providers/Plugins/StudioImages/Configuration/PluginConfiguration.cs
+++ b/MediaBrowser.Providers/Plugins/StudioImages/Configuration/PluginConfiguration.cs
@@ -1,13 +1,17 @@
-#pragma warning disable CS1591
-
-using MediaBrowser.Model.Plugins;
+using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Providers.Plugins.StudioImages.Configuration
{
+ ///
+ /// Plugin configuration class for the studio image provider.
+ ///
public class PluginConfiguration : BasePluginConfiguration
{
private string _repository = Plugin.DefaultServer;
+ ///
+ /// Gets or sets the studio image repository URL.
+ ///
public string RepositoryUrl
{
get
diff --git a/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs b/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs
index 5e653d039f..78150153ad 100644
--- a/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs
+++ b/MediaBrowser.Providers/Plugins/StudioImages/Plugin.cs
@@ -1,5 +1,4 @@
#nullable disable
-#pragma warning disable CS1591
using System;
using System.Collections.Generic;
@@ -11,27 +10,47 @@ using MediaBrowser.Providers.Plugins.StudioImages.Configuration;
namespace MediaBrowser.Providers.Plugins.StudioImages
{
+ ///
+ /// Artwork Plugin class.
+ ///
public class Plugin : BasePlugin, IHasWebPages
{
+ ///
+ /// Artwork repository URL.
+ ///
public const string DefaultServer = "https://raw.github.com/jellyfin/emby-artwork/master/studios";
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// application paths.
+ /// xml serializer.
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
}
+ ///
+ /// Gets the instance of Artwork plugin.
+ ///
public static Plugin Instance { get; private set; }
+ ///
public override Guid Id => new Guid("872a7849-1171-458d-a6fb-3de3d442ad30");
+ ///
public override string Name => "Studio Images";
+ ///
public override string Description => "Get artwork for studios from any Jellyfin-compatible repository.";
// TODO remove when plugin removed from server.
+
+ ///
public override string ConfigurationFileName => "Jellyfin.Plugin.StudioImages.xml";
+ ///
public IEnumerable GetPages()
{
yield return new PluginPageInfo
diff --git a/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs b/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs
index ef822a22ad..ffbb338e84 100644
--- a/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/StudioImages/StudiosImageProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -21,12 +19,21 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.StudioImages
{
+ ///
+ /// Studio image provider.
+ ///
public class StudiosImageProvider : IRemoteImageProvider
{
private readonly IServerConfigurationManager _config;
private readonly IHttpClientFactory _httpClientFactory;
private readonly IFileSystem _fileSystem;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
+ /// The .
public StudiosImageProvider(IServerConfigurationManager config, IHttpClientFactory httpClientFactory, IFileSystem fileSystem)
{
_config = config;
@@ -34,13 +41,16 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
_fileSystem = fileSystem;
}
+ ///
public string Name => "Artwork Repository";
+ ///
public bool Supports(BaseItem item)
{
return item is Studio;
}
+ ///
public IEnumerable GetSupportedImages(BaseItem item)
{
return new List
@@ -49,6 +59,7 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
};
}
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt");
@@ -103,6 +114,7 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
return EnsureList(url, file, _fileSystem, cancellationToken);
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
var httpClient = _httpClientFactory.CreateClient(NamedClient.Default);
@@ -110,13 +122,13 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
}
///
- /// Ensures the list.
+ /// Ensures the existence of a file listing.
///
/// The URL.
/// The file.
/// The file system.
/// The cancellation token.
- /// Task.
+ /// A Task to ensure existence of a file listing.
public async Task EnsureList(string url, string file, IFileSystem fileSystem, CancellationToken cancellationToken)
{
var fileInfo = fileSystem.GetFileInfo(file);
@@ -134,6 +146,12 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
return file;
}
+ ///
+ /// Get matching image for an item.
+ ///
+ /// The .
+ /// The enumerable of image strings.
+ /// The matching image string.
public string FindMatch(BaseItem item, IEnumerable images)
{
var name = GetComparableName(item.Name);
@@ -151,6 +169,11 @@ namespace MediaBrowser.Providers.Plugins.StudioImages
.Replace("/", string.Empty, StringComparison.Ordinal);
}
+ ///
+ /// Get available image strings for a file.
+ ///
+ /// The file.
+ /// All images strings of a file.
public IEnumerable GetAvailableImages(string file)
{
using var fileStream = File.OpenRead(file);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs b/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
index 0bab7c3cad..ac3df1d5d6 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Api/TmdbController.cs
@@ -8,7 +8,7 @@ using TMDbLib.Objects.General;
namespace MediaBrowser.Providers.Plugins.Tmdb.Api
{
///
- /// The TMDb api controller.
+ /// The TMDb API controller.
///
[ApiController]
[Authorize(Policy = "DefaultAuthorization")]
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
index 3217ac2f13..0e768bb832 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
@@ -7,7 +7,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
{
///
- /// External ID for a TMDB box set.
+ /// External id for a TMDb box set.
///
public class TmdbBoxSetExternalId : IExternalId
{
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs
index 29a557c315..ef878e6707 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -18,26 +16,38 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
{
+ ///
+ /// BoxSet image provider powered by TMDb.
+ ///
public class TmdbBoxSetImageProvider : IRemoteImageProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbBoxSetImageProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
public int Order => 0;
+ ///
public bool Supports(BaseItem item)
{
return item is BoxSet;
}
+ ///
public IEnumerable GetSupportedImages(BaseItem item)
{
return new List
@@ -47,6 +57,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
};
}
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var tmdbId = Convert.ToInt32(item.GetProviderId(MetadataProvider.Tmdb), CultureInfo.InvariantCulture);
@@ -76,6 +87,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
return remoteImages;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs
index 62bc9c65f9..90f2aa88f7 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -18,12 +16,21 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
{
+ ///
+ /// BoxSet provider powered by TMDb.
+ ///
public class TmdbBoxSetProvider : IRemoteMetadataProvider
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
private readonly ILibraryManager _libraryManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
+ /// The .
public TmdbBoxSetProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager, ILibraryManager libraryManager)
{
_httpClientFactory = httpClientFactory;
@@ -31,8 +38,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
_libraryManager = libraryManager;
}
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
public async Task> GetSearchResults(BoxSetInfo searchInfo, CancellationToken cancellationToken)
{
var tmdbId = Convert.ToInt32(searchInfo.GetProviderId(MetadataProvider.Tmdb), CultureInfo.InvariantCulture);
@@ -81,6 +90,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
return collections;
}
+ ///
public async Task> GetMetadata(BoxSetInfo info, CancellationToken cancellationToken)
{
var tmdbId = Convert.ToInt32(info.GetProviderId(MetadataProvider.Tmdb), CultureInfo.InvariantCulture);
@@ -124,6 +134,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
return result;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs
index 31310a8d41..38d2c5c69a 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs
@@ -7,7 +7,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
{
///
- /// External ID for a TMBD movie.
+ /// External id for a TMDb movie.
///
public class TmdbMovieExternalId : IExternalId
{
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieImageProvider.cs
index 16f0089f8f..1646a93d22 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieImageProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -19,26 +17,38 @@ using TMDbLib.Objects.Find;
namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
{
+ ///
+ /// Movie image provider powered by TMDb.
+ ///
public class TmdbMovieImageProvider : IRemoteImageProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbMovieImageProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
+ ///
public int Order => 0;
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
public bool Supports(BaseItem item)
{
return item is Movie || item is Trailer;
}
+ ///
public IEnumerable GetSupportedImages(BaseItem item)
{
return new List
@@ -49,6 +59,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
};
}
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var language = item.GetPreferredMetadataLanguage();
@@ -96,6 +107,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
return remoteImages;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs
index f14f31858c..dd2d5d97d9 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -23,7 +21,7 @@ using TMDbLib.Objects.Search;
namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
{
///
- /// Class MovieDbProvider.
+ /// Movie provider powered by TMDb.
///
public class TmdbMovieProvider : IRemoteMetadataProvider, IHasOrder
{
@@ -31,6 +29,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
private readonly ILibraryManager _libraryManager;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
+ /// The .
public TmdbMovieProvider(
ILibraryManager libraryManager,
TmdbClientManager tmdbClientManager,
@@ -41,11 +45,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
_httpClientFactory = httpClientFactory;
}
- public string Name => TmdbUtils.ProviderName;
-
///
public int Order => 1;
+ ///
+ public string Name => TmdbUtils.ProviderName;
+
+ ///
public async Task> GetSearchResults(MovieInfo searchInfo, CancellationToken cancellationToken)
{
if (searchInfo.TryGetProviderId(MetadataProvider.Tmdb, out var id))
@@ -133,6 +139,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
return remoteSearchResults;
}
+ ///
public async Task> GetMetadata(MovieInfo info, CancellationToken cancellationToken)
{
var tmdbId = info.GetProviderId(MetadataProvider.Tmdb);
@@ -144,7 +151,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
// Caller provides the filename with extension stripped and NOT the parsed filename
var parsedName = _libraryManager.ParseName(info.Name);
var cleanedName = TmdbUtils.CleanName(parsedName.Name);
- var searchResults = await _tmdbClientManager.SearchMovieAsync(cleanedName, info.Year ?? parsedName.Year ?? 0, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
+ var searchResults = await _tmdbClientManager.SearchMovieAsync(cleanedName, info.Year ?? parsedName.Year ?? 0, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
if (searchResults.Count > 0)
{
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs
index 9804d60bdd..027399aec2 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs
@@ -6,7 +6,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.People
{
///
- /// External ID for a TMDB person.
+ /// External id for a TMDb person.
///
public class TmdbPersonExternalId : IExternalId
{
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs
index 7ce4cfe676..d7f5c99dd2 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -14,11 +12,19 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.People
{
+ ///
+ /// Person image provider powered by TMDb.
+ ///
public class TmdbPersonImageProvider : IRemoteImageProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbPersonImageProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
@@ -31,11 +37,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
///
public int Order => 0;
+ ///
public bool Supports(BaseItem item)
{
return item is Person;
}
+ ///
public IEnumerable GetSupportedImages(BaseItem item)
{
return new List
@@ -44,6 +52,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
};
}
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var person = (Person)item;
@@ -68,6 +77,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
return remoteImages;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs
index 8790e37592..d760ad1426 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -16,19 +14,29 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.People
{
+ ///
+ /// Person image provider powered by TMDb.
+ ///
public class TmdbPersonProvider : IRemoteMetadataProvider
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbPersonProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
public async Task> GetSearchResults(PersonLookupInfo searchInfo, CancellationToken cancellationToken)
{
if (searchInfo.TryGetProviderId(MetadataProvider.Tmdb, out var personTmdbId))
@@ -79,6 +87,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
return remoteSearchResults;
}
+ ///
public async Task> GetMetadata(PersonLookupInfo info, CancellationToken cancellationToken)
{
var personTmdbId = Convert.ToInt32(info.GetProviderId(MetadataProvider.Tmdb), CultureInfo.InvariantCulture);
@@ -131,6 +140,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
return result;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs
index 5eec776b5b..943a3a75b2 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -17,22 +15,38 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
+ ///
+ /// TV episode image provider powered by TheMovieDb.
+ ///
public class TmdbEpisodeImageProvider : IRemoteImageProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbEpisodeImageProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
- // After TheTvDb
+ ///
public int Order => 1;
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
+ public bool Supports(BaseItem item)
+ {
+ return item is Controller.Entities.TV.Episode;
+ }
+
+ ///
public IEnumerable GetSupportedImages(BaseItem item)
{
return new List
@@ -41,6 +55,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
};
}
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var episode = (Controller.Entities.TV.Episode)item;
@@ -81,14 +96,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
return remoteImages;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
}
-
- public bool Supports(BaseItem item)
- {
- return item is Controller.Entities.TV.Episode;
- }
}
}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs
index f50f158772..e20284e6f8 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -19,22 +17,32 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
+ ///
+ /// TV episode provider powered by TheMovieDb.
+ ///
public class TmdbEpisodeProvider : IRemoteMetadataProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbEpisodeProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
- // After TheTvDb
+ ///
public int Order => 1;
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
public async Task> GetSearchResults(EpisodeInfo searchInfo, CancellationToken cancellationToken)
{
// The search query must either provide an episode number or date
@@ -68,6 +76,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
};
}
+ ///
public async Task> GetMetadata(EpisodeInfo info, CancellationToken cancellationToken)
{
var metadataResult = new MetadataResult();
@@ -209,6 +218,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
return metadataResult;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs
index 4446fa9665..da32ea4081 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -16,26 +14,47 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
+ ///
+ /// TV season image provider powered by TheMovieDb.
+ ///
public class TmdbSeasonImageProvider : IRemoteImageProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbSeasonImageProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
+ ///
public int Order => 1;
+ ///
public string Name => TmdbUtils.ProviderName;
- public Task GetImageResponse(string url, CancellationToken cancellationToken)
+ ///
+ public bool Supports(BaseItem item)
{
- return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
+ return item is Season;
}
+ ///
+ public IEnumerable GetSupportedImages(BaseItem item)
+ {
+ return new List
+ {
+ ImageType.Primary
+ };
+ }
+
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var season = (Season)item;
@@ -68,17 +87,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
return remoteImages;
}
- public IEnumerable GetSupportedImages(BaseItem item)
+ ///
+ public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
- return new List
- {
- ImageType.Primary
- };
- }
-
- public bool Supports(BaseItem item)
- {
- return item is Season;
+ return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
}
}
}
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs
index 64ed3f408d..2cf0f399e0 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -17,19 +15,29 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
+ ///
+ /// TV season provider powered by TheMovieDb.
+ ///
public class TmdbSeasonProvider : IRemoteMetadataProvider
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbSeasonProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
+ ///
public string Name => TmdbUtils.ProviderName;
+ ///
public async Task> GetMetadata(SeasonInfo info, CancellationToken cancellationToken)
{
var result = new MetadataResult();
@@ -114,11 +122,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
return result;
}
+ ///
public Task> GetSearchResults(SeasonInfo searchInfo, CancellationToken cancellationToken)
{
return Task.FromResult(Enumerable.Empty());
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs
index 8a2be80cde..df04cb2e73 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs
@@ -6,7 +6,7 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
///
- /// External ID for a TMDB series.
+ /// External id for a TMDb series.
///
public class TmdbSeriesExternalId : IExternalId
{
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs
index 130d6ce448..e96b680b48 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -16,27 +14,38 @@ using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
+ ///
+ /// TV series image provider powered by TheMovieDb.
+ ///
public class TmdbSeriesImageProvider : IRemoteImageProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
public TmdbSeriesImageProvider(IHttpClientFactory httpClientFactory, TmdbClientManager tmdbClientManager)
{
_httpClientFactory = httpClientFactory;
_tmdbClientManager = tmdbClientManager;
}
+ ///
public string Name => TmdbUtils.ProviderName;
- // After tvdb and fanart
+ ///
public int Order => 2;
+ ///
public bool Supports(BaseItem item)
{
return item is Series;
}
+ ///
public IEnumerable GetSupportedImages(BaseItem item)
{
return new List
@@ -47,6 +56,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
};
}
+ ///
public async Task> GetImages(BaseItem item, CancellationToken cancellationToken)
{
var tmdbId = item.GetProviderId(MetadataProvider.Tmdb);
@@ -80,6 +90,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
return remoteImages;
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
index 4d26052faf..4e8fdf0ee8 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
@@ -1,7 +1,5 @@
#nullable disable
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -23,12 +21,21 @@ using TMDbLib.Objects.TvShows;
namespace MediaBrowser.Providers.Plugins.Tmdb.TV
{
+ ///
+ /// TV series provider powered by TheMovieDb.
+ ///
public class TmdbSeriesProvider : IRemoteMetadataProvider, IHasOrder
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly ILibraryManager _libraryManager;
private readonly TmdbClientManager _tmdbClientManager;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ /// The .
+ /// The .
public TmdbSeriesProvider(
ILibraryManager libraryManager,
IHttpClientFactory httpClientFactory,
@@ -39,11 +46,13 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
_tmdbClientManager = tmdbClientManager;
}
+ ///
public string Name => TmdbUtils.ProviderName;
- // After TheTVDB
+ ///
public int Order => 1;
+ ///
public async Task> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken)
{
if (searchInfo.TryGetProviderId(MetadataProvider.Tmdb, out var tmdbId))
@@ -159,6 +168,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
return remoteResult;
}
+ ///
public async Task> GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
{
var result = new MetadataResult
@@ -383,6 +393,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
}
}
+ ///
public Task GetImageResponse(string url, CancellationToken cancellationToken)
{
return _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs
index 685eb222f7..44c2c81f44 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs
@@ -14,7 +14,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
private static readonly Regex _nonWords = new(@"[\W_]+", RegexOptions.Compiled);
///
- /// URL of the TMDB instance to use.
+ /// URL of the TMDb instance to use.
///
public const string BaseTmdbUrl = "https://www.themoviedb.org/";
@@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
}
///
- /// Maps the TMDB provided roles for crew members to Jellyfin roles.
+ /// Maps the TMDb provided roles for crew members to Jellyfin roles.
///
/// Crew member to map against the Jellyfin person types.
/// The Jellyfin person type.
@@ -103,9 +103,9 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
languages.Add(preferredLanguage);
- if (preferredLanguage.Length == 5) // like en-US
+ if (preferredLanguage.Length == 5) // Like en-US
{
- // Currently, TMDB supports 2-letter language codes only
+ // Currently, TMDb supports 2-letter language codes only.
// They are planning to change this in the future, thus we're
// supplying both codes if we're having a 5-letter code.
languages.Add(preferredLanguage.Substring(0, 2));
@@ -114,6 +114,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
languages.Add("null");
+ // Always add English as fallback language
if (!string.Equals(preferredLanguage, "en", StringComparison.OrdinalIgnoreCase))
{
languages.Add("en");
@@ -134,14 +135,14 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
return language;
}
- // They require this to be uppercase
- // Everything after the hyphen must be written in uppercase due to a way TMDB wrote their api.
+ // TMDb requires this to be uppercase
+ // Everything after the hyphen must be written in uppercase due to a way TMDb wrote their API.
// See here: https://www.themoviedb.org/talk/5119221d760ee36c642af4ad?page=3#56e372a0c3a3685a9e0019ab
var parts = language.Split('-');
if (parts.Length == 2)
{
- // TMDB doesn't support Switzerland (de-CH, it-CH or fr-CH) so use the language (de, it or fr) without country code
+ // TMDb doesn't support Switzerland (de-CH, it-CH or fr-CH) so use the language (de, it or fr) without country code
if (string.Equals(parts[1], "CH", StringComparison.OrdinalIgnoreCase))
{
return parts[0];
@@ -174,14 +175,14 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
}
///
- /// Combines the metadata country code and the parental rating from the Api into the value we store in our database.
+ /// Combines the metadata country code and the parental rating from the API into the value we store in our database.
///
- /// The Iso 3166-1 country code of the rating country.
- /// The rating value returned by the Tmdb Api.
+ /// The ISO 3166-1 country code of the rating country.
+ /// The rating value returned by the TMDb API.
/// The combined parental rating of country code+rating value.
public static string BuildParentalRating(string countryCode, string ratingValue)
{
- // exclude US because we store us values as TV-14 without the country code.
+ // Exclude US because we store US values as TV-14 without the country code.
var ratingPrefix = string.Equals(countryCode, "US", StringComparison.OrdinalIgnoreCase) ? string.Empty : countryCode + "-";
var newRating = ratingPrefix + ratingValue;
diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs
index da348239a1..9e197e737b 100644
--- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs
+++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -23,6 +21,10 @@ using Microsoft.Extensions.Logging;
namespace MediaBrowser.XbmcMetadata.Parsers
{
+ ///
+ /// The BaseNfoParser class.
+ ///
+ /// The type.
public class BaseNfoParser
where T : BaseItem
{
@@ -63,16 +65,22 @@ namespace MediaBrowser.XbmcMetadata.Parsers
///
protected ILogger Logger { get; }
+ ///
+ /// Gets the provider manager.
+ ///
protected IProviderManager ProviderManager { get; }
+ ///
+ /// Gets a value indicating whether URLs after a closing XML tag are supporrted.
+ ///
protected virtual bool SupportsUrlAfterClosingXmlTag => false;
///
/// Fetches metadata for an item from one xml file.
///
- /// The item.
+ /// The .
/// The metadata file.
- /// The cancellation token.
+ /// The .
/// item is null.
/// metadataFile is null or empty.
public void Fetch(MetadataResult item, string metadataFile, CancellationToken cancellationToken)
@@ -111,10 +119,10 @@ namespace MediaBrowser.XbmcMetadata.Parsers
///
/// Fetches the specified item.
///
- /// The item.
+ /// The .
/// The metadata file.
- /// The settings.
- /// The cancellation token.
+ /// The .
+ /// The .
protected virtual void Fetch(MetadataResult item, string metadataFile, XmlReaderSettings settings, CancellationToken cancellationToken)
{
if (!SupportsUrlAfterClosingXmlTag)
@@ -170,7 +178,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
ParseProviderLinks(item.Item, endingXml);
- // If the file is just an imdb url, don't go any further
+ // If the file is just an IMDb url, don't go any further
if (index == 0)
{
return;
@@ -216,6 +224,11 @@ namespace MediaBrowser.XbmcMetadata.Parsers
}
}
+ ///
+ /// Parses a XML tag to a provider id.
+ ///
+ /// The item.
+ /// The xml tag.
protected void ParseProviderLinks(T item, ReadOnlySpan xml)
{
if (ProviderIdParsers.TryFindImdbId(xml, out var imdbId))
@@ -245,6 +258,11 @@ namespace MediaBrowser.XbmcMetadata.Parsers
}
}
+ ///
+ /// Fetches metadata from an XML node.
+ ///
+ /// The .
+ /// The .
protected virtual void FetchDataFromXmlNode(XmlReader reader, MetadataResult itemResult)
{
var item = itemResult.Item;
@@ -1100,17 +1118,14 @@ namespace MediaBrowser.XbmcMetadata.Parsers
switch (reader.Name)
{
case "language":
+ _ = reader.ReadElementContentAsString();
+ if (item is Video video)
{
- _ = reader.ReadElementContentAsString();
-
- if (item is Video video)
- {
- video.HasSubtitles = true;
- }
-
- break;
+ video.HasSubtitles = true;
}
+ break;
+
default:
reader.Skip();
break;
@@ -1136,21 +1151,21 @@ namespace MediaBrowser.XbmcMetadata.Parsers
switch (reader.Name)
{
case "rating":
- {
- if (reader.IsEmptyElement)
{
- reader.Read();
- continue;
+ if (reader.IsEmptyElement)
+ {
+ reader.Read();
+ continue;
+ }
+
+ var ratingName = reader.GetAttribute("name");
+
+ using var subtree = reader.ReadSubtree();
+ FetchFromRatingNode(subtree, item, ratingName);
+
+ break;
}
- var ratingName = reader.GetAttribute("name");
-
- using var subtree = reader.ReadSubtree();
- FetchFromRatingNode(subtree, item, ratingName);
-
- break;
- }
-
default:
reader.Skip();
break;
@@ -1210,9 +1225,9 @@ namespace MediaBrowser.XbmcMetadata.Parsers
}
///
- /// Gets the persons from XML node.
+ /// Gets the persons from a XML node.
///
- /// The reader.
+ /// The .
/// IEnumerable{PersonInfo}.
private PersonInfo GetPersonFromXmlNode(XmlReader reader)
{
@@ -1348,10 +1363,10 @@ namespace MediaBrowser.XbmcMetadata.Parsers
}
///
- /// Parses the ImageType from the nfo aspect property.
+ /// Parses the from the NFO aspect property.
///
- /// The nfo aspect property.
- /// The image type.
+ /// The NFO aspect property.
+ /// The .
private static ImageType GetImageType(string aspect)
{
return aspect switch