stub out mock sync provider

This commit is contained in:
Luke Pulverenti
2014-07-22 12:36:34 -04:00
parent 12a0a02515
commit d56fa09ccc
22 changed files with 194 additions and 102 deletions

View File

@@ -12,6 +12,7 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Sync;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
@@ -38,8 +39,9 @@ namespace MediaBrowser.Server.Implementations.Dto
private readonly IProviderManager _providerManager;
private readonly Func<IChannelManager> _channelManagerFactory;
private readonly ISyncManager _syncManager;
public DtoService(ILogger logger, ILibraryManager libraryManager, IUserDataManager userDataRepository, IItemRepository itemRepo, IImageProcessor imageProcessor, IServerConfigurationManager config, IFileSystem fileSystem, IProviderManager providerManager, Func<IChannelManager> channelManagerFactory)
public DtoService(ILogger logger, ILibraryManager libraryManager, IUserDataManager userDataRepository, IItemRepository itemRepo, IImageProcessor imageProcessor, IServerConfigurationManager config, IFileSystem fileSystem, IProviderManager providerManager, Func<IChannelManager> channelManagerFactory, ISyncManager syncManager)
{
_logger = logger;
_libraryManager = libraryManager;
@@ -50,6 +52,7 @@ namespace MediaBrowser.Server.Implementations.Dto
_fileSystem = fileSystem;
_providerManager = providerManager;
_channelManagerFactory = channelManagerFactory;
_syncManager = syncManager;
}
/// <summary>
@@ -146,6 +149,11 @@ namespace MediaBrowser.Server.Implementations.Dto
AttachBasicFields(dto, item, owner, fields);
if (fields.Contains(ItemFields.SyncInfo))
{
dto.SupportsSync = _syncManager.SupportsSync(item);
}
if (fields.Contains(ItemFields.SoundtrackIds))
{
var hasSoundtracks = item as IHasSoundtracks;