fixed xml savers from running even with save local off

pull/702/head
Luke Pulverenti 11 years ago
parent e24d7676fe
commit f87454336e

@ -1,11 +1,10 @@
using System.Collections.Generic; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Entities;
using MediaBrowser.Providers.Movies; using MediaBrowser.Providers.Movies;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
@ -32,8 +31,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is MusicAlbum; return item is MusicAlbum;
} }

@ -1,15 +1,13 @@
using System.Collections.Generic; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Entities; using MediaBrowser.Providers.Music;
using MediaBrowser.Providers.Movies;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using MediaBrowser.Providers.Music;
namespace MediaBrowser.Providers.Savers namespace MediaBrowser.Providers.Savers
{ {
@ -30,9 +28,11 @@ namespace MediaBrowser.Providers.Savers
/// <returns><c>true</c> if [is enabled for] [the specified item]; otherwise, <c>false</c>.</returns> /// <returns><c>true</c> if [is enabled for] [the specified item]; otherwise, <c>false</c>.</returns>
public bool IsEnabledFor(BaseItem item, ItemUpdateType updateType) public bool IsEnabledFor(BaseItem item, ItemUpdateType updateType)
{ {
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
if ((_config.Configuration.SaveLocalMeta && (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload) var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
|| (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit)
// If new metadata has been downloaded and save local is on
if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
if (item is MusicArtist) if (item is MusicArtist)
{ {
@ -41,8 +41,7 @@ namespace MediaBrowser.Providers.Savers
} }
// If new metadata has been downloaded or metadata was manually edited, proceed // If new metadata has been downloaded or metadata was manually edited, proceed
if ((updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload if (wasMetadataDownloaded || wasMetadataEdited)
|| (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit)
{ {
if (item is Artist) if (item is Artist)
{ {

@ -1,10 +1,10 @@
using System.Collections.Generic; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Providers.Movies; using MediaBrowser.Providers.Movies;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
@ -31,8 +31,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is BoxSet; return item is BoxSet;
} }

@ -1,11 +1,11 @@
using System.Collections.Generic; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Persistence;
using MediaBrowser.Providers.TV; using MediaBrowser.Providers.TV;
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Security; using System.Security;
@ -30,8 +30,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is Episode; return item is Episode;
} }

@ -37,8 +37,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && wasMetadataDownloaded) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
if (!(item is Series) && !(item is BoxSet) && !(item is MusicArtist) && !(item is MusicAlbum) && if (!(item is Series) && !(item is BoxSet) && !(item is MusicArtist) && !(item is MusicAlbum) &&
!(item is Season)) !(item is Season))

@ -30,8 +30,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is GameSystem; return item is GameSystem;
} }

@ -35,8 +35,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is Game; return item is Game;
} }

@ -39,8 +39,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
var trailer = item as Trailer; var trailer = item as Trailer;

@ -1,10 +1,10 @@
using System.Collections.Generic; using MediaBrowser.Controller.Entities;
using System.Security;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Providers.Movies; using MediaBrowser.Providers.Movies;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Security;
using System.Text; using System.Text;
using System.Threading; using System.Threading;

@ -1,13 +1,13 @@
using System; using MediaBrowser.Controller.Configuration;
using System.Collections.Generic;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Providers.TV;
using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using MediaBrowser.Providers.TV;
namespace MediaBrowser.Providers.Savers namespace MediaBrowser.Providers.Savers
{ {
@ -31,8 +31,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is Season; return item is Season;
} }

@ -33,8 +33,8 @@ namespace MediaBrowser.Providers.Savers
var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit; var wasMetadataEdited = (updateType & ItemUpdateType.MetadataEdit) == ItemUpdateType.MetadataEdit;
var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload; var wasMetadataDownloaded = (updateType & ItemUpdateType.MetadataDownload) == ItemUpdateType.MetadataDownload;
// If new metadata has been downloaded and save local is on, OR metadata was manually edited, proceed // If new metadata has been downloaded and save local is on
if ((_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded)) || wasMetadataEdited) if (_config.Configuration.SaveLocalMeta && (wasMetadataEdited || wasMetadataDownloaded))
{ {
return item is Series; return item is Series;
} }

Loading…
Cancel
Save