From 374a135a65f7fdae79eadc9061d8f7aa1d81971d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 23 Jun 2013 15:03:10 -0400 Subject: [PATCH] make sure episode xml saver checks local metadata setting --- MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs b/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs index f5b5a5d44d..524c1dc97b 100644 --- a/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs +++ b/MediaBrowser.Providers/Savers/EpisodeXmlSaver.cs @@ -1,19 +1,22 @@ -using System; +using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Entities; +using MediaBrowser.Providers.TV; +using System; using System.Globalization; using System.IO; using System.Security; using System.Text; using System.Threading; -using MediaBrowser.Providers.TV; namespace MediaBrowser.Providers.Savers { public class EpisodeXmlSaver : IMetadataSaver { + private readonly IServerConfigurationManager _config; + /// /// Supportses the specified item. /// @@ -21,7 +24,7 @@ namespace MediaBrowser.Providers.Savers /// true if XXXX, false otherwise public bool Supports(BaseItem item) { - if (item.LocationType != LocationType.FileSystem) + if (!_config.Configuration.SaveLocalMeta || item.LocationType != LocationType.FileSystem) { return false; } @@ -31,6 +34,11 @@ namespace MediaBrowser.Providers.Savers private readonly CultureInfo _usCulture = new CultureInfo("en-US"); + public EpisodeXmlSaver(IServerConfigurationManager config) + { + _config = config; + } + /// /// Saves the specified item. ///