aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorDavid Ullmer <davidullmer@outlook.de>2021-08-17 18:11:38 +0200
committerCody Robibero <cody@robibe.ro>2022-01-04 08:20:16 -0700
commit3fb3ee074a375d0afd4d7d81252ba535d885afb8 (patch)
tree327112e24e12a389cca09484849778feb4d932f9 /MediaBrowser.Controller
parent0fd4ff44513b195bb43368c7002d08991fed6c98 (diff)
Remove splashscreen generation from IImageEncoder and add IImageGenerator
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Drawing/GeneratedImages.cs13
-rw-r--r--MediaBrowser.Controller/Drawing/IImageEncoder.cs6
-rw-r--r--MediaBrowser.Controller/Drawing/IImageGenerator.cs17
-rw-r--r--MediaBrowser.Controller/Drawing/SplashscreenOptions.cs20
4 files changed, 31 insertions, 25 deletions
diff --git a/MediaBrowser.Controller/Drawing/GeneratedImages.cs b/MediaBrowser.Controller/Drawing/GeneratedImages.cs
new file mode 100644
index 000000000..47b60979b
--- /dev/null
+++ b/MediaBrowser.Controller/Drawing/GeneratedImages.cs
@@ -0,0 +1,13 @@
+namespace MediaBrowser.Controller.Drawing
+{
+ /// <summary>
+ /// Which generated images an <see cref="IImageGenerator"/> supports.
+ /// </summary>
+ public enum GeneratedImages
+ {
+ /// <summary>
+ /// The splashscreen.
+ /// </summary>
+ Splashscreen
+ }
+}
diff --git a/MediaBrowser.Controller/Drawing/IImageEncoder.cs b/MediaBrowser.Controller/Drawing/IImageEncoder.cs
index 57d73699f..4e67cfee4 100644
--- a/MediaBrowser.Controller/Drawing/IImageEncoder.cs
+++ b/MediaBrowser.Controller/Drawing/IImageEncoder.cs
@@ -74,11 +74,5 @@ namespace MediaBrowser.Controller.Drawing
/// <param name="options">The options to use when creating the collage.</param>
/// <param name="libraryName">Optional. </param>
void CreateImageCollage(ImageCollageOptions options, string? libraryName);
-
- /// <summary>
- /// Creates a splashscreen image.
- /// </summary>
- /// <param name="options">The options to use when creating the splashscreen.</param>
- void CreateSplashscreen(SplashscreenOptions options);
}
}
diff --git a/MediaBrowser.Controller/Drawing/IImageGenerator.cs b/MediaBrowser.Controller/Drawing/IImageGenerator.cs
new file mode 100644
index 000000000..21699c3f0
--- /dev/null
+++ b/MediaBrowser.Controller/Drawing/IImageGenerator.cs
@@ -0,0 +1,17 @@
+namespace MediaBrowser.Controller.Drawing
+{
+ public interface IImageGenerator
+ {
+ /// <summary>
+ /// Gets the supported generated images of the image generator.
+ /// </summary>
+ /// <returns>The supported images.</returns>
+ GeneratedImages[] GetSupportedImages();
+
+ /// <summary>
+ /// Generates a splashscreen.
+ /// </summary>
+ /// <param name="generationOptions">The options used to generate the splashscreen.</param>
+ void GenerateSplashscreen(SplashscreenOptions generationOptions);
+ }
+}
diff --git a/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs b/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs
index 0534d60b6..ba268b8eb 100644
--- a/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs
+++ b/MediaBrowser.Controller/Drawing/SplashscreenOptions.cs
@@ -1,5 +1,3 @@
-using System.Collections.Generic;
-
namespace MediaBrowser.Controller.Drawing
{
/// <summary>
@@ -10,31 +8,15 @@ namespace MediaBrowser.Controller.Drawing
/// <summary>
/// Initializes a new instance of the <see cref="SplashscreenOptions"/> class.
/// </summary>
- /// <param name="portraitInputPaths">The portrait input paths.</param>
- /// <param name="landscapeInputPaths">The landscape input paths.</param>
/// <param name="outputPath">The output path.</param>
- /// <param name="width">Optional. The image width.</param>
- /// <param name="height">Optional. The image height.</param>
/// <param name="applyFilter">Optional. Apply a darkening filter.</param>
- public SplashscreenOptions(IReadOnlyList<string> portraitInputPaths, IReadOnlyList<string> landscapeInputPaths, string outputPath, bool applyFilter = false)
+ public SplashscreenOptions(string outputPath, bool applyFilter = false)
{
- PortraitInputPaths = portraitInputPaths;
- LandscapeInputPaths = landscapeInputPaths;
OutputPath = outputPath;
ApplyFilter = applyFilter;
}
/// <summary>
- /// Gets or sets the poster input paths.
- /// </summary>
- public IReadOnlyList<string> PortraitInputPaths { get; set; }
-
- /// <summary>
- /// Gets or sets the landscape input paths.
- /// </summary>
- public IReadOnlyList<string> LandscapeInputPaths { get; set; }
-
- /// <summary>
/// Gets or sets the output path.
/// </summary>
public string OutputPath { get; set; }