This commit is contained in:
LukePulverenti
2013-03-14 15:53:03 -04:00
5 changed files with 17 additions and 9 deletions

View File

@@ -699,9 +699,9 @@ namespace MediaBrowser.Controller.Entities
await Task.WhenAll(saveTasks).ConfigureAwait(false);
//and save children in repo...
//and save children in repo... but never save virtual plugin folders as they will always be re-created by the plugin
Logger.Info("*** Saving " + newChildren.Count + " children for " + Name);
await Kernel.Instance.ItemRepository.SaveChildren(Id, newChildren, CancellationToken.None).ConfigureAwait(false);
await Kernel.Instance.ItemRepository.SaveChildren(Id, newChildren.Where(c => !(c is BasePluginFolder)), CancellationToken.None).ConfigureAwait(false);
}
if (changedArgs.HasChange)

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Net;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Entities;
@@ -228,7 +229,8 @@ namespace MediaBrowser.Controller.Providers.Music
cancellationToken.ThrowIfCancellationRequested();
if (!ConfigurationManager.Configuration.SaveLocalMeta || !HasLocalMeta(item) || (force && !HasLocalMeta(item)) || (RefreshOnVersionChange && item.ProviderData[Id].ProviderVersion != ProviderVersion))
var providerData = item.ProviderData.GetValueOrDefault(Id, new BaseProviderInfo { ProviderId = Id });
if (!ConfigurationManager.Configuration.SaveLocalMeta || !HasLocalMeta(item) || (force && !HasLocalMeta(item)) || (RefreshOnVersionChange && providerData.ProviderVersion != ProviderVersion))
{
try
{