diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-22 12:36:34 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-22 12:36:34 -0400 |
| commit | d56fa09ccc5e1a5f9440645330ce337273fa3bd7 (patch) | |
| tree | cb50ab916944cb343870483f140435bccb0c7dc1 /MediaBrowser.Server.Implementations/Dto | |
| parent | 12a0a02515f3f133215d551dcc2492f4c69bb1d8 (diff) | |
stub out mock sync provider
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index f01d973d6..c4499fac0 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -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; |
