From b7a6a1d5740e81e7c3da68c3cc8bbe7d112396b0 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Mon, 4 Mar 2013 11:09:15 -0500 Subject: [PATCH 1/3] Refactor art download options (still need config changes) --- .../Providers/Movies/FanArtMovieProvider.cs | 16 ++-- .../Providers/Music/FanArtArtistProvider.cs | 16 ++-- .../Providers/TV/FanArtTVProvider.cs | 12 +-- .../Providers/TV/RemoteSeasonProvider.cs | 4 +- .../Providers/TV/RemoteSeriesProvider.cs | 2 +- .../Configuration/ServerConfiguration.cs | 84 ++++--------------- MediaBrowser.Model/MediaBrowser.Model.csproj | 1 + 7 files changed, 43 insertions(+), 92 deletions(-) diff --git a/MediaBrowser.Controller/Providers/Movies/FanArtMovieProvider.cs b/MediaBrowser.Controller/Providers/Movies/FanArtMovieProvider.cs index d307fe099..9c71642e9 100644 --- a/MediaBrowser.Controller/Providers/Movies/FanArtMovieProvider.cs +++ b/MediaBrowser.Controller/Providers/Movies/FanArtMovieProvider.cs @@ -91,9 +91,9 @@ namespace MediaBrowser.Controller.Providers.Movies var logoExists = item.ResolveArgs.ContainsMetaFileByName(LOGO_FILE); var discExists = item.ResolveArgs.ContainsMetaFileByName(DISC_FILE); - return (!artExists && ConfigurationManager.Configuration.DownloadMovieArt) - || (!logoExists && ConfigurationManager.Configuration.DownloadMovieLogo) - || (!discExists && ConfigurationManager.Configuration.DownloadMovieDisc); + return (!artExists && ConfigurationManager.Configuration.DownloadMovieImages.Art) + || (!logoExists && ConfigurationManager.Configuration.DownloadMovieImages.Logo) + || (!discExists && ConfigurationManager.Configuration.DownloadMovieImages.Disc); } /// @@ -131,7 +131,7 @@ namespace MediaBrowser.Controller.Providers.Movies { string path; var hd = ConfigurationManager.Configuration.DownloadHDFanArt ? "hd" : ""; - if (ConfigurationManager.Configuration.DownloadMovieLogo && !item.ResolveArgs.ContainsMetaFileByName(LOGO_FILE)) + if (ConfigurationManager.Configuration.DownloadMovieImages.Logo && !item.ResolveArgs.ContainsMetaFileByName(LOGO_FILE)) { var node = doc.SelectSingleNode("//fanart/movie/movielogos/" + hd + "movielogo[@lang = \"" + language + "\"]/@url") ?? @@ -160,7 +160,7 @@ namespace MediaBrowser.Controller.Providers.Movies } cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadMovieArt && !item.ResolveArgs.ContainsMetaFileByName(ART_FILE)) + if (ConfigurationManager.Configuration.DownloadMovieImages.Art && !item.ResolveArgs.ContainsMetaFileByName(ART_FILE)) { var node = doc.SelectSingleNode("//fanart/movie/moviearts/" + hd + "movieart[@lang = \"" + language + "\"]/@url") ?? @@ -186,7 +186,7 @@ namespace MediaBrowser.Controller.Providers.Movies } cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadMovieDisc && !item.ResolveArgs.ContainsMetaFileByName(DISC_FILE)) + if (ConfigurationManager.Configuration.DownloadMovieImages.Disc && !item.ResolveArgs.ContainsMetaFileByName(DISC_FILE)) { var node = doc.SelectSingleNode("//fanart/movie/moviediscs/moviedisc[@lang = \"" + language + "\"]/@url") ?? doc.SelectSingleNode("//fanart/movie/moviediscs/moviedisc/@url"); @@ -210,7 +210,7 @@ namespace MediaBrowser.Controller.Providers.Movies cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadMovieBanner && !item.ResolveArgs.ContainsMetaFileByName(BANNER_FILE)) + if (ConfigurationManager.Configuration.DownloadMovieImages.Banner && !item.ResolveArgs.ContainsMetaFileByName(BANNER_FILE)) { var node = doc.SelectSingleNode("//fanart/movie/moviebanners/moviebanner[@lang = \"" + language + "\"]/@url") ?? doc.SelectSingleNode("//fanart/movie/moviebanners/moviebanner/@url"); @@ -234,7 +234,7 @@ namespace MediaBrowser.Controller.Providers.Movies cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadMovieThumb && !item.ResolveArgs.ContainsMetaFileByName(THUMB_FILE)) + if (ConfigurationManager.Configuration.DownloadMovieImages.Thumb && !item.ResolveArgs.ContainsMetaFileByName(THUMB_FILE)) { var node = doc.SelectSingleNode("//fanart/movie/moviethumbs/moviethumb[@lang = \"" + language + "\"]/@url") ?? doc.SelectSingleNode("//fanart/movie/moviethumbs/moviethumb/@url"); diff --git a/MediaBrowser.Controller/Providers/Music/FanArtArtistProvider.cs b/MediaBrowser.Controller/Providers/Music/FanArtArtistProvider.cs index d4585d58a..9f0dedf4d 100644 --- a/MediaBrowser.Controller/Providers/Music/FanArtArtistProvider.cs +++ b/MediaBrowser.Controller/Providers/Music/FanArtArtistProvider.cs @@ -66,9 +66,9 @@ namespace MediaBrowser.Controller.Providers.Music var logoExists = item.ResolveArgs.ContainsMetaFileByName(LOGO_FILE); var discExists = item.ResolveArgs.ContainsMetaFileByName(DISC_FILE); - return (!artExists && ConfigurationManager.Configuration.DownloadMovieArt) - || (!logoExists && ConfigurationManager.Configuration.DownloadMovieLogo) - || (!discExists && ConfigurationManager.Configuration.DownloadMovieDisc); + return (!artExists && ConfigurationManager.Configuration.DownloadMusicArtistImages.Art) + || (!logoExists && ConfigurationManager.Configuration.DownloadMusicArtistImages.Logo) + || (!discExists && ConfigurationManager.Configuration.DownloadMusicArtistImages.Disc); } /// @@ -105,7 +105,7 @@ namespace MediaBrowser.Controller.Providers.Music { string path; var hd = ConfigurationManager.Configuration.DownloadHDFanArt ? "hd" : ""; - if (ConfigurationManager.Configuration.DownloadMovieLogo && !item.ResolveArgs.ContainsMetaFileByName(LOGO_FILE)) + if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Logo && !item.ResolveArgs.ContainsMetaFileByName(LOGO_FILE)) { var node = doc.SelectSingleNode("//fanart/music/musiclogos/" + hd + "musiclogo/@url") ?? @@ -129,7 +129,7 @@ namespace MediaBrowser.Controller.Providers.Music } cancellationToken.ThrowIfCancellationRequested(); - if (!item.ResolveArgs.ContainsMetaFileByName(BACKDROP_FILE)) + if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Backdrops && !item.ResolveArgs.ContainsMetaFileByName(BACKDROP_FILE)) { var nodes = doc.SelectNodes("//fanart/music/artistbackgrounds//@url"); if (nodes != null) @@ -163,7 +163,7 @@ namespace MediaBrowser.Controller.Providers.Music cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadMovieArt && !item.ResolveArgs.ContainsMetaFileByName(ART_FILE)) + if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Art && !item.ResolveArgs.ContainsMetaFileByName(ART_FILE)) { var node = doc.SelectSingleNode("//fanart/music/musicarts/" + hd + "musicart/@url") ?? @@ -187,7 +187,7 @@ namespace MediaBrowser.Controller.Providers.Music } cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadMovieBanner && !item.ResolveArgs.ContainsMetaFileByName(BANNER_FILE)) + if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Banner && !item.ResolveArgs.ContainsMetaFileByName(BANNER_FILE)) { var node = doc.SelectSingleNode("//fanart/music/musicbanners/"+hd+"musicbanner/@url") ?? doc.SelectSingleNode("//fanart/music/musicbanners/musicbanner/@url"); @@ -212,7 +212,7 @@ namespace MediaBrowser.Controller.Providers.Music cancellationToken.ThrowIfCancellationRequested(); // Artist thumbs are actually primary images (they are square/portrait) - if (!item.ResolveArgs.ContainsMetaFileByName(PRIMARY_FILE)) + if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Primary && !item.ResolveArgs.ContainsMetaFileByName(PRIMARY_FILE)) { var node = doc.SelectSingleNode("//fanart/music/artistthumbs/artistthumb/@url"); path = node != null ? node.Value : null; diff --git a/MediaBrowser.Controller/Providers/TV/FanArtTVProvider.cs b/MediaBrowser.Controller/Providers/TV/FanArtTVProvider.cs index d89545a8d..5dcead7b1 100644 --- a/MediaBrowser.Controller/Providers/TV/FanArtTVProvider.cs +++ b/MediaBrowser.Controller/Providers/TV/FanArtTVProvider.cs @@ -48,9 +48,9 @@ namespace MediaBrowser.Controller.Providers.TV var thumbExists = item.ResolveArgs.ContainsMetaFileByName(THUMB_FILE); - return (!artExists && ConfigurationManager.Configuration.DownloadTVArt) - || (!logoExists && ConfigurationManager.Configuration.DownloadTVLogo) - || (!thumbExists && ConfigurationManager.Configuration.DownloadTVThumb); + return (!artExists && ConfigurationManager.Configuration.DownloadSeriesImages.Art) + || (!logoExists && ConfigurationManager.Configuration.DownloadSeriesImages.Logo) + || (!thumbExists && ConfigurationManager.Configuration.DownloadSeriesImages.Thumb); } protected override async Task FetchAsyncInternal(BaseItem item, bool force, CancellationToken cancellationToken) @@ -80,7 +80,7 @@ namespace MediaBrowser.Controller.Providers.TV if (doc.HasChildNodes) { string path; - if (ConfigurationManager.Configuration.DownloadTVLogo && !series.ResolveArgs.ContainsMetaFileByName(LOGO_FILE)) + if (ConfigurationManager.Configuration.DownloadSeriesImages.Logo && !series.ResolveArgs.ContainsMetaFileByName(LOGO_FILE)) { var node = doc.SelectSingleNode("//fanart/series/clearlogos/clearlogo[@lang = \"" + language + "\"]/@url") ?? doc.SelectSingleNode("//fanart/series/clearlogos/clearlogo/@url"); @@ -104,7 +104,7 @@ namespace MediaBrowser.Controller.Providers.TV cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadTVArt && !series.ResolveArgs.ContainsMetaFileByName(ART_FILE)) + if (ConfigurationManager.Configuration.DownloadSeriesImages.Art && !series.ResolveArgs.ContainsMetaFileByName(ART_FILE)) { var node = doc.SelectSingleNode("//fanart/series/cleararts/clearart[@lang = \"" + language + "\"]/@url") ?? doc.SelectSingleNode("//fanart/series/cleararts/clearart/@url"); @@ -128,7 +128,7 @@ namespace MediaBrowser.Controller.Providers.TV cancellationToken.ThrowIfCancellationRequested(); - if (ConfigurationManager.Configuration.DownloadTVThumb && !series.ResolveArgs.ContainsMetaFileByName(THUMB_FILE)) + if (ConfigurationManager.Configuration.DownloadSeriesImages.Thumb && !series.ResolveArgs.ContainsMetaFileByName(THUMB_FILE)) { var node = doc.SelectSingleNode("//fanart/series/tvthumbs/tvthumb[@lang = \"" + language + "\"]/@url") ?? doc.SelectSingleNode("//fanart/series/tvthumbs/tvthumb/@url"); diff --git a/MediaBrowser.Controller/Providers/TV/RemoteSeasonProvider.cs b/MediaBrowser.Controller/Providers/TV/RemoteSeasonProvider.cs index 71741d225..03d7d3353 100644 --- a/MediaBrowser.Controller/Providers/TV/RemoteSeasonProvider.cs +++ b/MediaBrowser.Controller/Providers/TV/RemoteSeasonProvider.cs @@ -186,7 +186,7 @@ namespace MediaBrowser.Controller.Providers.TV } } - if (ConfigurationManager.Configuration.DownloadTVSeasonBanner && (ConfigurationManager.Configuration.RefreshItemImages || !season.HasLocalImage("banner"))) + if (ConfigurationManager.Configuration.DownloadSeasonImages.Banner && (ConfigurationManager.Configuration.RefreshItemImages || !season.HasLocalImage("banner"))) { var n = images.SelectSingleNode("//Banner[BannerType='season'][BannerType2='seasonwide'][Season='" + seasonNumber + "']"); if (n != null) @@ -218,7 +218,7 @@ namespace MediaBrowser.Controller.Providers.TV } } - if (ConfigurationManager.Configuration.DownloadTVSeasonBackdrops && (ConfigurationManager.Configuration.RefreshItemImages || !season.HasLocalImage("backdrop"))) + if (ConfigurationManager.Configuration.DownloadSeasonImages.Backdrops && (ConfigurationManager.Configuration.RefreshItemImages || !season.HasLocalImage("backdrop"))) { var n = images.SelectSingleNode("//Banner[BannerType='fanart'][Season='" + seasonNumber + "']"); if (n != null) diff --git a/MediaBrowser.Controller/Providers/TV/RemoteSeriesProvider.cs b/MediaBrowser.Controller/Providers/TV/RemoteSeriesProvider.cs index 1d4063cdd..efb158b1e 100644 --- a/MediaBrowser.Controller/Providers/TV/RemoteSeriesProvider.cs +++ b/MediaBrowser.Controller/Providers/TV/RemoteSeriesProvider.cs @@ -379,7 +379,7 @@ namespace MediaBrowser.Controller.Providers.TV } } - if (ConfigurationManager.Configuration.DownloadTVBanner && (ConfigurationManager.Configuration.RefreshItemImages || !series.HasLocalImage("banner"))) + if (ConfigurationManager.Configuration.DownloadSeriesImages.Banner && (ConfigurationManager.Configuration.RefreshItemImages || !series.HasLocalImage("banner"))) { var n = images.SelectSingleNode("//Banner[BannerType='series']"); if (n != null) diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 71f368397..5930920fb 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.Updates; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Updates; using MediaBrowser.Model.Weather; using ProtoBuf; using System; @@ -96,88 +97,34 @@ namespace MediaBrowser.Model.Configuration public int MaxBackdrops { get; set; } /// - /// Gets or sets a value indicating whether [download movie art]. + /// Options for specific art to download for movies. /// - /// true if [download movie art]; otherwise, false. [ProtoMember(40)] - public bool DownloadMovieArt { get; set; } + public ImageDownloadOptions DownloadMovieImages { get; set; } /// - /// Gets or sets a value indicating whether [download movie logo]. + /// Options for specific art to download for Series. /// - /// true if [download movie logo]; otherwise, false. [ProtoMember(41)] - public bool DownloadMovieLogo { get; set; } + public ImageDownloadOptions DownloadSeriesImages { get; set; } /// - /// Gets or sets a value indicating whether [download movie disc]. + /// Options for specific art to download for Seasons. /// - /// true if [download movie disc]; otherwise, false. [ProtoMember(42)] - public bool DownloadMovieDisc { get; set; } + public ImageDownloadOptions DownloadSeasonImages { get; set; } /// - /// Gets or sets a value indicating whether [download TV art]. + /// Options for specific art to download for MusicArtists. /// - /// true if [download TV art]; otherwise, false. [ProtoMember(43)] - public bool DownloadTVArt { get; set; } + public ImageDownloadOptions DownloadMusicArtistImages { get; set; } /// - /// Gets or sets a value indicating whether [download TV logo]. + /// Options for specific art to download for MusicAlbums. /// - /// true if [download TV logo]; otherwise, false. [ProtoMember(44)] - public bool DownloadTVLogo { get; set; } - - /// - /// Gets or sets a value indicating whether [download TV thumb]. - /// - /// true if [download TV thumb]; otherwise, false. - [ProtoMember(45)] - public bool DownloadTVThumb { get; set; } - - /// - /// Gets or sets a value indicating whether [download movie banner]. - /// - /// true if [download movie banner]; otherwise, false. - [ProtoMember(46)] - public bool DownloadMovieBanner { get; set; } - - /// - /// Gets or sets a value indicating whether [download movie thumb]. - /// - /// true if [download movie thumb]; otherwise, false. - [ProtoMember(47)] - public bool DownloadMovieThumb { get; set; } - - /// - /// Gets or sets a value indicating whether [download TV banner]. - /// - /// true if [download TV banner]; otherwise, false. - [ProtoMember(48)] - public bool DownloadTVBanner { get; set; } - - /// - /// Gets or sets a value indicating whether [download TV season banner]. - /// - /// true if [download TV season banner]; otherwise, false. - [ProtoMember(49)] - public bool DownloadTVSeasonBanner { get; set; } - - /// - /// Gets or sets a value indicating whether [download TV season thumb]. - /// - /// true if [download TV season thumb]; otherwise, false. - [ProtoMember(50)] - public bool DownloadTVSeasonThumb { get; set; } - - /// - /// Gets or sets a value indicating whether [download TV season backdrops]. - /// - /// true if [download TV season banner]; otherwise, false. - [ProtoMember(51)] - public bool DownloadTVSeasonBackdrops { get; set; } + public ImageDownloadOptions DownloadMusicAlbumImages { get; set; } /// /// Gets or sets a value indicating whether [download TV season backdrops]. @@ -330,8 +277,11 @@ namespace MediaBrowser.Model.Configuration TmdbFetchedProfileSize = "w185"; //w185 w45 h632 or original TmdbFetchedPosterSize = "w500"; //w500, w342, w185 or original TmdbFetchedBackdropSize = "w1280"; //w1280, w780 or original - DownloadTVSeasonBanner = true; - DownloadTVBanner = true; + DownloadMovieImages = new ImageDownloadOptions {Backdrops = true, Primary = true}; + DownloadSeriesImages = new ImageDownloadOptions {Backdrops = true, Primary = true, Banner = true, Logo = true}; + DownloadSeasonImages = new ImageDownloadOptions {Backdrops = false, Primary = true, Banner = true}; + DownloadMusicArtistImages = new ImageDownloadOptions {Backdrops = true, Primary = true, Banner = true}; + DownloadMusicAlbumImages = new ImageDownloadOptions {Backdrops = true, Primary = false}; DownloadHDFanArt = true; MaxBackdrops = 4; diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index f291e12c9..0d0e20f81 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -49,6 +49,7 @@ + From 7710b3695ccace124f4af4c9d5255c40b32cbac1 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Mon, 4 Mar 2013 11:11:50 -0500 Subject: [PATCH 2/3] Oops --- .../Entities/ImageDownloadOptions.cs | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 MediaBrowser.Model/Entities/ImageDownloadOptions.cs diff --git a/MediaBrowser.Model/Entities/ImageDownloadOptions.cs b/MediaBrowser.Model/Entities/ImageDownloadOptions.cs new file mode 100644 index 000000000..38d442705 --- /dev/null +++ b/MediaBrowser.Model/Entities/ImageDownloadOptions.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ProtoBuf; + +namespace MediaBrowser.Model.Entities +{ + [ProtoContract] + public class ImageDownloadOptions + { + /// + /// Download Art Image + /// + [ProtoMember(1)] + public bool Art { get; set; } + + /// + /// Download Logo Image + /// + [ProtoMember(2)] + public bool Logo { get; set; } + + /// + /// Download Primary Image + /// + [ProtoMember(3)] + public bool Primary { get; set; } + + /// + /// Download Backdrop Images + /// + [ProtoMember(4)] + public bool Backdrops { get; set; } + + /// + /// Download Disc Image + /// + [ProtoMember(5)] + public bool Disc { get; set; } + + /// + /// Download Thumb Image + /// + [ProtoMember(6)] + public bool Thumb { get; set; } + + /// + /// Download Banner Image + /// + [ProtoMember(7)] + public bool Banner { get; set; } + + } +} From 62448129a66f50b6ac2874c6da514399f974340e Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Mon, 4 Mar 2013 11:59:35 -0500 Subject: [PATCH 3/3] Config page changes for image options --- .../Configuration/ServerConfiguration.cs | 2 +- .../Html/metadataImages.html | 100 +++++++++++++----- .../Html/scripts/MetadataImagesPage.js | 60 ++++++----- 3 files changed, 111 insertions(+), 51 deletions(-) diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 5930920fb..ff7f5221b 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -280,7 +280,7 @@ namespace MediaBrowser.Model.Configuration DownloadMovieImages = new ImageDownloadOptions {Backdrops = true, Primary = true}; DownloadSeriesImages = new ImageDownloadOptions {Backdrops = true, Primary = true, Banner = true, Logo = true}; DownloadSeasonImages = new ImageDownloadOptions {Backdrops = false, Primary = true, Banner = true}; - DownloadMusicArtistImages = new ImageDownloadOptions {Backdrops = true, Primary = true, Banner = true}; + DownloadMusicArtistImages = new ImageDownloadOptions {Backdrops = true, Primary = true, Banner = true, Thumb = true}; DownloadMusicAlbumImages = new ImageDownloadOptions {Backdrops = true, Primary = false}; DownloadHDFanArt = true; MaxBackdrops = 4; diff --git a/MediaBrowser.WebDashboard/Html/metadataImages.html b/MediaBrowser.WebDashboard/Html/metadataImages.html index 5c9e7e02d..b06a3205b 100644 --- a/MediaBrowser.WebDashboard/Html/metadataImages.html +++ b/MediaBrowser.WebDashboard/Html/metadataImages.html @@ -30,44 +30,92 @@
  • -
    + +
    +

    Movies

    +
    + + - - + + - - + + - - + + - - + + - - + +
    +
    - - +
    +

    TV Series

    +
    + + - - + + - - + + - - + + +
    +
    - - - - +
    +

    TV Seasons

    +
    + + + + + + + + +
    + +
    + +
    +

    Music Artists

    +
    + + + + + + + + + + + +
    + +
    + +
    +

    Music Albums

    +
    + + + + + +
    + +
    - - -
  • diff --git a/MediaBrowser.WebDashboard/Html/scripts/MetadataImagesPage.js b/MediaBrowser.WebDashboard/Html/scripts/MetadataImagesPage.js index c9f2523f7..0dff46c39 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/MetadataImagesPage.js +++ b/MediaBrowser.WebDashboard/Html/scripts/MetadataImagesPage.js @@ -20,18 +20,24 @@ $('#chkRefreshItemImages', page).checked(config.RefreshItemImages).checkboxradio("refresh"); $('#txtNumbackdrops', page).val(config.MaxBackdrops); - $('#chkDownloadMovieArt', page).checked(config.DownloadMovieArt).checkboxradio("refresh"); - $('#chkDownloadMovieBanner', page).checked(config.DownloadMovieBanner).checkboxradio("refresh"); - $('#chkDownloadMovieDisc', page).checked(config.DownloadMovieDisc).checkboxradio("refresh"); - $('#chkDownloadMovieLogo', page).checked(config.DownloadMovieLogo).checkboxradio("refresh"); - $('#chkDownloadMovieThumb', page).checked(config.DownloadMovieThumb).checkboxradio("refresh"); - $('#chKDownloadTVArt', page).checked(config.DownloadTVArt).checkboxradio("refresh"); - $('#chkDownloadTVBanner', page).checked(config.DownloadTVBanner).checkboxradio("refresh"); - $('#chkDownloadTVLogo', page).checked(config.DownloadTVLogo).checkboxradio("refresh"); - $('#chkDownloadTVThumb', page).checked(config.DownloadTVThumb).checkboxradio("refresh"); - $('#chkDownloadSeasonBanner', page).checked(config.DownloadTVSeasonBanner).checkboxradio("refresh"); - $('#chkDownloadSeasonThumb', page).checked(config.DownloadTVSeasonThumb).checkboxradio("refresh"); - $('#chkDownloadSeasonBackdrops', page).checked(config.DownloadTVSeasonBackdrops).checkboxradio("refresh"); + $('#chkDownloadMovieArt', page).checked(config.DownloadMovieImages.Art).checkboxradio("refresh"); + $('#chkDownloadMovieBanner', page).checked(config.DownloadMovieImages.Banner).checkboxradio("refresh"); + $('#chkDownloadMovieDisc', page).checked(config.DownloadMovieImages.Disc).checkboxradio("refresh"); + $('#chkDownloadMovieLogo', page).checked(config.DownloadMovieImages.Logo).checkboxradio("refresh"); + $('#chkDownloadMovieThumb', page).checked(config.DownloadMovieImages.Thumb).checkboxradio("refresh"); + $('#chKDownloadTVArt', page).checked(config.DownloadSeriesImages.Art).checkboxradio("refresh"); + $('#chkDownloadTVBanner', page).checked(config.DownloadSeriesImages.Banner).checkboxradio("refresh"); + $('#chkDownloadTVLogo', page).checked(config.DownloadSeriesImages.Logo).checkboxradio("refresh"); + $('#chkDownloadTVThumb', page).checked(config.DownloadSeriesImages.Thumb).checkboxradio("refresh"); + $('#chkDownloadSeasonBanner', page).checked(config.DownloadSeasonImages.Banner).checkboxradio("refresh"); + $('#chkDownloadSeasonThumb', page).checked(config.DownloadSeasonImages.Thumb).checkboxradio("refresh"); + $('#chkDownloadSeasonBackdrops', page).checked(config.DownloadSeasonImages.Backdrops).checkboxradio("refresh"); + $('#chkDownloadArtistThumb', page).checked(config.DownloadMusicArtistImages.Thumb).checkboxradio("refresh"); + $('#chkDownloadArtistBackdrops', page).checked(config.DownloadMusicArtistImages.Backdrops).checkboxradio("refresh"); + $('#chkDownloadArtistLogo', page).checked(config.DownloadMusicArtistImages.Logo).checkboxradio("refresh"); + $('#chkDownloadArtistBanner', page).checked(config.DownloadMusicArtistImages.Banner).checkboxradio("refresh"); + $('#chkDownloadAlbumPrimary', page).checked(config.DownloadMusicAlbumImages.Primary).checkboxradio("refresh"); + $('#chkDownloadAlbumBackdrops', page).checked(config.DownloadMusicAlbumImages.Backdrops).checkboxradio("refresh"); Dashboard.hideLoadingMsg(); }, @@ -50,18 +56,24 @@ config.RefreshItemImages = $('#chkRefreshItemImages', form).checked(); config.MaxBackdrops = $('#txtNumbackdrops', form).val(); - config.DownloadMovieArt = $('#chkDownloadMovieArt', form).checked(); - config.DownloadMovieBanner = $('#chkDownloadMovieBanner', form).checked(); - config.DownloadMovieDisc = $('#chkDownloadMovieDisc', form).checked(); - config.DownloadMovieLogo = $('#chkDownloadMovieLogo', form).checked(); - config.DownloadMovieThumb = $('#chkDownloadMovieThumb', form).checked(); - config.DownloadTVArt = $('#chKDownloadTVArt', form).checked(); - config.DownloadTVBanner = $('#chkDownloadTVBanner', form).checked(); - config.DownloadTVLogo = $('#chkDownloadTVLogo', form).checked(); - config.DownloadTVThumb = $('#chkDownloadTVThumb', form).checked(); - config.DownloadTVSeasonBanner = $('#chkDownloadSeasonBanner', form).checked(); - config.DownloadTVSeasonThumb = $('#chkDownloadSeasonThumb', form).checked(); - config.DownloadTVSeasonBackdrops = $('#chkDownloadSeasonBackdrops', form).checked(); + config.DownloadMovieImages.Art = $('#chkDownloadMovieArt', form).checked(); + config.DownloadMovieImages.Banner = $('#chkDownloadMovieBanner', form).checked(); + config.DownloadMovieImages.Disc = $('#chkDownloadMovieDisc', form).checked(); + config.DownloadMovieImages.Logo = $('#chkDownloadMovieLogo', form).checked(); + config.DownloadMovieImages.Thumb = $('#chkDownloadMovieThumb', form).checked(); + config.DownloadSeriesImages.Art = $('#chKDownloadTVArt', form).checked(); + config.DownloadSeriesImages.Banner = $('#chkDownloadTVBanner', form).checked(); + config.DownloadSeriesImages.Logo = $('#chkDownloadTVLogo', form).checked(); + config.DownloadSeriesImages.Thumb = $('#chkDownloadTVThumb', form).checked(); + config.DownloadSeasonImages.Banner = $('#chkDownloadSeasonBanner', form).checked(); + config.DownloadSeasonImages.Thumb = $('#chkDownloadSeasonThumb', form).checked(); + config.DownloadSeasonImages.Backdrops = $('#chkDownloadSeasonBackdrops', form).checked(); + config.DownloadMusicArtistImages.Backdrops = $('#chkDownloadArtistBackdrops', form).checked(); + config.DownloadMusicArtistImages.Logo = $('#chkDownloadArtistLogo', form).checked(); + config.DownloadMusicArtistImages.Thumb = $('#chkDownloadArtistThumb', form).checked(); + config.DownloadMusicArtistImages.Banner = $('#chkDownloadArtistBanner', form).checked(); + config.DownloadMusicAlbumImages.Primary = $('#chkDownloadAlbumPrimary', form).checked(); + config.DownloadMusicAlbumImages.Backdrops = $('#chkDownloadAlbumBackdrops', form).checked(); ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult); });