diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Model/Configuration/MetadataOptions.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Model/Configuration/MetadataOptions.cs')
| -rw-r--r-- | MediaBrowser.Model/Configuration/MetadataOptions.cs | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/MediaBrowser.Model/Configuration/MetadataOptions.cs b/MediaBrowser.Model/Configuration/MetadataOptions.cs deleted file mode 100644 index 8a41decbf..000000000 --- a/MediaBrowser.Model/Configuration/MetadataOptions.cs +++ /dev/null @@ -1,91 +0,0 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Extensions; -using System.Collections.Generic; - -namespace MediaBrowser.Model.Configuration -{ - /// <summary> - /// Class MetadataOptions. - /// </summary> - public class MetadataOptions - { - public string ItemType { get; set; } - - public ImageOption[] ImageOptions { get; set; } - - public string[] DisabledMetadataSavers { get; set; } - public string[] LocalMetadataReaderOrder { get; set; } - - public string[] DisabledMetadataFetchers { get; set; } - public string[] MetadataFetcherOrder { get; set; } - - public string[] DisabledImageFetchers { get; set; } - public string[] ImageFetcherOrder { get; set; } - - public MetadataOptions() - : this(3, 1280) - { - } - - public MetadataOptions(int backdropLimit, int minBackdropWidth) - { - ImageOptions = new[] - { - new ImageOption - { - Limit = backdropLimit, - MinWidth = minBackdropWidth, - Type = ImageType.Backdrop - } - }; - - DisabledMetadataSavers = new string[] { }; - LocalMetadataReaderOrder = new string[] { }; - - DisabledMetadataFetchers = new string[] { }; - MetadataFetcherOrder = new string[] { }; - DisabledImageFetchers = new string[] { }; - ImageFetcherOrder = new string[] { }; - } - - public int GetLimit(ImageType type) - { - ImageOption option = null; - foreach (ImageOption i in ImageOptions) - { - if (i.Type == type) - { - option = i; - break; - } - } - - return option == null ? 1 : option.Limit; - } - - public int GetMinWidth(ImageType type) - { - ImageOption option = null; - foreach (ImageOption i in ImageOptions) - { - if (i.Type == type) - { - option = i; - break; - } - } - - return option == null ? 0 : option.MinWidth; - } - - public bool IsEnabled(ImageType type) - { - return GetLimit(type) > 0; - } - - public bool IsMetadataSaverEnabled(string name) - { - return !ListHelper.ContainsIgnoreCase(DisabledMetadataSavers, name); - } - } -} |
