The Free Software Media System - Server Backend & API
Document all public/internal members of Emby.Drawing
Bond_009838e5d05d51c
diff --git a/BDInfo/BDInfo.csproj b/BDInfo/BDInfo.csprojindex b2c752d0c8..9dbaa9e2f0 100644--- a/BDInfo/BDInfo.csproj+++ b/BDInfo/BDInfo.csproj@@ -11,6 +11,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/DvdLib/DvdLib.csproj b/DvdLib/DvdLib.csprojindex b2c752d0c8..9dbaa9e2f0 100644--- a/DvdLib/DvdLib.csproj+++ b/DvdLib/DvdLib.csproj@@ -11,6 +11,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/Emby.Dlna/Emby.Dlna.csproj b/Emby.Dlna/Emby.Dlna.csprojindex 4c07087c53..34b49120bb 100644--- a/Emby.Dlna/Emby.Dlna.csproj+++ b/Emby.Dlna/Emby.Dlna.csproj@@ -14,6 +14,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup><ItemGroup>diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csprojindex 9f97baf772..716de059dc 100644--- a/Emby.Drawing/Emby.Drawing.csproj+++ b/Emby.Drawing/Emby.Drawing.csproj@@ -3,6 +3,8 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile>+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors></PropertyGroup><ItemGroup>diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.csindex a7d95eb209..ce8089e59c 100644--- a/Emby.Drawing/ImageProcessor.cs+++ b/Emby.Drawing/ImageProcessor.cs@@ -22,42 +22,47 @@ using Microsoft.Extensions.Logging;namespace Emby.Drawing{/// <summary>- /// Class ImageProcessor+ /// Class ImageProcessor./// </summary>public class ImageProcessor : IImageProcessor, IDisposable{- /// <summary>- /// The us culture- /// </summary>- protected readonly CultureInfo UsCulture = new CultureInfo("en-US");+ // Increment this when there's a change requiring caches to be invalidated+ private const string Version = "3";- /// <summary>- /// Gets the list of currently registered image processors- /// Image processors are specialized metadata providers that run after the normal ones- /// </summary>- /// <value>The image enhancers.</value>- public IImageEnhancer[] ImageEnhancers { get; private set; }+ private static readonly HashSet<string> _transparentImageTypes+ = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".webp", ".gif" };/// <summary>/// The _logger/// </summary>private readonly ILogger _logger;-private readonly IFileSystem _fileSystem;private readonly IServerApplicationPaths _appPaths;private IImageEncoder _imageEncoder;private readonly Func<ILibraryManager> _libraryManager;private readonly Func<IMediaEncoder> _mediaEncoder;+ private readonly Dictionary<string, LockInfo> _locks = new Dictionary<string, LockInfo>();+ private bool _disposed = false;++ /// <summary>+ ///+ /// </summary>+ /// <param name="logger"></param>+ /// <param name="appPaths"></param>+ /// <param name="fileSystem"></param>+ /// <param name="imageEncoder"></param>+ /// <param name="libraryManager"></param>+ /// <param name="mediaEncoder"></param>public ImageProcessor(- ILoggerFactory loggerFactory,+ ILogger<ImageProcessor> logger,IServerApplicationPaths appPaths,IFileSystem fileSystem,IImageEncoder imageEncoder,Func<ILibraryManager> libraryManager,Func<IMediaEncoder> mediaEncoder){- _logger = loggerFactory.CreateLogger(nameof(ImageProcessor));+ _logger = logger;_fileSystem = fileSystem;_imageEncoder = imageEncoder;_libraryManager = libraryManager;@@ -69,20 +74,11 @@ namespace Emby.DrawingImageHelper.ImageProcessor = this;}- public IImageEncoder ImageEncoder- {- get => _imageEncoder;- set- {- if (value == null)- {- throw new ArgumentNullException(nameof(value));- }+ private string ResizedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "resized-images");- _imageEncoder = value;- }- }+ private string EnhancedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "enhanced-images");+ /// <inheritdoc />public IReadOnlyCollection<string> SupportedInputFormats =>new HashSet<string>(StringComparer.OrdinalIgnoreCase){@@ -115,18 +111,20 @@ namespace Emby.Drawing"wbmp"};+ /// <inheritdoc />+ public IReadOnlyCollection<IImageEnhancer> ImageEnhancers { get; set; }+ /// <inheritdoc />public bool SupportsImageCollageCreation => _imageEncoder.SupportsImageCollageCreation;- private string ResizedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "resized-images");-- private string EnhancedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "enhanced-images");-- public void AddParts(IEnumerable<IImageEnhancer> enhancers)+ /// <inheritdoc />+ public IImageEncoder ImageEncoder{- ImageEnhancers = enhancers.ToArray();+ get => _imageEncoder;+ set => _imageEncoder = value ?? throw new ArgumentNullException(nameof(value));}+ /// <inheritdoc />public async Task ProcessImage(ImageProcessingOptions options, Stream toStream){var file = await ProcessImage(options).ConfigureAwait(false);@@ -137,15 +135,15 @@ namespace Emby.Drawing}}+ /// <inheritdoc />public IReadOnlyCollection<ImageFormat> GetSupportedImageOutputFormats()=> _imageEncoder.SupportedOutputFormats;- private static readonly HashSet<string> TransparentImageTypes- = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".webp", ".gif" };-+ /// <inheritdoc />public bool SupportsTransparency(string path)- => TransparentImageTypes.Contains(Path.GetExtension(path));+ => _transparentImageTypes.Contains(Path.GetExtension(path));+ /// <inheritdoc />public async Task<(string path, string mimeType, DateTime dateModified)> ProcessImage(ImageProcessingOptions options){if (options == null)@@ -187,9 +185,9 @@ namespace Emby.Drawing}dateModified = supportedImageInfo.dateModified;- bool requiresTransparency = TransparentImageTypes.Contains(Path.GetExtension(originalImagePath));+ bool requiresTransparency = _transparentImageTypes.Contains(Path.GetExtension(originalImagePath));- if (options.Enhancers.Length > 0)+ if (options.Enhancers.Count > 0){if (item == null){@@ -279,7 +277,7 @@ namespace Emby.Drawing}}- private ImageFormat GetOutputFormat(ImageFormat[] clientSupportedFormats, bool requiresTransparency)+ private ImageFormat GetOutputFormat(IReadOnlyCollection<ImageFormat> clientSupportedFormats, bool requiresTransparency){var serverFormats = GetSupportedImageOutputFormats();@@ -320,11 +318,6 @@ namespace Emby.Drawing}}- /// <summary>- /// Increment this when there's a change requiring caches to be invalidated- /// </summary>- private const string Version = "3";-/// <summary>/// Gets the cache file path based on a set of parameters/// </summary>@@ -372,9 +365,11 @@ namespace Emby.Drawingreturn GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLowerInvariant());}+ /// <inheritdoc />public ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info)=> GetImageDimensions(item, info, true);+ /// <inheritdoc />public ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info, bool updateItem){int width = info.Width;@@ -400,26 +395,19 @@ namespace Emby.Drawingreturn size;}- /// <summary>- /// Gets the size of the image.- /// </summary>+ /// <inheritdoc />public ImageDimensions GetImageDimensions(string path)=> _imageEncoder.GetImageSize(path);- /// <summary>- /// Gets the image cache tag.- /// </summary>- /// <param name="item">The item.</param>- /// <param name="image">The image.</param>- /// <returns>Guid.</returns>- /// <exception cref="ArgumentNullException">item</exception>+ /// <inheritdoc />public string GetImageCacheTag(BaseItem item, ItemImageInfo image){- var supportedEnhancers = GetSupportedEnhancers(item, image.Type);+ var supportedEnhancers = GetSupportedEnhancers(item, image.Type).ToArray();return GetImageCacheTag(item, image, supportedEnhancers);}+ /// <inheritdoc />public string GetImageCacheTag(BaseItem item, ChapterInfo chapter){try@@ -437,22 +425,15 @@ namespace Emby.Drawing}}- /// <summary>- /// Gets the image cache tag.- /// </summary>- /// <param name="item">The item.</param>- /// <param name="image">The image.</param>- /// <param name="imageEnhancers">The image enhancers.</param>- /// <returns>Guid.</returns>- /// <exception cref="ArgumentNullException">item</exception>- public string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers)+ /// <inheritdoc />+ public string GetImageCacheTag(BaseItem item, ItemImageInfo image, IReadOnlyCollection<IImageEnhancer> imageEnhancers){string originalImagePath = image.Path;DateTime dateModified = image.DateModified;ImageType imageType = image.Type;// Optimization- if (imageEnhancers.Length == 0)+ if (imageEnhancers.Count == 0){return (originalImagePath + dateModified.Ticks).GetMD5().ToString("N", CultureInfo.InvariantCulture);}@@ -480,7 +461,7 @@ namespace Emby.Drawing{try{- string filename = (originalImagePath + dateModified.Ticks.ToString(UsCulture)).GetMD5().ToString("N", CultureInfo.InvariantCulture);+ string filename = (originalImagePath + dateModified.Ticks.ToString(CultureInfo.InvariantCulture)).GetMD5().ToString("N", CultureInfo.InvariantCulture);string cacheExtension = _mediaEncoder().SupportsEncoder("libwebp") ? ".webp" : ".png";var outputPath = Path.Combine(_appPaths.ImageCachePath, "converted-images", filename + cacheExtension);@@ -507,16 +488,10 @@ namespace Emby.Drawingreturn (originalImagePath, dateModified);}- /// <summary>- /// Gets the enhanced image.- /// </summary>- /// <param name="item">The item.</param>- /// <param name="imageType">Type of the image.</param>- /// <param name="imageIndex">Index of the image.</param>- /// <returns>Task{System.String}.</returns>+ /// <inheritdoc />public async Task<string> GetEnhancedImage(BaseItem item, ImageType imageType, int imageIndex){- var enhancers = GetSupportedEnhancers(item, imageType);+ var enhancers = GetSupportedEnhancers(item, imageType).ToArray();ItemImageInfo imageInfo = item.GetImageInfo(imageType, imageIndex);@@ -532,7 +507,7 @@ namespace Emby.Drawingbool inputImageSupportsTransparency,BaseItem item,int imageIndex,- IImageEnhancer[] enhancers,+ IReadOnlyCollection<IImageEnhancer> enhancers,CancellationToken cancellationToken){var originalImagePath = image.Path;@@ -573,6 +548,7 @@ namespace Emby.Drawing/// <param name="imageIndex">Index of the image.</param>/// <param name="supportedEnhancers">The supported enhancers.</param>/// <param name="cacheGuid">The cache unique identifier.</param>+ /// <param name="cancellationToken">The cancellation token.</param>/// <returns>Task<System.String>.</returns>/// <exception cref="ArgumentNullException">/// originalImagePath@@ -584,9 +560,9 @@ namespace Emby.DrawingBaseItem item,ImageType imageType,int imageIndex,- IImageEnhancer[] supportedEnhancers,+ IReadOnlyCollection<IImageEnhancer> supportedEnhancers,string cacheGuid,- CancellationToken cancellationToken)+ CancellationToken cancellationToken = default){if (string.IsNullOrEmpty(originalImagePath)){@@ -680,6 +656,7 @@ namespace Emby.Drawing{throw new ArgumentNullException(nameof(path));}+if (string.IsNullOrEmpty(uniqueName)){throw new ArgumentNullException(nameof(uniqueName));@@ -722,6 +699,7 @@ namespace Emby.Drawingreturn Path.Combine(path, prefix, filename);}+ /// <inheritdoc />public void CreateImageCollage(ImageCollageOptions options){_logger.LogInformation("Creating image collage and saving to {Path}", options.OutputPath);@@ -731,38 +709,25 @@ namespace Emby.Drawing_logger.LogInformation("Completed creation of image collage and saved to {Path}", options.OutputPath);}- public IImageEnhancer[] GetSupportedEnhancers(BaseItem item, ImageType imageType)+ /// <inheritdoc />+ public IEnumerable<IImageEnhancer> GetSupportedEnhancers(BaseItem item, ImageType imageType){- List<IImageEnhancer> list = null;-foreach (var i in ImageEnhancers){- try- {- if (i.Supports(item, imageType))- {- if (list == null)- {- list = new List<IImageEnhancer>();- }- list.Add(i);- }- }- catch (Exception ex)+ if (i.Supports(item, imageType)){- _logger.LogError(ex, "Error in image enhancer: {0}", i.GetType().Name);+ yield return i;}}-- return list == null ? Array.Empty<IImageEnhancer>() : list.ToArray();}- private Dictionary<string, LockInfo> _locks = new Dictionary<string, LockInfo>();+private class LockInfo{public SemaphoreSlim Lock = new SemaphoreSlim(1, 1);public int Count = 1;}+private LockInfo GetLock(string key){lock (_locks)@@ -795,7 +760,7 @@ namespace Emby.Drawing}}- private bool _disposed;+ /// <inheritdoc />public void Dispose(){_disposed = true;diff --git a/Emby.Drawing/NullImageEncoder.cs b/Emby.Drawing/NullImageEncoder.csindex fc4a5af9fc..5af7f16225 100644--- a/Emby.Drawing/NullImageEncoder.cs+++ b/Emby.Drawing/NullImageEncoder.cs@@ -5,36 +5,40 @@ using MediaBrowser.Model.Drawing;namespace Emby.Drawing{+ /// <summary>+ /// A fallback implementation of <see cref="IImageEncoder" />.+ /// </summary>public class NullImageEncoder : IImageEncoder{+ /// <inheritdoc />public IReadOnlyCollection<string> SupportedInputFormats=> new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "png", "jpeg", "jpg" };+ /// <inheritdoc />public IReadOnlyCollection<ImageFormat> SupportedOutputFormats=> new HashSet<ImageFormat>() { ImageFormat.Jpg, ImageFormat.Png };- public void CropWhiteSpace(string inputPath, string outputPath)- {- throw new NotImplementedException();- }-- public string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)- {- throw new NotImplementedException();- }-- public void CreateImageCollage(ImageCollageOptions options)- {- throw new NotImplementedException();- }-+ /// <inheritdoc />public string Name => "Null Image Encoder";+ /// <inheritdoc />public bool SupportsImageCollageCreation => false;+ /// <inheritdoc />public bool SupportsImageEncoding => false;+ /// <inheritdoc />public ImageDimensions GetImageSize(string path)+ => throw new NotImplementedException();++ /// <inheritdoc />+ public string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)+ {+ throw new NotImplementedException();+ }++ /// <inheritdoc />+ public void CreateImageCollage(ImageCollageOptions options){throw new NotImplementedException();}diff --git a/Emby.IsoMounting/IsoMounter/IsoMounter.csproj b/Emby.IsoMounting/IsoMounter/IsoMounter.csprojindex dafa51cd51..0778b987bc 100644--- a/Emby.IsoMounting/IsoMounter/IsoMounter.csproj+++ b/Emby.IsoMounting/IsoMounter/IsoMounter.csproj@@ -12,6 +12,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/Emby.Notifications/Emby.Notifications.csproj b/Emby.Notifications/Emby.Notifications.csprojindex 5c68e48c8f..cbd3bde4f9 100644--- a/Emby.Notifications/Emby.Notifications.csproj+++ b/Emby.Notifications/Emby.Notifications.csproj@@ -3,6 +3,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup><ItemGroup>diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csprojindex c9830abc5f..39b97a3bff 100644--- a/Emby.Photos/Emby.Photos.csproj+++ b/Emby.Photos/Emby.Photos.csproj@@ -16,6 +16,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 09847b2f86..b620f6be2e 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -510,13 +510,8 @@ namespace Emby.Server.Implementationsreturn AllConcreteTypes.Where(i => currentType.IsAssignableFrom(i));}- /// <summary>- /// Gets the exports.- /// </summary>- /// <typeparam name="T">The type</typeparam>- /// <param name="manageLifetime">if set to <c>true</c> [manage lifetime].</param>- /// <returns>IEnumerable{``0}.</returns>- public IEnumerable<T> GetExports<T>(bool manageLifetime = true)+ /// <inheritdoc />+ public IReadOnlyCollection<T> GetExports<T>(bool manageLifetime = true){var parts = GetExportTypes<T>().Select(CreateInstanceSafe)@@ -538,6 +533,7 @@ namespace Emby.Server.Implementations/// <summary>/// Runs the startup tasks./// </summary>+ /// <returns><see cref="Task" />.</returns>public async Task RunStartupTasksAsync(){Logger.LogInformation("Running startup tasks");@@ -550,7 +546,7 @@ namespace Emby.Server.ImplementationsLogger.LogInformation("ServerId: {0}", SystemId);- var entryPoints = GetExports<IServerEntryPoint>().ToList();+ var entryPoints = GetExports<IServerEntryPoint>();var stopWatch = new Stopwatch();stopWatch.Start();@@ -801,7 +797,7 @@ namespace Emby.Server.ImplementationsserviceCollection.AddSingleton(HttpServer);- ImageProcessor = GetImageProcessor();+ ImageProcessor = new ImageProcessor(LoggerFactory.CreateLogger<ImageProcessor>(), ServerConfigurationManager.ApplicationPaths, FileSystemManager, ImageEncoder, () => LibraryManager, () => MediaEncoder);serviceCollection.AddSingleton(ImageProcessor);TVSeriesManager = new TVSeriesManager(UserManager, UserDataManager, LibraryManager, ServerConfigurationManager);@@ -953,11 +949,6 @@ namespace Emby.Server.Implementations}}- private IImageProcessor GetImageProcessor()- {- return new ImageProcessor(LoggerFactory, ServerConfigurationManager.ApplicationPaths, FileSystemManager, ImageEncoder, () => LibraryManager, () => MediaEncoder);- }-/// <summary>/// Gets the user repository./// </summary>@@ -1087,7 +1078,7 @@ namespace Emby.Server.ImplementationsGetExports<IMetadataSaver>(),GetExports<IExternalId>());- ImageProcessor.AddParts(GetExports<IImageEnhancer>());+ ImageProcessor.ImageEnhancers = GetExports<IImageEnhancer>();LiveTvManager.AddParts(GetExports<ILiveTvService>(), GetExports<ITunerHost>(), GetExports<IListingsProvider>());diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 6e7aa13139..1a7f10634b 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -1364,7 +1364,7 @@ namespace Emby.Server.Implementations.Dtoreturn null;}- var supportedEnhancers = _imageProcessor.GetSupportedEnhancers(item, ImageType.Primary);+ var supportedEnhancers = _imageProcessor.GetSupportedEnhancers(item, ImageType.Primary).ToArray();ImageDimensions size;diff --git a/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj b/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csprojindex 0225be2c2f..04f5581736 100644--- a/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj+++ b/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj@@ -3,6 +3,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup><ItemGroup>diff --git a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csprojindex f023bc55dc..396bdd4b71 100644--- a/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj+++ b/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj@@ -3,6 +3,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup><ItemGroup>diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.csindex 23c7339d27..6d3037b24c 100644--- a/MediaBrowser.Api/Images/ImageService.cs+++ b/MediaBrowser.Api/Images/ImageService.cs@@ -550,14 +550,14 @@ namespace MediaBrowser.Api.Images}IImageEnhancer[] supportedImageEnhancers;- if (_imageProcessor.ImageEnhancers.Length > 0)+ if (_imageProcessor.ImageEnhancers.Count > 0){if (item == null){item = _libraryManager.GetItemById(itemId);}- supportedImageEnhancers = request.EnableImageEnhancers ? _imageProcessor.GetSupportedEnhancers(item, request.Type) : Array.Empty<IImageEnhancer>();+ supportedImageEnhancers = request.EnableImageEnhancers ? _imageProcessor.GetSupportedEnhancers(item, request.Type).ToArray() : Array.Empty<IImageEnhancer>();}else{@@ -606,8 +606,8 @@ namespace MediaBrowser.Api.ImagesImageRequest request,ItemImageInfo image,bool cropwhitespace,- ImageFormat[] supportedFormats,- IImageEnhancer[] enhancers,+ IReadOnlyCollection<ImageFormat> supportedFormats,+ IReadOnlyCollection<IImageEnhancer> enhancers,TimeSpan? cacheDuration,IDictionary<string, string> headers,bool isHeadRequest)diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csprojindex ba29c656bf..f653270a6c 100644--- a/MediaBrowser.Api/MediaBrowser.Api.csproj+++ b/MediaBrowser.Api/MediaBrowser.Api.csproj@@ -12,6 +12,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.csindex cb7343440a..2248e9c859 100644--- a/MediaBrowser.Common/IApplicationHost.cs+++ b/MediaBrowser.Common/IApplicationHost.cs@@ -75,10 +75,10 @@ namespace MediaBrowser.Common/// <summary>/// Gets the exports./// </summary>- /// <typeparam name="T"></typeparam>- /// <param name="manageLiftime">if set to <c>true</c> [manage liftime].</param>- /// <returns>IEnumerable{``0}.</returns>- IEnumerable<T> GetExports<T>(bool manageLifetime = true);+ /// <typeparam name="T">The type.</typeparam>+ /// <param name="manageLifetime">If set to <c>true</c> [manage lifetime].</param>+ /// <returns><see cref="IReadOnlyCollection{T}" />.</returns>+ IReadOnlyCollection<T> GetExports<T>(bool manageLifetime = true);/// <summary>/// Resolves this instance.diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csprojindex 05b48a2a12..1b753aa294 100644--- a/MediaBrowser.Common/MediaBrowser.Common.csproj+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj@@ -23,6 +23,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/MediaBrowser.Controller/Drawing/IImageEncoder.cs b/MediaBrowser.Controller/Drawing/IImageEncoder.csindex 4eaecd0a0e..a0f9ae46e4 100644--- a/MediaBrowser.Controller/Drawing/IImageEncoder.cs+++ b/MediaBrowser.Controller/Drawing/IImageEncoder.cs@@ -17,16 +17,6 @@ namespace MediaBrowser.Controller.Drawing/// <value>The supported output formats.</value>IReadOnlyCollection<ImageFormat> SupportedOutputFormats { get; }- /// <summary>- /// Encodes the image.- /// </summary>- string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat);-- /// <summary>- /// Creates the image collage.- /// </summary>- /// <param name="options">The options.</param>- void CreateImageCollage(ImageCollageOptions options);/// <summary>/// Gets the name./// </summary>@@ -46,5 +36,16 @@ namespace MediaBrowser.Controller.Drawingbool SupportsImageEncoding { get; }ImageDimensions GetImageSize(string path);++ /// <summary>+ /// Encodes the image.+ /// </summary>+ string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat);++ /// <summary>+ /// Creates the image collage.+ /// </summary>+ /// <param name="options">The options.</param>+ void CreateImageCollage(ImageCollageOptions options);}}diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.csindex a11e2186fd..a58a11bd1f 100644--- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs+++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs@@ -24,7 +24,15 @@ namespace MediaBrowser.Controller.Drawing/// Gets the image enhancers./// </summary>/// <value>The image enhancers.</value>- IImageEnhancer[] ImageEnhancers { get; }+ IReadOnlyCollection<IImageEnhancer> ImageEnhancers { get; set; }++ /// <summary>+ /// Gets a value indicating whether [supports image collage creation].+ /// </summary>+ /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value>+ bool SupportsImageCollageCreation { get; }++ IImageEncoder ImageEncoder { get; set; }/// <summary>/// Gets the dimensions of the image.@@ -50,19 +58,13 @@ namespace MediaBrowser.Controller.Drawing/// <returns>ImageDimensions</returns>ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info, bool updateItem);- /// <summary>- /// Adds the parts.- /// </summary>- /// <param name="enhancers">The enhancers.</param>- void AddParts(IEnumerable<IImageEnhancer> enhancers);-/// <summary>/// Gets the supported enhancers./// </summary>/// <param name="item">The item.</param>/// <param name="imageType">Type of the image.</param>/// <returns>IEnumerable{IImageEnhancer}.</returns>- IImageEnhancer[] GetSupportedEnhancers(BaseItem item, ImageType imageType);+ IEnumerable<IImageEnhancer> GetSupportedEnhancers(BaseItem item, ImageType imageType);/// <summary>/// Gets the image cache tag.@@ -80,7 +82,7 @@ namespace MediaBrowser.Controller.Drawing/// <param name="image">The image.</param>/// <param name="imageEnhancers">The image enhancers.</param>/// <returns>Guid.</returns>- string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers);+ string GetImageCacheTag(BaseItem item, ItemImageInfo image, IReadOnlyCollection<IImageEnhancer> imageEnhancers);/// <summary>/// Processes the image.@@ -109,7 +111,7 @@ namespace MediaBrowser.Controller.Drawing/// <summary>/// Gets the supported image output formats./// </summary>- /// <returns>IReadOnlyCollection{ImageOutput}.</returns>+ /// <returns><see cref="IReadOnlyCollection{ImageOutput}" />.</returns>IReadOnlyCollection<ImageFormat> GetSupportedImageOutputFormats();/// <summary>@@ -118,14 +120,6 @@ namespace MediaBrowser.Controller.Drawing/// <param name="options">The options.</param>void CreateImageCollage(ImageCollageOptions options);- /// <summary>- /// Gets a value indicating whether [supports image collage creation].- /// </summary>- /// <value><c>true</c> if [supports image collage creation]; otherwise, <c>false</c>.</value>- bool SupportsImageCollageCreation { get; }-- IImageEncoder ImageEncoder { get; set; }-bool SupportsTransparency(string path);}}diff --git a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.csindex db432f500e..29addf6e65 100644--- a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs+++ b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs@@ -1,4 +1,5 @@using System;+using System.Collections.Generic;using System.IO;using System.Linq;using MediaBrowser.Controller.Entities;@@ -33,9 +34,9 @@ namespace MediaBrowser.Controller.Drawingpublic int Quality { get; set; }- public IImageEnhancer[] Enhancers { get; set; }+ public IReadOnlyCollection<IImageEnhancer> Enhancers { get; set; }- public ImageFormat[] SupportedOutputFormats { get; set; }+ public IReadOnlyCollection<ImageFormat> SupportedOutputFormats { get; set; }public bool AddPlayedIndicator { get; set; }diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csprojindex 01893f1b55..c6bca25182 100644--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj@@ -19,6 +19,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csprojindex 867b82eded..a8f8da9b83 100644--- a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj+++ b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj@@ -12,6 +12,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csprojindex c0f92ac4a4..05af9fd03d 100644--- a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj+++ b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj@@ -3,6 +3,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup><ItemGroup>diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csprojindex 3de2cca2d2..e9f43ea56b 100644--- a/MediaBrowser.Model/MediaBrowser.Model.csproj+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj@@ -10,6 +10,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup><ItemGroup>diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csprojindex 5941ed4369..ab4759c61e 100644--- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj+++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj@@ -21,6 +21,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csprojindex c099e77d65..8839868944 100644--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj@@ -18,6 +18,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>diff --git a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csprojindex ba29c656bf..f653270a6c 100644--- a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj+++ b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj@@ -12,6 +12,7 @@<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GenerateAssemblyInfo>false</GenerateAssemblyInfo>+ <GenerateDocumentationFile>true</GenerateDocumentationFile></PropertyGroup></Project>