aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs6
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs4
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs409
-rw-r--r--MediaBrowser.Model/Configuration/TrickplayOptions.cs60
-rw-r--r--MediaBrowser.Model/Configuration/TrickplayScanBehavior.cs17
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs5
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs2
-rw-r--r--MediaBrowser.Model/Drawing/ImageFormatExtensions.cs17
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs7
-rw-r--r--MediaBrowser.Model/Net/IPData.cs5
-rw-r--r--MediaBrowser.Model/Net/PublishedServerUriOverride.cs42
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs5
-rw-r--r--MediaBrowser.Model/System/CastReceiverApplication.cs17
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs9
14 files changed, 404 insertions, 201 deletions
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 3f0e98ec8e..84c735f9ca 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -50,6 +50,7 @@ public class EncodingOptions
EnableHardwareEncoding = true;
AllowHevcEncoding = false;
AllowAv1Encoding = false;
+ AllowMjpegEncoding = false;
EnableSubtitleExtraction = true;
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
@@ -256,6 +257,11 @@ public class EncodingOptions
public bool AllowAv1Encoding { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether MJPEG encoding is enabled.
+ /// </summary>
+ public bool AllowMjpegEncoding { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether subtitle extraction is enabled.
/// </summary>
public bool EnableSubtitleExtraction { get; set; }
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index 9743edb1c3..fbad29143b 100644
--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs
+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs
@@ -35,6 +35,10 @@ namespace MediaBrowser.Model.Configuration
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
+ public bool EnableTrickplayImageExtraction { get; set; }
+
+ public bool ExtractTrickplayImagesDuringLibraryScan { get; set; }
+
public MediaPathInfo[] PathInfos { get; set; }
public bool SaveLocalMetadata { get; set; }
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index dbeef9ab25..2fb5fbd0b0 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -4,158 +4,159 @@
using System;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.System;
using MediaBrowser.Model.Updates;
-namespace MediaBrowser.Model.Configuration
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// Represents the server configuration.
+/// </summary>
+public class ServerConfiguration : BaseApplicationConfiguration
{
/// <summary>
- /// Represents the server configuration.
+ /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
/// </summary>
- public class ServerConfiguration : BaseApplicationConfiguration
+ public ServerConfiguration()
{
- /// <summary>
- /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
- /// </summary>
- public ServerConfiguration()
+ MetadataOptions = new[]
{
- MetadataOptions = new[]
+ new MetadataOptions()
+ {
+ ItemType = "Book"
+ },
+ new MetadataOptions()
+ {
+ ItemType = "Movie"
+ },
+ new MetadataOptions
+ {
+ ItemType = "MusicVideo",
+ DisabledMetadataFetchers = new[] { "The Open Movie Database" },
+ DisabledImageFetchers = new[] { "The Open Movie Database" }
+ },
+ new MetadataOptions
+ {
+ ItemType = "Series",
+ },
+ new MetadataOptions
+ {
+ ItemType = "MusicAlbum",
+ DisabledMetadataFetchers = new[] { "TheAudioDB" }
+ },
+ new MetadataOptions
+ {
+ ItemType = "MusicArtist",
+ DisabledMetadataFetchers = new[] { "TheAudioDB" }
+ },
+ new MetadataOptions
{
- new MetadataOptions()
- {
- ItemType = "Book"
- },
- new MetadataOptions()
- {
- ItemType = "Movie"
- },
- new MetadataOptions
- {
- ItemType = "MusicVideo",
- DisabledMetadataFetchers = new[] { "The Open Movie Database" },
- DisabledImageFetchers = new[] { "The Open Movie Database" }
- },
- new MetadataOptions
- {
- ItemType = "Series",
- },
- new MetadataOptions
- {
- ItemType = "MusicAlbum",
- DisabledMetadataFetchers = new[] { "TheAudioDB" }
- },
- new MetadataOptions
- {
- ItemType = "MusicArtist",
- DisabledMetadataFetchers = new[] { "TheAudioDB" }
- },
- new MetadataOptions
- {
- ItemType = "BoxSet"
- },
- new MetadataOptions
- {
- ItemType = "Season",
- },
- new MetadataOptions
- {
- ItemType = "Episode",
- }
- };
- }
+ ItemType = "BoxSet"
+ },
+ new MetadataOptions
+ {
+ ItemType = "Season",
+ },
+ new MetadataOptions
+ {
+ ItemType = "Episode",
+ }
+ };
+ }
- /// <summary>
- /// Gets or sets a value indicating whether to enable prometheus metrics exporting.
- /// </summary>
- public bool EnableMetrics { get; set; } = false;
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable prometheus metrics exporting.
+ /// </summary>
+ public bool EnableMetrics { get; set; } = false;
- public bool EnableNormalizedItemByNameIds { get; set; } = true;
+ public bool EnableNormalizedItemByNameIds { get; set; } = true;
- /// <summary>
- /// Gets or sets a value indicating whether this instance is port authorized.
- /// </summary>
- /// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
- public bool IsPortAuthorized { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is port authorized.
+ /// </summary>
+ /// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
+ public bool IsPortAuthorized { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether quick connect is available for use on this server.
- /// </summary>
- public bool QuickConnectAvailable { get; set; } = true;
+ /// <summary>
+ /// Gets or sets a value indicating whether quick connect is available for use on this server.
+ /// </summary>
+ public bool QuickConnectAvailable { get; set; } = true;
- /// <summary>
- /// Gets or sets a value indicating whether [enable case sensitive item ids].
- /// </summary>
- /// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
- public bool EnableCaseSensitiveItemIds { get; set; } = true;
+ /// <summary>
+ /// Gets or sets a value indicating whether [enable case sensitive item ids].
+ /// </summary>
+ /// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
+ public bool EnableCaseSensitiveItemIds { get; set; } = true;
- public bool DisableLiveTvChannelUserDataName { get; set; } = true;
+ public bool DisableLiveTvChannelUserDataName { get; set; } = true;
- /// <summary>
- /// Gets or sets the metadata path.
- /// </summary>
- /// <value>The metadata path.</value>
- public string MetadataPath { get; set; } = string.Empty;
+ /// <summary>
+ /// Gets or sets the metadata path.
+ /// </summary>
+ /// <value>The metadata path.</value>
+ public string MetadataPath { get; set; } = string.Empty;
- public string MetadataNetworkPath { get; set; } = string.Empty;
+ public string MetadataNetworkPath { get; set; } = string.Empty;
- /// <summary>
- /// Gets or sets the preferred metadata language.
- /// </summary>
- /// <value>The preferred metadata language.</value>
- public string PreferredMetadataLanguage { get; set; } = "en";
+ /// <summary>
+ /// Gets or sets the preferred metadata language.
+ /// </summary>
+ /// <value>The preferred metadata language.</value>
+ public string PreferredMetadataLanguage { get; set; } = "en";
- /// <summary>
- /// Gets or sets the metadata country code.
- /// </summary>
- /// <value>The metadata country code.</value>
- public string MetadataCountryCode { get; set; } = "US";
+ /// <summary>
+ /// Gets or sets the metadata country code.
+ /// </summary>
+ /// <value>The metadata country code.</value>
+ public string MetadataCountryCode { get; set; } = "US";
- /// <summary>
- /// Gets or sets characters to be replaced with a ' ' in strings to create a sort name.
- /// </summary>
- /// <value>The sort replace characters.</value>
- public string[] SortReplaceCharacters { get; set; } = new[] { ".", "+", "%" };
+ /// <summary>
+ /// Gets or sets characters to be replaced with a ' ' in strings to create a sort name.
+ /// </summary>
+ /// <value>The sort replace characters.</value>
+ public string[] SortReplaceCharacters { get; set; } = new[] { ".", "+", "%" };
- /// <summary>
- /// Gets or sets characters to be removed from strings to create a sort name.
- /// </summary>
- /// <value>The sort remove characters.</value>
- public string[] SortRemoveCharacters { get; set; } = new[] { ",", "&", "-", "{", "}", "'" };
+ /// <summary>
+ /// Gets or sets characters to be removed from strings to create a sort name.
+ /// </summary>
+ /// <value>The sort remove characters.</value>
+ public string[] SortRemoveCharacters { get; set; } = new[] { ",", "&", "-", "{", "}", "'" };
- /// <summary>
- /// Gets or sets words to be removed from strings to create a sort name.
- /// </summary>
- /// <value>The sort remove words.</value>
- public string[] SortRemoveWords { get; set; } = new[] { "the", "a", "an" };
+ /// <summary>
+ /// Gets or sets words to be removed from strings to create a sort name.
+ /// </summary>
+ /// <value>The sort remove words.</value>
+ public string[] SortRemoveWords { get; set; } = new[] { "the", "a", "an" };
- /// <summary>
- /// Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.
- /// </summary>
- /// <value>The min resume PCT.</value>
- public int MinResumePct { get; set; } = 5;
+ /// <summary>
+ /// Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.
+ /// </summary>
+ /// <value>The min resume PCT.</value>
+ public int MinResumePct { get; set; } = 5;
- /// <summary>
- /// Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
- /// </summary>
- /// <value>The max resume PCT.</value>
- public int MaxResumePct { get; set; } = 90;
+ /// <summary>
+ /// Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
+ /// </summary>
+ /// <value>The max resume PCT.</value>
+ public int MaxResumePct { get; set; } = 90;
- /// <summary>
- /// Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..
- /// </summary>
- /// <value>The min resume duration seconds.</value>
- public int MinResumeDurationSeconds { get; set; } = 300;
+ /// <summary>
+ /// Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..
+ /// </summary>
+ /// <value>The min resume duration seconds.</value>
+ public int MinResumeDurationSeconds { get; set; } = 300;
- /// <summary>
- /// Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated.
- /// </summary>
- /// <value>The min resume in minutes.</value>
- public int MinAudiobookResume { get; set; } = 5;
+ /// <summary>
+ /// Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated.
+ /// </summary>
+ /// <value>The min resume in minutes.</value>
+ public int MinAudiobookResume { get; set; } = 5;
- /// <summary>
- /// Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
- /// </summary>
- /// <value>The remaining time in minutes.</value>
- public int MaxAudiobookResume { get; set; } = 5;
+ /// <summary>
+ /// Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.
+ /// </summary>
+ /// <value>The remaining time in minutes.</value>
+ public int MaxAudiobookResume { get; set; } = 5;
/// <summary>
/// Gets or sets the threshold in minutes after a inactive session gets closed automatically.
@@ -172,104 +173,114 @@ namespace MediaBrowser.Model.Configuration
/// <value>The file watcher delay.</value>
public int LibraryMonitorDelay { get; set; } = 60;
- /// <summary>
- /// Gets or sets the duration in seconds that we will wait after a library updated event before executing the library changed notification.
- /// </summary>
- /// <value>The library update duration.</value>
- public int LibraryUpdateDuration { get; set; } = 30;
+ /// <summary>
+ /// Gets or sets the duration in seconds that we will wait after a library updated event before executing the library changed notification.
+ /// </summary>
+ /// <value>The library update duration.</value>
+ public int LibraryUpdateDuration { get; set; } = 30;
- /// <summary>
- /// Gets or sets the image saving convention.
- /// </summary>
- /// <value>The image saving convention.</value>
- public ImageSavingConvention ImageSavingConvention { get; set; }
+ /// <summary>
+ /// Gets or sets the image saving convention.
+ /// </summary>
+ /// <value>The image saving convention.</value>
+ public ImageSavingConvention ImageSavingConvention { get; set; }
- public MetadataOptions[] MetadataOptions { get; set; }
+ public MetadataOptions[] MetadataOptions { get; set; }
- public bool SkipDeserializationForBasicTypes { get; set; } = true;
+ public bool SkipDeserializationForBasicTypes { get; set; } = true;
- public string ServerName { get; set; } = string.Empty;
+ public string ServerName { get; set; } = string.Empty;
- public string UICulture { get; set; } = "en-US";
+ public string UICulture { get; set; } = "en-US";
- public bool SaveMetadataHidden { get; set; } = false;
+ public bool SaveMetadataHidden { get; set; } = false;
- public NameValuePair[] ContentTypes { get; set; } = Array.Empty<NameValuePair>();
+ public NameValuePair[] ContentTypes { get; set; } = Array.Empty<NameValuePair>();
- public int RemoteClientBitrateLimit { get; set; }
+ public int RemoteClientBitrateLimit { get; set; }
- public bool EnableFolderView { get; set; } = false;
+ public bool EnableFolderView { get; set; } = false;
- public bool EnableGroupingIntoCollections { get; set; } = false;
+ public bool EnableGroupingIntoCollections { get; set; } = false;
- public bool DisplaySpecialsWithinSeasons { get; set; } = true;
+ public bool DisplaySpecialsWithinSeasons { get; set; } = true;
- public string[] CodecsUsed { get; set; } = Array.Empty<string>();
+ public string[] CodecsUsed { get; set; } = Array.Empty<string>();
- public RepositoryInfo[] PluginRepositories { get; set; } = Array.Empty<RepositoryInfo>();
+ public RepositoryInfo[] PluginRepositories { get; set; } = Array.Empty<RepositoryInfo>();
- public bool EnableExternalContentInSuggestions { get; set; } = true;
+ public bool EnableExternalContentInSuggestions { get; set; } = true;
- public int ImageExtractionTimeoutMs { get; set; }
+ public int ImageExtractionTimeoutMs { get; set; }
- public PathSubstitution[] PathSubstitutions { get; set; } = Array.Empty<PathSubstitution>();
+ public PathSubstitution[] PathSubstitutions { get; set; } = Array.Empty<PathSubstitution>();
- /// <summary>
- /// Gets or sets a value indicating whether slow server responses should be logged as a warning.
- /// </summary>
- public bool EnableSlowResponseWarning { get; set; } = true;
+ /// <summary>
+ /// Gets or sets a value indicating whether slow server responses should be logged as a warning.
+ /// </summary>
+ public bool EnableSlowResponseWarning { get; set; } = true;
- /// <summary>
- /// Gets or sets the threshold for the slow response time warning in ms.
- /// </summary>
- public long SlowResponseThresholdMs { get; set; } = 500;
+ /// <summary>
+ /// Gets or sets the threshold for the slow response time warning in ms.
+ /// </summary>
+ public long SlowResponseThresholdMs { get; set; } = 500;
- /// <summary>
- /// Gets or sets the cors hosts.
- /// </summary>
- public string[] CorsHosts { get; set; } = new[] { "*" };
+ /// <summary>
+ /// Gets or sets the cors hosts.
+ /// </summary>
+ public string[] CorsHosts { get; set; } = new[] { "*" };
- /// <summary>
- /// Gets or sets the number of days we should retain activity logs.
- /// </summary>
- public int? ActivityLogRetentionDays { get; set; } = 30;
+ /// <summary>
+ /// Gets or sets the number of days we should retain activity logs.
+ /// </summary>
+ public int? ActivityLogRetentionDays { get; set; } = 30;
- /// <summary>
- /// Gets or sets the how the library scan fans out.
- /// </summary>
- public int LibraryScanFanoutConcurrency { get; set; }
+ /// <summary>
+ /// Gets or sets the how the library scan fans out.
+ /// </summary>
+ public int LibraryScanFanoutConcurrency { get; set; }
- /// <summary>
- /// Gets or sets the how many metadata refreshes can run concurrently.
- /// </summary>
- public int LibraryMetadataRefreshConcurrency { get; set; }
+ /// <summary>
+ /// Gets or sets the how many metadata refreshes can run concurrently.
+ /// </summary>
+ public int LibraryMetadataRefreshConcurrency { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder.
- /// </summary>
- public bool RemoveOldPlugins { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder.
+ /// </summary>
+ public bool RemoveOldPlugins { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether clients should be allowed to upload logs.
- /// </summary>
- public bool AllowClientLogUpload { get; set; } = true;
+ /// <summary>
+ /// Gets or sets a value indicating whether clients should be allowed to upload logs.
+ /// </summary>
+ public bool AllowClientLogUpload { get; set; } = true;
- /// <summary>
- /// Gets or sets the dummy chapter duration in seconds, use 0 (zero) or less to disable generation alltogether.
- /// </summary>
- /// <value>The dummy chapters duration.</value>
- public int DummyChapterDuration { get; set; }
+ /// <summary>
+ /// Gets or sets the dummy chapter duration in seconds, use 0 (zero) or less to disable generation alltogether.
+ /// </summary>
+ /// <value>The dummy chapters duration.</value>
+ public int DummyChapterDuration { get; set; }
- /// <summary>
- /// Gets or sets the chapter image resolution.
- /// </summary>
- /// <value>The chapter image resolution.</value>
- public ImageResolution ChapterImageResolution { get; set; } = ImageResolution.MatchSource;
+ /// <summary>
+ /// Gets or sets the chapter image resolution.
+ /// </summary>
+ /// <value>The chapter image resolution.</value>
+ public ImageResolution ChapterImageResolution { get; set; } = ImageResolution.MatchSource;
- /// <summary>
- /// Gets or sets the limit for parallel image encoding.
- /// </summary>
- /// <value>The limit for parallel image encoding.</value>
- public int ParallelImageEncodingLimit { get; set; }
- }
+ /// <summary>
+ /// Gets or sets the limit for parallel image encoding.
+ /// </summary>
+ /// <value>The limit for parallel image encoding.</value>
+ public int ParallelImageEncodingLimit { get; set; }
+
+ /// <summary>
+ /// Gets or sets the list of cast receiver applications.
+ /// </summary>
+ public CastReceiverApplication[] CastReceiverApplications { get; set; } = Array.Empty<CastReceiverApplication>();
+
+ /// <summary>
+ /// Gets or sets the trickplay options.
+ /// </summary>
+ /// <value>The trickplay options.</value>
+ public TrickplayOptions TrickplayOptions { get; set; } = new TrickplayOptions();
}
diff --git a/MediaBrowser.Model/Configuration/TrickplayOptions.cs b/MediaBrowser.Model/Configuration/TrickplayOptions.cs
new file mode 100644
index 0000000000..92c16ee84f
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/TrickplayOptions.cs
@@ -0,0 +1,60 @@
+using System.Collections.Generic;
+using System.Diagnostics;
+
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// Class TrickplayOptions.
+/// </summary>
+public class TrickplayOptions
+{
+ /// <summary>
+ /// Gets or sets a value indicating whether or not to use HW acceleration.
+ /// </summary>
+ public bool EnableHwAcceleration { get; set; } = false;
+
+ /// <summary>
+ /// Gets or sets the behavior used by trickplay provider on library scan/update.
+ /// </summary>
+ public TrickplayScanBehavior ScanBehavior { get; set; } = TrickplayScanBehavior.NonBlocking;
+
+ /// <summary>
+ /// Gets or sets the process priority for the ffmpeg process.
+ /// </summary>
+ public ProcessPriorityClass ProcessPriority { get; set; } = ProcessPriorityClass.BelowNormal;
+
+ /// <summary>
+ /// Gets or sets the interval, in ms, between each new trickplay image.
+ /// </summary>
+ public int Interval { get; set; } = 10000;
+
+ /// <summary>
+ /// Gets or sets the target width resolutions, in px, to generates preview images for.
+ /// </summary>
+ public int[] WidthResolutions { get; set; } = new[] { 320 };
+
+ /// <summary>
+ /// Gets or sets number of tile images to allow in X dimension.
+ /// </summary>
+ public int TileWidth { get; set; } = 10;
+
+ /// <summary>
+ /// Gets or sets number of tile images to allow in Y dimension.
+ /// </summary>
+ public int TileHeight { get; set; } = 10;
+
+ /// <summary>
+ /// Gets or sets the ffmpeg output quality level.
+ /// </summary>
+ public int Qscale { get; set; } = 4;
+
+ /// <summary>
+ /// Gets or sets the jpeg quality to use for image tiles.
+ /// </summary>
+ public int JpegQuality { get; set; } = 90;
+
+ /// <summary>
+ /// Gets or sets the number of threads to be used by ffmpeg.
+ /// </summary>
+ public int ProcessThreads { get; set; } = 1;
+}
diff --git a/MediaBrowser.Model/Configuration/TrickplayScanBehavior.cs b/MediaBrowser.Model/Configuration/TrickplayScanBehavior.cs
new file mode 100644
index 0000000000..d0db532185
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/TrickplayScanBehavior.cs
@@ -0,0 +1,17 @@
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// Enum TrickplayScanBehavior.
+/// </summary>
+public enum TrickplayScanBehavior
+{
+ /// <summary>
+ /// Starts generation, only return once complete.
+ /// </summary>
+ Blocking,
+
+ /// <summary>
+ /// Start generation, return immediately.
+ /// </summary>
+ NonBlocking
+}
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index 94f3546608..b477f2593a 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -69,5 +69,10 @@ namespace MediaBrowser.Model.Configuration
public bool RememberSubtitleSelections { get; set; }
public bool EnableNextEpisodeAutoPlay { get; set; }
+
+ /// <summary>
+ /// Gets or sets the id of the selected cast receiver.
+ /// </summary>
+ public string? CastReceiverId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 889e2494a0..666e787951 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -1313,7 +1313,7 @@ namespace MediaBrowser.Model.Dlna
var audioFailureConditions = GetProfileConditionsForVideoAudio(profile.CodecProfiles, container, audioStream.Codec, audioStream.Channels, audioStream.BitRate, audioStream.SampleRate, audioStream.BitDepth, audioStream.Profile, mediaSource.IsSecondaryAudio(audioStream));
var audioStreamFailureReasons = AggregateFailureConditions(mediaSource, profile, "VideoAudioCodecProfile", audioFailureConditions);
- if (audioStream?.IsExternal == true)
+ if (audioStream.IsExternal == true)
{
audioStreamFailureReasons |= TranscodeReason.AudioIsExternal;
}
diff --git a/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs b/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs
index 68a5c25345..1bb24112ec 100644
--- a/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs
+++ b/MediaBrowser.Model/Drawing/ImageFormatExtensions.cs
@@ -24,4 +24,21 @@ public static class ImageFormatExtensions
ImageFormat.Webp => "image/webp",
_ => throw new InvalidEnumArgumentException(nameof(format), (int)format, typeof(ImageFormat))
};
+
+ /// <summary>
+ /// Returns the correct extension for this <see cref="ImageFormat" />.
+ /// </summary>
+ /// <param name="format">This <see cref="ImageFormat" />.</param>
+ /// <exception cref="InvalidEnumArgumentException">The <paramref name="format"/> is an invalid enumeration value.</exception>
+ /// <returns>The correct extension for this <see cref="ImageFormat" />.</returns>
+ public static string GetExtension(this ImageFormat format)
+ => format switch
+ {
+ ImageFormat.Bmp => ".bmp",
+ ImageFormat.Gif => ".gif",
+ ImageFormat.Jpg => ".jpg",
+ ImageFormat.Png => ".png",
+ ImageFormat.Webp => ".webp",
+ _ => throw new InvalidEnumArgumentException(nameof(format), (int)format, typeof(ImageFormat))
+ };
}
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 8fab1ca6d6..287966dd0e 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Entities;
@@ -569,6 +570,12 @@ namespace MediaBrowser.Model.Dto
public List<ChapterInfo> Chapters { get; set; }
/// <summary>
+ /// Gets or sets the trickplay manifest.
+ /// </summary>
+ /// <value>The trickplay manifest.</value>
+ public Dictionary<string, Dictionary<int, TrickplayInfo>> Trickplay { get; set; }
+
+ /// <summary>
/// Gets or sets the type of the location.
/// </summary>
/// <value>The type of the location.</value>
diff --git a/MediaBrowser.Model/Net/IPData.cs b/MediaBrowser.Model/Net/IPData.cs
index 985b16c6e4..e9fcd67975 100644
--- a/MediaBrowser.Model/Net/IPData.cs
+++ b/MediaBrowser.Model/Net/IPData.cs
@@ -48,6 +48,11 @@ public class IPData
public int Index { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether the network supports multicast.
+ /// </summary>
+ public bool SupportsMulticast { get; set; } = false;
+
+ /// <summary>
/// Gets or sets the interface name.
/// </summary>
public string Name { get; set; }
diff --git a/MediaBrowser.Model/Net/PublishedServerUriOverride.cs b/MediaBrowser.Model/Net/PublishedServerUriOverride.cs
new file mode 100644
index 0000000000..476d1ba382
--- /dev/null
+++ b/MediaBrowser.Model/Net/PublishedServerUriOverride.cs
@@ -0,0 +1,42 @@
+namespace MediaBrowser.Model.Net;
+
+/// <summary>
+/// Class holding information for a published server URI override.
+/// </summary>
+public class PublishedServerUriOverride
+{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PublishedServerUriOverride"/> class.
+ /// </summary>
+ /// <param name="data">The <see cref="IPData"/>.</param>
+ /// <param name="overrideUri">The override.</param>
+ /// <param name="internalOverride">A value indicating whether the override is for internal requests.</param>
+ /// <param name="externalOverride">A value indicating whether the override is for external requests.</param>
+ public PublishedServerUriOverride(IPData data, string overrideUri, bool internalOverride, bool externalOverride)
+ {
+ Data = data;
+ OverrideUri = overrideUri;
+ IsInternalOverride = internalOverride;
+ IsExternalOverride = externalOverride;
+ }
+
+ /// <summary>
+ /// Gets or sets the object's IP address.
+ /// </summary>
+ public IPData Data { get; set; }
+
+ /// <summary>
+ /// Gets or sets the override URI.
+ /// </summary>
+ public string OverrideUri { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the override should be applied to internal requests.
+ /// </summary>
+ public bool IsInternalOverride { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the override should be applied to external requests.
+ /// </summary>
+ public bool IsExternalOverride { get; set; }
+}
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index 6fa1d778ad..242a1c6e99 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -34,6 +34,11 @@ namespace MediaBrowser.Model.Querying
/// </summary>
Chapters,
+ /// <summary>
+ /// The trickplay manifest.
+ /// </summary>
+ Trickplay,
+
ChildCount,
/// <summary>
diff --git a/MediaBrowser.Model/System/CastReceiverApplication.cs b/MediaBrowser.Model/System/CastReceiverApplication.cs
new file mode 100644
index 0000000000..6a49a5cac4
--- /dev/null
+++ b/MediaBrowser.Model/System/CastReceiverApplication.cs
@@ -0,0 +1,17 @@
+namespace MediaBrowser.Model.System;
+
+/// <summary>
+/// The cast receiver application model.
+/// </summary>
+public class CastReceiverApplication
+{
+ /// <summary>
+ /// Gets or sets the cast receiver application id.
+ /// </summary>
+ public required string Id { get; set; }
+
+ /// <summary>
+ /// Gets or sets the cast receiver application name.
+ /// </summary>
+ public required string Name { get; set; }
+}
diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs
index bd0099af70..aa7c03ebd5 100644
--- a/MediaBrowser.Model/System/SystemInfo.cs
+++ b/MediaBrowser.Model/System/SystemInfo.cs
@@ -2,6 +2,7 @@
#pragma warning disable CS1591
using System;
+using System.Collections.Generic;
using System.Runtime.InteropServices;
using MediaBrowser.Model.Updates;
@@ -84,7 +85,8 @@ namespace MediaBrowser.Model.System
[Obsolete("This is always true")]
public bool CanSelfRestart { get; set; } = true;
- public bool CanLaunchWebBrowser { get; set; }
+ [Obsolete("This is always false")]
+ public bool CanLaunchWebBrowser { get; set; } = false;
/// <summary>
/// Gets or sets the program data path.
@@ -129,6 +131,11 @@ namespace MediaBrowser.Model.System
public string TranscodingTempPath { get; set; }
/// <summary>
+ /// Gets or sets the list of cast receiver applications.
+ /// </summary>
+ public IReadOnlyList<CastReceiverApplication> CastReceiverApplications { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether this instance has update available.
/// </summary>
/// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>