Refactor: standardize namespace and using directive style
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
This commit is contained in:
@@ -2,66 +2,64 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
using global::System;
|
||||
using global::System.Xml.Serialization;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Serves as a common base class for the Server and UI application Configurations
|
||||
/// ProtoInclude tells Protobuf about subclasses,
|
||||
/// The number 50 can be any number, so long as it doesn't clash with any of the ProtoMember numbers either here or in subclasses.
|
||||
/// </summary>
|
||||
public class BaseApplicationConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
|
||||
/// </summary>
|
||||
public BaseApplicationConfiguration()
|
||||
{
|
||||
LogFileRetentionDays = 3;
|
||||
}
|
||||
/// <summary>
|
||||
/// Serves as a common base class for the Server and UI application Configurations
|
||||
/// ProtoInclude tells Protobuf about subclasses,
|
||||
/// The number 50 can be any number, so long as it doesn't clash with any of the ProtoMember numbers either here or in subclasses.
|
||||
/// </summary>
|
||||
public class BaseApplicationConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
|
||||
/// </summary>
|
||||
public BaseApplicationConfiguration()
|
||||
{
|
||||
this.LogFileRetentionDays = 3;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of days we should retain log files.
|
||||
/// </summary>
|
||||
/// <value>The log file retention days.</value>
|
||||
public int LogFileRetentionDays { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the number of days we should retain log files.
|
||||
/// </summary>
|
||||
/// <value>The log file retention days.</value>
|
||||
public int LogFileRetentionDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is first run.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
|
||||
public bool IsStartupWizardCompleted { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is first run.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
|
||||
public bool IsStartupWizardCompleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the cache path.
|
||||
/// </summary>
|
||||
/// <value>The cache path.</value>
|
||||
public string? CachePath { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the cache path.
|
||||
/// </summary>
|
||||
/// <value>The cache path.</value>
|
||||
public string? CachePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the last known version that was ran using the configuration.
|
||||
/// </summary>
|
||||
/// <value>The version from previous run.</value>
|
||||
[XmlIgnore]
|
||||
public Version? PreviousVersion { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the last known version that was ran using the configuration.
|
||||
/// </summary>
|
||||
/// <value>The version from previous run.</value>
|
||||
[XmlIgnore]
|
||||
public Version? PreviousVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the stringified PreviousVersion to be stored/loaded,
|
||||
/// because System.Version itself isn't xml-serializable.
|
||||
/// </summary>
|
||||
/// <value>String value of PreviousVersion.</value>
|
||||
public string? PreviousVersionStr
|
||||
{
|
||||
get => PreviousVersion?.ToString();
|
||||
set
|
||||
{
|
||||
if (Version.TryParse(value, out var version))
|
||||
{
|
||||
PreviousVersion = version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the stringified PreviousVersion to be stored/loaded,
|
||||
/// because System.Version itself isn't xml-serializable.
|
||||
/// </summary>
|
||||
/// <value>String value of PreviousVersion.</value>
|
||||
public string? PreviousVersionStr
|
||||
{
|
||||
get => this.PreviousVersion?.ToString();
|
||||
set
|
||||
{
|
||||
if (Version.TryParse(value, out var version))
|
||||
{
|
||||
this.PreviousVersion = version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,31 +2,29 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum representing the options to disable embedded subs.
|
||||
/// </summary>
|
||||
public enum EmbeddedSubtitleOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Allow all embedded subs.
|
||||
/// </summary>
|
||||
AllowAll = 0,
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
/// <summary>
|
||||
/// An enum representing the options to disable embedded subs.
|
||||
/// </summary>
|
||||
public enum EmbeddedSubtitleOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Allow all embedded subs.
|
||||
/// </summary>
|
||||
AllowAll = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Allow only embedded subs that are text based.
|
||||
/// </summary>
|
||||
AllowText = 1,
|
||||
/// <summary>
|
||||
/// Allow only embedded subs that are text based.
|
||||
/// </summary>
|
||||
AllowText = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Allow only embedded subs that are image based.
|
||||
/// </summary>
|
||||
AllowImage = 2,
|
||||
/// <summary>
|
||||
/// Allow only embedded subs that are image based.
|
||||
/// </summary>
|
||||
AllowImage = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Disable all embedded subs.
|
||||
/// </summary>
|
||||
AllowNone = 3,
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Disable all embedded subs.
|
||||
/// </summary>
|
||||
AllowNone = 3,
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma warning disable CA1819 // XML serialization handles collections improperly, so we need to use arrays
|
||||
|
||||
#nullable disable
|
||||
using System.ComponentModel;
|
||||
using global::System.ComponentModel;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
@@ -30,6 +30,7 @@ public class EncodingOptions
|
||||
EnableSegmentDeletion = false;
|
||||
SegmentKeepSeconds = 720;
|
||||
EncodingThreadCount = -1;
|
||||
|
||||
// This is a DRM device that is almost guaranteed to be there on every intel platform,
|
||||
// plus it's the default one in ffmpeg if you don't specify anything
|
||||
VaapiDevice = "/dev/dri/renderD128";
|
||||
@@ -53,6 +54,7 @@ public class EncodingOptions
|
||||
EnableDecodingColorDepth10Vp9 = true;
|
||||
EnableDecodingColorDepth10HevcRext = false;
|
||||
EnableDecodingColorDepth12HevcRext = false;
|
||||
|
||||
// Enhanced Nvdec or system native decoder is required for DoVi to SDR tone-mapping.
|
||||
EnableEnhancedNvdecDecoder = true;
|
||||
PreferSystemNativeHwDecoder = true;
|
||||
|
||||
@@ -2,26 +2,24 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum representing the options to seek the input audio stream when
|
||||
/// transcoding HLS segments.
|
||||
/// </summary>
|
||||
public enum HlsAudioSeekStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// If the video stream is transcoded and the audio stream is copied,
|
||||
/// seek the video stream to the same keyframe as the audio stream. The
|
||||
/// resulting timestamps in the output streams may be inaccurate.
|
||||
/// </summary>
|
||||
DisableAccurateSeek = 0,
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
/// <summary>
|
||||
/// An enum representing the options to seek the input audio stream when
|
||||
/// transcoding HLS segments.
|
||||
/// </summary>
|
||||
public enum HlsAudioSeekStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// If the video stream is transcoded and the audio stream is copied,
|
||||
/// seek the video stream to the same keyframe as the audio stream. The
|
||||
/// resulting timestamps in the output streams may be inaccurate.
|
||||
/// </summary>
|
||||
DisableAccurateSeek = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Prevent audio streams from being copied if the video stream is transcoded.
|
||||
/// The resulting timestamps will be accurate, but additional audio transcoding
|
||||
/// overhead will be incurred.
|
||||
/// </summary>
|
||||
TranscodeAudio = 1,
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Prevent audio streams from being copied if the video stream is transcoded.
|
||||
/// The resulting timestamps will be accurate, but additional audio transcoding
|
||||
/// overhead will be incurred.
|
||||
/// </summary>
|
||||
TranscodeAudio = 1,
|
||||
}
|
||||
|
||||
@@ -6,31 +6,29 @@
|
||||
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class ImageOption
|
||||
{
|
||||
public ImageOption()
|
||||
{
|
||||
Limit = 1;
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class ImageOption
|
||||
{
|
||||
public ImageOption()
|
||||
{
|
||||
Limit = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
public ImageType Type { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
public ImageType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the limit.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int Limit { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the limit.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum width.
|
||||
/// </summary>
|
||||
/// <value>The minimum width.</value>
|
||||
public int MinWidth { get; set; }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum width.
|
||||
/// </summary>
|
||||
/// <value>The minimum width.</value>
|
||||
public int MinWidth { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public enum ImageSavingConvention
|
||||
{
|
||||
Legacy,
|
||||
Compatible
|
||||
}
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public enum ImageSavingConvention
|
||||
{
|
||||
Legacy,
|
||||
Compatible
|
||||
}
|
||||
|
||||
@@ -4,154 +4,152 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using global::System;
|
||||
using global::System.ComponentModel;
|
||||
using global::System.Linq;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class LibraryOptions
|
||||
{
|
||||
private static readonly string[] _defaultTagDelimiters = ["/", "|", ";", "\\"];
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class LibraryOptions
|
||||
{
|
||||
private static readonly string[] _defaultTagDelimiters = ["/", "|", ";", "\\"];
|
||||
|
||||
public LibraryOptions()
|
||||
{
|
||||
TypeOptions = Array.Empty<TypeOptions>();
|
||||
DisabledSubtitleFetchers = Array.Empty<string>();
|
||||
DisabledMediaSegmentProviders = Array.Empty<string>();
|
||||
MediaSegmentProviderOrder = Array.Empty<string>();
|
||||
SubtitleFetcherOrder = Array.Empty<string>();
|
||||
DisabledLocalMetadataReaders = Array.Empty<string>();
|
||||
DisabledLyricFetchers = Array.Empty<string>();
|
||||
LyricFetcherOrder = Array.Empty<string>();
|
||||
public LibraryOptions()
|
||||
{
|
||||
TypeOptions = Array.Empty<TypeOptions>();
|
||||
DisabledSubtitleFetchers = Array.Empty<string>();
|
||||
DisabledMediaSegmentProviders = Array.Empty<string>();
|
||||
MediaSegmentProviderOrder = Array.Empty<string>();
|
||||
SubtitleFetcherOrder = Array.Empty<string>();
|
||||
DisabledLocalMetadataReaders = Array.Empty<string>();
|
||||
DisabledLyricFetchers = Array.Empty<string>();
|
||||
LyricFetcherOrder = Array.Empty<string>();
|
||||
|
||||
SkipSubtitlesIfAudioTrackMatches = true;
|
||||
RequirePerfectSubtitleMatch = true;
|
||||
AllowEmbeddedSubtitles = EmbeddedSubtitleOptions.AllowAll;
|
||||
SkipSubtitlesIfAudioTrackMatches = true;
|
||||
RequirePerfectSubtitleMatch = true;
|
||||
AllowEmbeddedSubtitles = EmbeddedSubtitleOptions.AllowAll;
|
||||
|
||||
AutomaticallyAddToCollection = false;
|
||||
EnablePhotos = true;
|
||||
SaveSubtitlesWithMedia = true;
|
||||
SaveLyricsWithMedia = false;
|
||||
SaveTrickplayWithMedia = false;
|
||||
PathInfos = Array.Empty<MediaPathInfo>();
|
||||
EnableAutomaticSeriesGrouping = true;
|
||||
SeasonZeroDisplayName = "Specials";
|
||||
AutomaticallyAddToCollection = false;
|
||||
EnablePhotos = true;
|
||||
SaveSubtitlesWithMedia = true;
|
||||
SaveLyricsWithMedia = false;
|
||||
SaveTrickplayWithMedia = false;
|
||||
PathInfos = Array.Empty<MediaPathInfo>();
|
||||
EnableAutomaticSeriesGrouping = true;
|
||||
SeasonZeroDisplayName = "Specials";
|
||||
|
||||
PreferNonstandardArtistsTag = false;
|
||||
UseCustomTagDelimiters = false;
|
||||
CustomTagDelimiters = _defaultTagDelimiters;
|
||||
DelimiterWhitelist = Array.Empty<string>();
|
||||
}
|
||||
PreferNonstandardArtistsTag = false;
|
||||
UseCustomTagDelimiters = false;
|
||||
CustomTagDelimiters = _defaultTagDelimiters;
|
||||
DelimiterWhitelist = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
public bool EnablePhotos { get; set; }
|
||||
public bool EnablePhotos { get; set; }
|
||||
|
||||
public bool EnableRealtimeMonitor { get; set; }
|
||||
public bool EnableRealtimeMonitor { get; set; }
|
||||
|
||||
public bool EnableLUFSScan { get; set; }
|
||||
public bool EnableLUFSScan { get; set; }
|
||||
|
||||
public bool EnableChapterImageExtraction { get; set; }
|
||||
public bool EnableChapterImageExtraction { get; set; }
|
||||
|
||||
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
|
||||
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
|
||||
|
||||
public bool EnableTrickplayImageExtraction { get; set; }
|
||||
public bool EnableTrickplayImageExtraction { get; set; }
|
||||
|
||||
public bool ExtractTrickplayImagesDuringLibraryScan { get; set; }
|
||||
public bool ExtractTrickplayImagesDuringLibraryScan { get; set; }
|
||||
|
||||
public MediaPathInfo[] PathInfos { get; set; }
|
||||
public MediaPathInfo[] PathInfos { get; set; }
|
||||
|
||||
public bool SaveLocalMetadata { get; set; }
|
||||
public bool SaveLocalMetadata { get; set; }
|
||||
|
||||
[Obsolete("Disable remote providers in TypeOptions instead")]
|
||||
public bool EnableInternetProviders { get; set; }
|
||||
[Obsolete("Disable remote providers in TypeOptions instead")]
|
||||
public bool EnableInternetProviders { get; set; }
|
||||
|
||||
public bool EnableAutomaticSeriesGrouping { get; set; }
|
||||
public bool EnableAutomaticSeriesGrouping { get; set; }
|
||||
|
||||
public bool EnableEmbeddedTitles { get; set; }
|
||||
public bool EnableEmbeddedTitles { get; set; }
|
||||
|
||||
public bool EnableEmbeddedExtrasTitles { get; set; }
|
||||
public bool EnableEmbeddedExtrasTitles { get; set; }
|
||||
|
||||
public bool EnableEmbeddedEpisodeInfos { get; set; }
|
||||
public bool EnableEmbeddedEpisodeInfos { get; set; }
|
||||
|
||||
public int AutomaticRefreshIntervalDays { get; set; }
|
||||
public int AutomaticRefreshIntervalDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata language.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata language.</value>
|
||||
public string? PreferredMetadataLanguage { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata language.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata language.</value>
|
||||
public string? PreferredMetadataLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The metadata country code.</value>
|
||||
public string? MetadataCountryCode { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The metadata country code.</value>
|
||||
public string? MetadataCountryCode { get; set; }
|
||||
|
||||
public string SeasonZeroDisplayName { get; set; }
|
||||
public string SeasonZeroDisplayName { get; set; }
|
||||
|
||||
public string[]? MetadataSavers { get; set; }
|
||||
public string[]? MetadataSavers { get; set; }
|
||||
|
||||
public string[] DisabledLocalMetadataReaders { get; set; }
|
||||
public string[] DisabledLocalMetadataReaders { get; set; }
|
||||
|
||||
public string[]? LocalMetadataReaderOrder { get; set; }
|
||||
public string[]? LocalMetadataReaderOrder { get; set; }
|
||||
|
||||
public string[] DisabledSubtitleFetchers { get; set; }
|
||||
public string[] DisabledSubtitleFetchers { get; set; }
|
||||
|
||||
public string[] SubtitleFetcherOrder { get; set; }
|
||||
public string[] SubtitleFetcherOrder { get; set; }
|
||||
|
||||
public string[] DisabledMediaSegmentProviders { get; set; }
|
||||
public string[] DisabledMediaSegmentProviders { get; set; }
|
||||
|
||||
public string[] MediaSegmentProviderOrder { get; set; }
|
||||
public string[] MediaSegmentProviderOrder { get; set; }
|
||||
|
||||
public bool SkipSubtitlesIfEmbeddedSubtitlesPresent { get; set; }
|
||||
public bool SkipSubtitlesIfEmbeddedSubtitlesPresent { get; set; }
|
||||
|
||||
public bool SkipSubtitlesIfAudioTrackMatches { get; set; }
|
||||
public bool SkipSubtitlesIfAudioTrackMatches { get; set; }
|
||||
|
||||
public string[]? SubtitleDownloadLanguages { get; set; }
|
||||
public string[]? SubtitleDownloadLanguages { get; set; }
|
||||
|
||||
public bool RequirePerfectSubtitleMatch { get; set; }
|
||||
public bool RequirePerfectSubtitleMatch { get; set; }
|
||||
|
||||
public bool SaveSubtitlesWithMedia { get; set; }
|
||||
public bool SaveSubtitlesWithMedia { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool SaveLyricsWithMedia { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool SaveLyricsWithMedia { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool SaveTrickplayWithMedia { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool SaveTrickplayWithMedia { get; set; }
|
||||
|
||||
public string[] DisabledLyricFetchers { get; set; }
|
||||
public string[] DisabledLyricFetchers { get; set; }
|
||||
|
||||
public string[] LyricFetcherOrder { get; set; }
|
||||
public string[] LyricFetcherOrder { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool PreferNonstandardArtistsTag { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool PreferNonstandardArtistsTag { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool UseCustomTagDelimiters { get; set; }
|
||||
[DefaultValue(false)]
|
||||
public bool UseCustomTagDelimiters { get; set; }
|
||||
|
||||
public string[] CustomTagDelimiters { get; set; }
|
||||
public string[] CustomTagDelimiters { get; set; }
|
||||
|
||||
public string[] DelimiterWhitelist { get; set; }
|
||||
public string[] DelimiterWhitelist { get; set; }
|
||||
|
||||
public bool AutomaticallyAddToCollection { get; set; }
|
||||
public bool AutomaticallyAddToCollection { get; set; }
|
||||
|
||||
public EmbeddedSubtitleOptions AllowEmbeddedSubtitles { get; set; }
|
||||
public EmbeddedSubtitleOptions AllowEmbeddedSubtitles { get; set; }
|
||||
|
||||
public TypeOptions[] TypeOptions { get; set; }
|
||||
public TypeOptions[] TypeOptions { get; set; }
|
||||
|
||||
public TypeOptions? GetTypeOptions(string type)
|
||||
{
|
||||
foreach (var options in TypeOptions)
|
||||
{
|
||||
if (string.Equals(options.Type, type, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return options;
|
||||
}
|
||||
}
|
||||
public TypeOptions? GetTypeOptions(string type)
|
||||
{
|
||||
foreach (var options in TypeOptions)
|
||||
{
|
||||
if (string.Equals(options.Type, type, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,21 +4,19 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class MediaPathInfo
|
||||
{
|
||||
public MediaPathInfo(string path)
|
||||
{
|
||||
Path = path;
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class MediaPathInfo
|
||||
{
|
||||
public MediaPathInfo(string path)
|
||||
{
|
||||
Path = path;
|
||||
}
|
||||
|
||||
// Needed for xml serialization
|
||||
public MediaPathInfo()
|
||||
{
|
||||
Path = string.Empty;
|
||||
}
|
||||
// Needed for xml serialization
|
||||
public MediaPathInfo()
|
||||
{
|
||||
Path = string.Empty;
|
||||
}
|
||||
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
public string Path { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class MetadataConfiguration
|
||||
{
|
||||
public MetadataConfiguration()
|
||||
{
|
||||
UseFileCreationTimeForDateAdded = true;
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class MetadataConfiguration
|
||||
{
|
||||
public MetadataConfiguration()
|
||||
{
|
||||
UseFileCreationTimeForDateAdded = true;
|
||||
}
|
||||
|
||||
public bool UseFileCreationTimeForDateAdded { get; set; }
|
||||
}
|
||||
}
|
||||
public bool UseFileCreationTimeForDateAdded { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,37 +5,35 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591, CA1819
|
||||
|
||||
using System;
|
||||
using global::System;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MetadataOptions.
|
||||
/// </summary>
|
||||
public class MetadataOptions
|
||||
{
|
||||
public MetadataOptions()
|
||||
{
|
||||
DisabledMetadataSavers = Array.Empty<string>();
|
||||
LocalMetadataReaderOrder = Array.Empty<string>();
|
||||
DisabledMetadataFetchers = Array.Empty<string>();
|
||||
MetadataFetcherOrder = Array.Empty<string>();
|
||||
DisabledImageFetchers = Array.Empty<string>();
|
||||
ImageFetcherOrder = Array.Empty<string>();
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
/// <summary>
|
||||
/// Class MetadataOptions.
|
||||
/// </summary>
|
||||
public class MetadataOptions
|
||||
{
|
||||
public MetadataOptions()
|
||||
{
|
||||
DisabledMetadataSavers = Array.Empty<string>();
|
||||
LocalMetadataReaderOrder = Array.Empty<string>();
|
||||
DisabledMetadataFetchers = Array.Empty<string>();
|
||||
MetadataFetcherOrder = Array.Empty<string>();
|
||||
DisabledImageFetchers = Array.Empty<string>();
|
||||
ImageFetcherOrder = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public string ItemType { get; set; }
|
||||
public string ItemType { get; set; }
|
||||
|
||||
public string[] DisabledMetadataSavers { get; set; }
|
||||
public string[] DisabledMetadataSavers { get; set; }
|
||||
|
||||
public string[] LocalMetadataReaderOrder { get; set; }
|
||||
public string[] LocalMetadataReaderOrder { get; set; }
|
||||
|
||||
public string[] DisabledMetadataFetchers { get; set; }
|
||||
public string[] DisabledMetadataFetchers { get; set; }
|
||||
|
||||
public string[] MetadataFetcherOrder { get; set; }
|
||||
public string[] MetadataFetcherOrder { get; set; }
|
||||
|
||||
public string[] DisabledImageFetchers { get; set; }
|
||||
public string[] DisabledImageFetchers { get; set; }
|
||||
|
||||
public string[] ImageFetcherOrder { get; set; }
|
||||
}
|
||||
}
|
||||
public string[] ImageFetcherOrder { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,20 +5,18 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class MetadataPlugin
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class MetadataPlugin
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
public MetadataPluginType Type { get; set; }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
public MetadataPluginType Type { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,35 +5,33 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using global::System;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class MetadataPluginSummary
|
||||
{
|
||||
public MetadataPluginSummary()
|
||||
{
|
||||
SupportedImageTypes = Array.Empty<ImageType>();
|
||||
Plugins = Array.Empty<MetadataPlugin>();
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class MetadataPluginSummary
|
||||
{
|
||||
public MetadataPluginSummary()
|
||||
{
|
||||
SupportedImageTypes = Array.Empty<ImageType>();
|
||||
Plugins = Array.Empty<MetadataPlugin>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the item.
|
||||
/// </summary>
|
||||
/// <value>The type of the item.</value>
|
||||
public string ItemType { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the item.
|
||||
/// </summary>
|
||||
/// <value>The type of the item.</value>
|
||||
public string ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the plugins.
|
||||
/// </summary>
|
||||
/// <value>The plugins.</value>
|
||||
public MetadataPlugin[] Plugins { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the plugins.
|
||||
/// </summary>
|
||||
/// <value>The plugins.</value>
|
||||
public MetadataPlugin[] Plugins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the supported image types.
|
||||
/// </summary>
|
||||
/// <value>The supported image types.</value>
|
||||
public ImageType[] SupportedImageTypes { get; set; }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the supported image types.
|
||||
/// </summary>
|
||||
/// <value>The supported image types.</value>
|
||||
public ImageType[] SupportedImageTypes { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,21 +4,19 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum MetadataPluginType.
|
||||
/// </summary>
|
||||
public enum MetadataPluginType
|
||||
{
|
||||
LocalImageProvider,
|
||||
ImageFetcher,
|
||||
ImageSaver,
|
||||
LocalMetadataProvider,
|
||||
MetadataFetcher,
|
||||
MetadataSaver,
|
||||
SubtitleFetcher,
|
||||
LyricFetcher,
|
||||
MediaSegmentProvider
|
||||
}
|
||||
}
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
/// <summary>
|
||||
/// Enum MetadataPluginType.
|
||||
/// </summary>
|
||||
public enum MetadataPluginType
|
||||
{
|
||||
LocalImageProvider,
|
||||
ImageFetcher,
|
||||
ImageSaver,
|
||||
LocalMetadataProvider,
|
||||
MetadataFetcher,
|
||||
MetadataSaver,
|
||||
SubtitleFetcher,
|
||||
LyricFetcher,
|
||||
MediaSegmentProvider
|
||||
}
|
||||
|
||||
@@ -2,21 +2,19 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the <see cref="PathSubstitution" />.
|
||||
/// </summary>
|
||||
public class PathSubstitution
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the value to substitute.
|
||||
/// </summary>
|
||||
public string From { get; set; } = string.Empty;
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
/// <summary>
|
||||
/// Defines the <see cref="PathSubstitution" />.
|
||||
/// </summary>
|
||||
public class PathSubstitution
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the value to substitute.
|
||||
/// </summary>
|
||||
public string From { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value to substitution with.
|
||||
/// </summary>
|
||||
public string To { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the value to substitution with.
|
||||
/// </summary>
|
||||
public string To { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1819
|
||||
|
||||
using System;
|
||||
using global::System;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.System;
|
||||
@@ -27,17 +27,17 @@ public class ServerConfiguration : BaseApplicationConfiguration
|
||||
{
|
||||
new MetadataOptions()
|
||||
{
|
||||
ItemType = "Book"
|
||||
ItemType = "Book",
|
||||
},
|
||||
new MetadataOptions()
|
||||
{
|
||||
ItemType = "Movie"
|
||||
ItemType = "Movie",
|
||||
},
|
||||
new MetadataOptions
|
||||
{
|
||||
ItemType = "MusicVideo",
|
||||
DisabledMetadataFetchers = new[] { "The Open Movie Database" },
|
||||
DisabledImageFetchers = new[] { "The Open Movie Database" }
|
||||
DisabledImageFetchers = new[] { "The Open Movie Database" },
|
||||
},
|
||||
new MetadataOptions
|
||||
{
|
||||
@@ -46,16 +46,16 @@ public class ServerConfiguration : BaseApplicationConfiguration
|
||||
new MetadataOptions
|
||||
{
|
||||
ItemType = "MusicAlbum",
|
||||
DisabledMetadataFetchers = new[] { "TheAudioDB" }
|
||||
DisabledMetadataFetchers = new[] { "TheAudioDB" },
|
||||
},
|
||||
new MetadataOptions
|
||||
{
|
||||
ItemType = "MusicArtist",
|
||||
DisabledMetadataFetchers = new[] { "TheAudioDB" }
|
||||
DisabledMetadataFetchers = new[] { "TheAudioDB" },
|
||||
},
|
||||
new MetadataOptions
|
||||
{
|
||||
ItemType = "BoxSet"
|
||||
ItemType = "BoxSet",
|
||||
},
|
||||
new MetadataOptions
|
||||
{
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
|
||||
using global::System.Collections.Generic;
|
||||
using global::System.Diagnostics;
|
||||
|
||||
/// <summary>
|
||||
/// Class TrickplayOptions.
|
||||
/// </summary>
|
||||
|
||||
@@ -5,365 +5,363 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class TypeOptions
|
||||
{
|
||||
public static readonly ImageOption DefaultInstance = new ImageOption();
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class TypeOptions
|
||||
{
|
||||
public static readonly ImageOption DefaultInstance = new ImageOption();
|
||||
|
||||
public static readonly Dictionary<string, ImageOption[]> DefaultImageOptions = new Dictionary<string, ImageOption[]>
|
||||
{
|
||||
{
|
||||
"Movie", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
public static readonly Dictionary<string, ImageOption[]> DefaultImageOptions = new Dictionary<string, ImageOption[]>
|
||||
{
|
||||
{
|
||||
"Movie", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"MusicVideo", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"MusicVideo", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Series", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Series", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Banner
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Banner,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"MusicAlbum", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"MusicAlbum", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"MusicArtist", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"MusicArtist", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
// Don't download this by default
|
||||
// They do look great, but most artists won't have them, which means a banner view isn't really possible
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner
|
||||
},
|
||||
// Don't download this by default
|
||||
// They do look great, but most artists won't have them, which means a banner view isn't really possible
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner,
|
||||
},
|
||||
|
||||
// Don't download this by default
|
||||
// Generally not used
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art
|
||||
},
|
||||
// Don't download this by default
|
||||
// Generally not used
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"BoxSet", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"BoxSet", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Thumb,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Logo,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Art,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Disc,
|
||||
},
|
||||
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Season", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
// Don't download this by default as it's rarely used.
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Season", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Banner,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Thumb
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Episode", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop
|
||||
},
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
Type = ImageType.Thumb,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Episode", new[]
|
||||
{
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 0,
|
||||
MinWidth = 1280,
|
||||
Type = ImageType.Backdrop,
|
||||
},
|
||||
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
new ImageOption
|
||||
{
|
||||
Limit = 1,
|
||||
Type = ImageType.Primary,
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public TypeOptions()
|
||||
{
|
||||
MetadataFetchers = Array.Empty<string>();
|
||||
MetadataFetcherOrder = Array.Empty<string>();
|
||||
ImageFetchers = Array.Empty<string>();
|
||||
ImageFetcherOrder = Array.Empty<string>();
|
||||
ImageOptions = Array.Empty<ImageOption>();
|
||||
}
|
||||
public TypeOptions()
|
||||
{
|
||||
MetadataFetchers = Array.Empty<string>();
|
||||
MetadataFetcherOrder = Array.Empty<string>();
|
||||
ImageFetchers = Array.Empty<string>();
|
||||
ImageFetcherOrder = Array.Empty<string>();
|
||||
ImageOptions = Array.Empty<ImageOption>();
|
||||
}
|
||||
|
||||
public string Type { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
public string[] MetadataFetchers { get; set; }
|
||||
public string[] MetadataFetchers { get; set; }
|
||||
|
||||
public string[] MetadataFetcherOrder { get; set; }
|
||||
public string[] MetadataFetcherOrder { get; set; }
|
||||
|
||||
public string[] ImageFetchers { get; set; }
|
||||
public string[] ImageFetchers { get; set; }
|
||||
|
||||
public string[] ImageFetcherOrder { get; set; }
|
||||
public string[] ImageFetcherOrder { get; set; }
|
||||
|
||||
public ImageOption[] ImageOptions { get; set; }
|
||||
public ImageOption[] ImageOptions { get; set; }
|
||||
|
||||
public ImageOption GetImageOptions(ImageType type)
|
||||
{
|
||||
foreach (var i in ImageOptions)
|
||||
{
|
||||
if (i.Type == type)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
public ImageOption GetImageOptions(ImageType type)
|
||||
{
|
||||
foreach (var i in ImageOptions)
|
||||
{
|
||||
if (i.Type == type)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
if (DefaultImageOptions.TryGetValue(Type, out ImageOption[] options))
|
||||
{
|
||||
foreach (var i in options)
|
||||
{
|
||||
if (i.Type == type)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (DefaultImageOptions.TryGetValue(Type, out ImageOption[] options))
|
||||
{
|
||||
foreach (var i in options)
|
||||
{
|
||||
if (i.Type == type)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DefaultInstance;
|
||||
}
|
||||
return DefaultInstance;
|
||||
}
|
||||
|
||||
public int GetLimit(ImageType type)
|
||||
{
|
||||
return GetImageOptions(type).Limit;
|
||||
}
|
||||
public int GetLimit(ImageType type)
|
||||
{
|
||||
return GetImageOptions(type).Limit;
|
||||
}
|
||||
|
||||
public int GetMinWidth(ImageType type)
|
||||
{
|
||||
return GetImageOptions(type).MinWidth;
|
||||
}
|
||||
public int GetMinWidth(ImageType type)
|
||||
{
|
||||
return GetImageOptions(type).MinWidth;
|
||||
}
|
||||
|
||||
public bool IsEnabled(ImageType type)
|
||||
{
|
||||
return GetLimit(type) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsEnabled(ImageType type)
|
||||
{
|
||||
return GetLimit(type) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,79 +4,77 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using global::System;
|
||||
using Jellyfin.Database.Implementations.Enums;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UserConfiguration.
|
||||
/// </summary>
|
||||
public class UserConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
|
||||
/// </summary>
|
||||
public UserConfiguration()
|
||||
{
|
||||
EnableNextEpisodeAutoPlay = true;
|
||||
RememberAudioSelections = true;
|
||||
RememberSubtitleSelections = true;
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
/// <summary>
|
||||
/// Class UserConfiguration.
|
||||
/// </summary>
|
||||
public class UserConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
|
||||
/// </summary>
|
||||
public UserConfiguration()
|
||||
{
|
||||
EnableNextEpisodeAutoPlay = true;
|
||||
RememberAudioSelections = true;
|
||||
RememberSubtitleSelections = true;
|
||||
|
||||
HidePlayedInLatest = true;
|
||||
PlayDefaultAudioTrack = true;
|
||||
HidePlayedInLatest = true;
|
||||
PlayDefaultAudioTrack = true;
|
||||
|
||||
LatestItemsExcludes = Array.Empty<Guid>();
|
||||
OrderedViews = Array.Empty<Guid>();
|
||||
MyMediaExcludes = Array.Empty<Guid>();
|
||||
GroupedFolders = Array.Empty<Guid>();
|
||||
}
|
||||
LatestItemsExcludes = Array.Empty<Guid>();
|
||||
OrderedViews = Array.Empty<Guid>();
|
||||
MyMediaExcludes = Array.Empty<Guid>();
|
||||
GroupedFolders = Array.Empty<Guid>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the audio language preference.
|
||||
/// </summary>
|
||||
/// <value>The audio language preference.</value>
|
||||
public string? AudioLanguagePreference { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the audio language preference.
|
||||
/// </summary>
|
||||
/// <value>The audio language preference.</value>
|
||||
public string? AudioLanguagePreference { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [play default audio track].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [play default audio track]; otherwise, <c>false</c>.</value>
|
||||
public bool PlayDefaultAudioTrack { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [play default audio track].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [play default audio track]; otherwise, <c>false</c>.</value>
|
||||
public bool PlayDefaultAudioTrack { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the subtitle language preference.
|
||||
/// </summary>
|
||||
/// <value>The subtitle language preference.</value>
|
||||
public string? SubtitleLanguagePreference { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the subtitle language preference.
|
||||
/// </summary>
|
||||
/// <value>The subtitle language preference.</value>
|
||||
public string? SubtitleLanguagePreference { get; set; }
|
||||
|
||||
public bool DisplayMissingEpisodes { get; set; }
|
||||
public bool DisplayMissingEpisodes { get; set; }
|
||||
|
||||
public Guid[] GroupedFolders { get; set; }
|
||||
public Guid[] GroupedFolders { get; set; }
|
||||
|
||||
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
||||
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
||||
|
||||
public bool DisplayCollectionsView { get; set; }
|
||||
public bool DisplayCollectionsView { get; set; }
|
||||
|
||||
public bool EnableLocalPassword { get; set; }
|
||||
public bool EnableLocalPassword { get; set; }
|
||||
|
||||
public Guid[] OrderedViews { get; set; }
|
||||
public Guid[] OrderedViews { get; set; }
|
||||
|
||||
public Guid[] LatestItemsExcludes { get; set; }
|
||||
public Guid[] LatestItemsExcludes { get; set; }
|
||||
|
||||
public Guid[] MyMediaExcludes { get; set; }
|
||||
public Guid[] MyMediaExcludes { get; set; }
|
||||
|
||||
public bool HidePlayedInLatest { get; set; }
|
||||
public bool HidePlayedInLatest { get; set; }
|
||||
|
||||
public bool RememberAudioSelections { get; set; }
|
||||
public bool RememberAudioSelections { get; set; }
|
||||
|
||||
public bool RememberSubtitleSelections { get; set; }
|
||||
public bool RememberSubtitleSelections { get; set; }
|
||||
|
||||
public bool EnableNextEpisodeAutoPlay { get; set; }
|
||||
public bool EnableNextEpisodeAutoPlay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the selected cast receiver.
|
||||
/// </summary>
|
||||
public string? CastReceiverId { get; set; }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the selected cast receiver.
|
||||
/// </summary>
|
||||
public string? CastReceiverId { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,26 +4,24 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class XbmcMetadataOptions
|
||||
{
|
||||
public XbmcMetadataOptions()
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
public class XbmcMetadataOptions
|
||||
{
|
||||
public XbmcMetadataOptions()
|
||||
{
|
||||
ReleaseDateFormat = "yyyy-MM-dd";
|
||||
this.ReleaseDateFormat = "yyyy-MM-dd";
|
||||
|
||||
SaveImagePathsInNfo = true;
|
||||
EnablePathSubstitution = true;
|
||||
this.SaveImagePathsInNfo = true;
|
||||
this.EnablePathSubstitution = true;
|
||||
}
|
||||
|
||||
public string? UserId { get; set; }
|
||||
public string? UserId { get; set; }
|
||||
|
||||
public string ReleaseDateFormat { get; set; }
|
||||
public string ReleaseDateFormat { get; set; }
|
||||
|
||||
public bool SaveImagePathsInNfo { get; set; }
|
||||
public bool SaveImagePathsInNfo { get; set; }
|
||||
|
||||
public bool EnablePathSubstitution { get; set; }
|
||||
public bool EnablePathSubstitution { get; set; }
|
||||
|
||||
public bool EnableExtraThumbsDuplication { get; set; }
|
||||
}
|
||||
}
|
||||
public bool EnableExtraThumbsDuplication { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user