From 25db52003c20473e94e07fb02adf43549a4ba213 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 26 Dec 2013 01:17:19 -0500 Subject: added more metadata control --- .../Configuration/ImageDownloadOptions.cs | 81 ++++++++++++++++++++++ .../Configuration/ServerConfiguration.cs | 44 ++++++------ 2 files changed, 102 insertions(+), 23 deletions(-) create mode 100644 MediaBrowser.Model/Configuration/ImageDownloadOptions.cs (limited to 'MediaBrowser.Model/Configuration') diff --git a/MediaBrowser.Model/Configuration/ImageDownloadOptions.cs b/MediaBrowser.Model/Configuration/ImageDownloadOptions.cs new file mode 100644 index 000000000..603112110 --- /dev/null +++ b/MediaBrowser.Model/Configuration/ImageDownloadOptions.cs @@ -0,0 +1,81 @@ + +namespace MediaBrowser.Model.Configuration +{ + /// + /// Class ImageDownloadOptions + /// + public class ImageDownloadOptions + { + /// + /// Download Art Image + /// + /// true if art; otherwise, false. + public bool Art { get; set; } + + /// + /// Download Logo Image + /// + /// true if logo; otherwise, false. + public bool Logo { get; set; } + + /// + /// Download Primary Image + /// + /// true if primary; otherwise, false. + public bool Primary { get; set; } + + /// + /// Download Backdrop Images + /// + /// true if backdrops; otherwise, false. + public bool Backdrops { get; set; } + + /// + /// Download Disc Image + /// + /// true if disc; otherwise, false. + public bool Disc { get; set; } + + /// + /// Download Thumb Image + /// + /// true if thumb; otherwise, false. + public bool Thumb { get; set; } + + /// + /// Download Banner Image + /// + /// true if banner; otherwise, false. + public bool Banner { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public ImageDownloadOptions() + { + Art = true; + Logo = true; + Primary = true; + Backdrops = true; + Disc = true; + Thumb = true; + Banner = true; + } + } + + /// + /// Class MetadataOptions. + /// + public class MetadataOptions + { + public int MaxBackdrops { get; set; } + + public int MinBackdropWidth { get; set; } + + public MetadataOptions() + { + MaxBackdrops = 3; + MinBackdropWidth = 1280; + } + } +} diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 9527fcbf3..c8c205404 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Weather; +using MediaBrowser.Model.Weather; using System; namespace MediaBrowser.Model.Configuration @@ -87,12 +86,6 @@ namespace MediaBrowser.Model.Configuration /// The metadata country code. public string MetadataCountryCode { get; set; } - /// - /// Gets or sets the max backdrops. - /// - /// The max backdrops. - public int MaxBackdrops { get; set; } - /// /// Options for specific art to download for movies. /// @@ -204,18 +197,6 @@ namespace MediaBrowser.Model.Configuration /// The image saving convention. public ImageSavingConvention ImageSavingConvention { get; set; } - /// - /// Gets or sets the width of the min movie backdrop. - /// - /// The width of the min movie backdrop. - public int MinMovieBackdropDownloadWidth { get; set; } - - /// - /// Gets or sets the width of the min series backdrop. - /// - /// The width of the min series backdrop. - public int MinSeriesBackdropDownloadWidth { get; set; } - /// /// Gets or sets a value indicating whether [enable people prefix sub folders]. /// @@ -232,6 +213,12 @@ namespace MediaBrowser.Model.Configuration public bool EnableEpisodeChapterImageExtraction { get; set; } public bool EnableOtherVideoChapterImageExtraction { get; set; } + public MetadataOptions MovieOptions { get; set; } + public MetadataOptions TvOptions { get; set; } + public MetadataOptions MusicOptions { get; set; } + public MetadataOptions GameOptions { get; set; } + public MetadataOptions BookOptions { get; set; } + /// /// Initializes a new instance of the class. /// @@ -272,7 +259,6 @@ namespace MediaBrowser.Model.Configuration }; DownloadMusicArtistImages = new ImageDownloadOptions(); DownloadMusicAlbumImages = new ImageDownloadOptions(); - MaxBackdrops = 3; SortReplaceCharacters = new[] { ".", "+", "%" }; SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" }; @@ -280,8 +266,20 @@ namespace MediaBrowser.Model.Configuration SeasonZeroDisplayName = "Specials"; - MinMovieBackdropDownloadWidth = 1280; - MinSeriesBackdropDownloadWidth = 1280; + MovieOptions = new MetadataOptions(); + TvOptions = new MetadataOptions(); + + MusicOptions = new MetadataOptions() + { + MaxBackdrops = 1 + }; + + GameOptions = new MetadataOptions(); + + BookOptions = new MetadataOptions + { + MaxBackdrops = 1 + }; } } -- cgit v1.2.3