fix image refresh

This commit is contained in:
Luke Pulverenti 2016-04-15 22:18:40 -04:00
parent 7f2b2e1b9a
commit 81d9ea05f6
4 changed files with 39 additions and 15 deletions

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommonIO;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
using MediaBrowser.Providers.Manager;
namespace MediaBrowser.Providers.Folders
{
public class CollectionFolderMetadataService : MetadataService<CollectionFolder, ItemLookupInfo>
{
public CollectionFolderMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IProviderRepository providerRepo, IFileSystem fileSystem, IUserDataManager userDataManager, ILibraryManager libraryManager)
: base(serverConfigurationManager, logger, providerManager, providerRepo, fileSystem, userDataManager, libraryManager)
{
}
protected override void MergeData(MetadataResult<CollectionFolder> source, MetadataResult<CollectionFolder> target, List<MetadataFields> lockedFields, bool replaceData, bool mergeMetadataSettings)
{
ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings);
}
}
}

View File

@ -21,17 +21,4 @@ namespace MediaBrowser.Providers.Folders
ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings); ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings);
} }
} }
public class CollectionFolderMetadataService : MetadataService<CollectionFolder, ItemLookupInfo>
{
public CollectionFolderMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IProviderRepository providerRepo, IFileSystem fileSystem, IUserDataManager userDataManager, ILibraryManager libraryManager)
: base(serverConfigurationManager, logger, providerManager, providerRepo, fileSystem, userDataManager, libraryManager)
{
}
protected override void MergeData(MetadataResult<CollectionFolder> source, MetadataResult<CollectionFolder> target, List<MetadataFields> lockedFields, bool replaceData, bool mergeMetadataSettings)
{
ProviderUtils.MergeBaseItemData(source, target, lockedFields, replaceData, mergeMetadataSettings);
}
}
} }

View File

@ -143,8 +143,8 @@ namespace MediaBrowser.Providers.Manager
Item = itemOfType Item = itemOfType
}; };
bool hasRefreshedMetadata = false; bool hasRefreshedMetadata = true;
bool hasRefreshedImages = false; bool hasRefreshedImages = true;
// Next run metadata providers // Next run metadata providers
if (refreshOptions.MetadataRefreshMode != MetadataRefreshMode.None) if (refreshOptions.MetadataRefreshMode != MetadataRefreshMode.None)
@ -186,6 +186,7 @@ namespace MediaBrowser.Providers.Manager
} }
else else
{ {
hasRefreshedMetadata = false;
refreshResult.SetDateLastMetadataRefresh(null); refreshResult.SetDateLastMetadataRefresh(null);
} }
} }
@ -208,6 +209,7 @@ namespace MediaBrowser.Providers.Manager
} }
else else
{ {
hasRefreshedImages = false;
refreshResult.SetDateLastImagesRefresh(null); refreshResult.SetDateLastImagesRefresh(null);
} }
} }
@ -303,6 +305,11 @@ namespace MediaBrowser.Providers.Manager
return true; return true;
} }
if (item is ICollectionFolder)
{
return true;
}
return false; return false;
} }

View File

@ -88,6 +88,7 @@
<Compile Include="BoxSets\MovieDbBoxSetProvider.cs" /> <Compile Include="BoxSets\MovieDbBoxSetProvider.cs" />
<Compile Include="Channels\ChannelMetadataService.cs" /> <Compile Include="Channels\ChannelMetadataService.cs" />
<Compile Include="Chapters\ChapterManager.cs" /> <Compile Include="Chapters\ChapterManager.cs" />
<Compile Include="Folders\CollectionFolderMetadataService.cs" />
<Compile Include="Folders\DefaultImageProvider.cs" /> <Compile Include="Folders\DefaultImageProvider.cs" />
<Compile Include="Folders\FolderMetadataService.cs" /> <Compile Include="Folders\FolderMetadataService.cs" />
<Compile Include="Folders\UserViewMetadataService.cs" /> <Compile Include="Folders\UserViewMetadataService.cs" />