diff options
Diffstat (limited to 'MediaBrowser.Controller/Entities')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 20 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/CollectionFolder.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Folder.cs | 4 |
3 files changed, 27 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 1547653256..c89a7f0b2a 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -336,7 +336,7 @@ namespace MediaBrowser.Controller.Entities // When resolving the root, we need it's grandchildren (children of user views) var flattenFolderDepth = isPhysicalRoot ? 2 : 0; - args.FileSystemDictionary = FileData.GetFilteredFileSystemEntries(args.Path, Logger, flattenFolderDepth: flattenFolderDepth, args: args, resolveShortcuts: isPhysicalRoot || args.IsVf); + args.FileSystemDictionary = FileData.GetFilteredFileSystemEntries(args.Path, Logger, args, flattenFolderDepth: flattenFolderDepth, resolveShortcuts: isPhysicalRoot || args.IsVf); // Need to remove subpaths that may have been resolved from shortcuts // Example: if \\server\movies exists, then strip out \\server\movies\action @@ -1111,6 +1111,24 @@ namespace MediaBrowser.Controller.Entities throw new ArgumentNullException(); } + // Normalize + if (string.Equals(person.Role, PersonType.GuestStar, StringComparison.OrdinalIgnoreCase)) + { + person.Type = PersonType.GuestStar; + } + else if (string.Equals(person.Role, PersonType.Director, StringComparison.OrdinalIgnoreCase)) + { + person.Type = PersonType.Director; + } + else if (string.Equals(person.Role, PersonType.Producer, StringComparison.OrdinalIgnoreCase)) + { + person.Type = PersonType.Producer; + } + else if (string.Equals(person.Role, PersonType.Writer, StringComparison.OrdinalIgnoreCase)) + { + person.Type = PersonType.Writer; + } + // If the type is GuestStar and there's already an Actor entry, then update it to avoid dupes if (string.Equals(person.Type, PersonType.GuestStar, StringComparison.OrdinalIgnoreCase)) { diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index fa285a85f7..507b6df8a8 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -1,4 +1,5 @@ -using System; +using MediaBrowser.Controller.Library; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; @@ -6,7 +7,6 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Controller.Library; namespace MediaBrowser.Controller.Entities { @@ -29,6 +29,8 @@ namespace MediaBrowser.Controller.Entities } } + public string CollectionType { get; set; } + /// <summary> /// Allow different display preferences for each collection folder /// </summary> @@ -69,7 +71,7 @@ namespace MediaBrowser.Controller.Entities /// Our children are actually just references to the ones in the physical root... /// </summary> /// <value>The actual children.</value> - protected override ConcurrentDictionary<Guid,BaseItem> ActualChildren + protected override ConcurrentDictionary<Guid, BaseItem> ActualChildren { get { @@ -91,7 +93,7 @@ namespace MediaBrowser.Controller.Entities .Where(i => i.Path != null && resolveArgs.PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase)) .SelectMany(c => c.Children); - return new ConcurrentDictionary<Guid,BaseItem>(ourChildren.ToDictionary(i => i.Id)); + return new ConcurrentDictionary<Guid, BaseItem>(ourChildren.ToDictionary(i => i.Id)); } } } diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 77500808cd..e46ec8d3b4 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1,5 +1,4 @@ -using System.Collections; -using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Progress; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; @@ -8,6 +7,7 @@ using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; using System; +using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; |
