| | 1 | | #pragma warning disable CS1591 |
| | 2 | |
|
| | 3 | | using MediaBrowser.Controller.Configuration; |
| | 4 | | using MediaBrowser.Controller.Entities.Movies; |
| | 5 | | using MediaBrowser.Controller.Library; |
| | 6 | | using MediaBrowser.Controller.Providers; |
| | 7 | | using MediaBrowser.Model.Entities; |
| | 8 | | using MediaBrowser.Model.IO; |
| | 9 | | using MediaBrowser.Providers.Manager; |
| | 10 | | using Microsoft.Extensions.Logging; |
| | 11 | |
|
| | 12 | | namespace MediaBrowser.Providers.Movies |
| | 13 | | { |
| | 14 | | public class MovieMetadataService : MetadataService<Movie, MovieInfo> |
| | 15 | | { |
| | 16 | | public MovieMetadataService( |
| | 17 | | IServerConfigurationManager serverConfigurationManager, |
| | 18 | | ILogger<MovieMetadataService> logger, |
| | 19 | | IProviderManager providerManager, |
| | 20 | | IFileSystem fileSystem, |
| | 21 | | ILibraryManager libraryManager) |
| 21 | 22 | | : base(serverConfigurationManager, logger, providerManager, fileSystem, libraryManager) |
| | 23 | | { |
| 21 | 24 | | } |
| | 25 | |
|
| | 26 | | /// <inheritdoc /> |
| | 27 | | protected override void MergeData(MetadataResult<Movie> source, MetadataResult<Movie> target, MetadataField[] lo |
| | 28 | | { |
| 0 | 29 | | base.MergeData(source, target, lockedFields, replaceData, mergeMetadataSettings); |
| | 30 | |
|
| 0 | 31 | | var sourceItem = source.Item; |
| 0 | 32 | | var targetItem = target.Item; |
| | 33 | |
|
| 0 | 34 | | if (replaceData || string.IsNullOrEmpty(targetItem.CollectionName)) |
| | 35 | | { |
| 0 | 36 | | targetItem.CollectionName = sourceItem.CollectionName; |
| | 37 | | } |
| 0 | 38 | | } |
| | 39 | | } |
| | 40 | | } |