diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 4846a57682..dbde5a251d 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2593,7 +2593,7 @@ namespace Emby.Server.Implementations.Library { var namingOptions = GetNamingOptions(); - var files = owner.DetectIsInMixedFolder() ? new List() : fileSystemChildren.Where(i => i.IsDirectory) + var files = owner.IsInMixedFolder ? new List() : fileSystemChildren.Where(i => i.IsDirectory) .Where(i => string.Equals(i.Name, BaseItem.TrailerFolderName, StringComparison.OrdinalIgnoreCase)) .SelectMany(i => _fileSystem.GetFiles(i.FullName, _videoFileExtensions, false, false)) .ToList(); diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 6f8d62c0cc..14580a849d 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -128,12 +128,6 @@ namespace MediaBrowser.Controller.Entities [IgnoreDataMember] public bool IsInMixedFolder { get; set; } - [IgnoreDataMember] - protected virtual bool SupportsIsInMixedFolderDetection - { - get { return false; } - } - [IgnoreDataMember] public virtual bool SupportsPlayedStatus { @@ -152,16 +146,6 @@ namespace MediaBrowser.Controller.Entities } } - public bool DetectIsInMixedFolder() - { - if (SupportsIsInMixedFolderDetection) - { - - } - - return IsInMixedFolder; - } - [IgnoreDataMember] public virtual bool SupportsRemoteImageDownloading { @@ -1156,7 +1140,7 @@ namespace MediaBrowser.Controller.Entities { if (SupportsThemeMedia) { - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { themeSongsChanged = await RefreshThemeSongs(this, options, fileSystemChildren, cancellationToken).ConfigureAwait(false); @@ -1311,12 +1295,9 @@ namespace MediaBrowser.Controller.Entities { var current = this; - if (!SupportsIsInMixedFolderDetection) + if (current.IsInMixedFolder != newItem.IsInMixedFolder) { - if (current.IsInMixedFolder != newItem.IsInMixedFolder) - { - return false; - } + return false; } return true; diff --git a/MediaBrowser.Controller/Entities/Game.cs b/MediaBrowser.Controller/Entities/Game.cs index baefc9dfa8..deae692cc9 100644 --- a/MediaBrowser.Controller/Entities/Game.cs +++ b/MediaBrowser.Controller/Entities/Game.cs @@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Entities public override IEnumerable GetDeletePaths() { - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { return new[] { new FileSystemMetadata diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs index e2b3c07771..d793c82e2d 100644 --- a/MediaBrowser.Controller/Entities/IHasImages.cs +++ b/MediaBrowser.Controller/Entities/IHasImages.cs @@ -152,7 +152,7 @@ namespace MediaBrowser.Controller.Entities /// true if [supports local metadata]; otherwise, false. bool SupportsLocalMetadata { get; } - bool DetectIsInMixedFolder(); + bool IsInMixedFolder { get; } /// /// Gets a value indicating whether this instance is locked. diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index 8a5b726e28..632e3ba121 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -55,22 +55,13 @@ namespace MediaBrowser.Controller.Entities.Movies return value; } - [IgnoreDataMember] - protected override bool SupportsIsInMixedFolderDetection - { - get - { - return false; - } - } - protected override async Task RefreshedOwnedItems(MetadataRefreshOptions options, List fileSystemChildren, CancellationToken cancellationToken) { var hasChanges = await base.RefreshedOwnedItems(options, fileSystemChildren, cancellationToken).ConfigureAwait(false); // Must have a parent to have special features // In other words, it must be part of the Parent/Child tree - if (LocationType == LocationType.FileSystem && GetParent() != null && !DetectIsInMixedFolder()) + if (LocationType == LocationType.FileSystem && GetParent() != null && !IsInMixedFolder) { var specialFeaturesChanged = await RefreshSpecialFeatures(options, fileSystemChildren, cancellationToken).ConfigureAwait(false); @@ -108,7 +99,7 @@ namespace MediaBrowser.Controller.Entities.Movies { var info = GetItemLookupInfo(); - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { var name = System.IO.Path.GetFileName(ContainingFolderPath); @@ -145,7 +136,7 @@ namespace MediaBrowser.Controller.Entities.Movies else { // Try to get the year from the folder name - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { info = LibraryManager.ParseName(System.IO.Path.GetFileName(ContainingFolderPath)); diff --git a/MediaBrowser.Controller/Entities/MusicVideo.cs b/MediaBrowser.Controller/Entities/MusicVideo.cs index 7344cb8e47..4e2bda964a 100644 --- a/MediaBrowser.Controller/Entities/MusicVideo.cs +++ b/MediaBrowser.Controller/Entities/MusicVideo.cs @@ -24,15 +24,6 @@ namespace MediaBrowser.Controller.Entities } } - [IgnoreDataMember] - protected override bool SupportsIsInMixedFolderDetection - { - get - { - return false; - } - } - public override UnratedItem GetBlockUnratedType() { return UnratedItem.Music; @@ -61,7 +52,7 @@ namespace MediaBrowser.Controller.Entities else { // Try to get the year from the folder name - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { info = LibraryManager.ParseName(System.IO.Path.GetFileName(ContainingFolderPath)); diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs index 99acce164b..c5144aadf4 100644 --- a/MediaBrowser.Controller/Entities/Trailer.cs +++ b/MediaBrowser.Controller/Entities/Trailer.cs @@ -47,7 +47,7 @@ namespace MediaBrowser.Controller.Entities info.IsLocalTrailer = TrailerTypes.Contains(TrailerType.LocalTrailer); - if (!DetectIsInMixedFolder() && LocationType == LocationType.FileSystem) + if (!IsInMixedFolder && LocationType == LocationType.FileSystem) { info.Name = System.IO.Path.GetFileName(ContainingFolderPath); } @@ -73,7 +73,7 @@ namespace MediaBrowser.Controller.Entities else { // Try to get the year from the folder name - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { info = LibraryManager.ParseName(System.IO.Path.GetFileName(ContainingFolderPath)); diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index c5d9b92031..1e1d161c59 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -77,15 +77,6 @@ namespace MediaBrowser.Controller.Entities } } - [IgnoreDataMember] - protected override bool SupportsIsInMixedFolderDetection - { - get - { - return true; - } - } - public override string CreatePresentationUniqueKey() { if (!string.IsNullOrWhiteSpace(PrimaryVersionId)) @@ -500,7 +491,7 @@ namespace MediaBrowser.Controller.Entities public override IEnumerable GetDeletePaths() { - if (!DetectIsInMixedFolder()) + if (!IsInMixedFolder) { return new[] { new FileSystemMetadata diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs index c29d3dc478..35351ae227 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs @@ -53,15 +53,6 @@ namespace MediaBrowser.Controller.LiveTv } } - [IgnoreDataMember] - protected override bool SupportsIsInMixedFolderDetection - { - get - { - return false; - } - } - [IgnoreDataMember] public override bool SupportsPlayedStatus { diff --git a/MediaBrowser.Controller/Providers/ItemInfo.cs b/MediaBrowser.Controller/Providers/ItemInfo.cs index 8de11b7439..63cc48058f 100644 --- a/MediaBrowser.Controller/Providers/ItemInfo.cs +++ b/MediaBrowser.Controller/Providers/ItemInfo.cs @@ -10,7 +10,7 @@ namespace MediaBrowser.Controller.Providers { Path = item.Path; ContainingFolderPath = item.ContainingFolderPath; - IsInMixedFolder = item.DetectIsInMixedFolder(); + IsInMixedFolder = item.IsInMixedFolder; var video = item as Video; if (video != null) diff --git a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs index b449ad6e0a..51572d20cd 100644 --- a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs @@ -144,7 +144,7 @@ namespace MediaBrowser.LocalMetadata.Images } var imagePrefix = item.FileNameWithoutExtension + "-"; - var isInMixedFolder = item.DetectIsInMixedFolder(); + var isInMixedFolder = item.IsInMixedFolder; PopulatePrimaryImages(item, images, files, imagePrefix, isInMixedFolder); diff --git a/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs index 26c4b4a930..24c5a46796 100644 --- a/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs @@ -65,7 +65,7 @@ namespace MediaBrowser.LocalMetadata.Savers public static string GetGameSavePath(Game item) { - if (item.DetectIsInMixedFolder()) + if (item.IsInMixedFolder) { return Path.ChangeExtension(item.Path, ".xml"); } diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.cs index dc6c7e43fc..2bf2d0ac75 100644 --- a/MediaBrowser.Providers/Manager/ImageSaver.cs +++ b/MediaBrowser.Providers/Manager/ImageSaver.cs @@ -355,7 +355,7 @@ namespace MediaBrowser.Providers.Manager return Path.Combine(seriesFolder, imageFilename); } - if (item.DetectIsInMixedFolder()) + if (item.IsInMixedFolder) { return GetSavePathForItemInMixedFolder(item, type, "landscape", extension); } @@ -432,7 +432,7 @@ namespace MediaBrowser.Providers.Manager path = Path.Combine(_fileSystem.GetDirectoryName(item.Path), "metadata", filename + extension); } - else if (item.DetectIsInMixedFolder()) + else if (item.IsInMixedFolder) { path = GetSavePathForItemInMixedFolder(item, type, filename, extension); } @@ -499,7 +499,7 @@ namespace MediaBrowser.Providers.Manager if (imageIndex.Value == 0) { - if (item.DetectIsInMixedFolder()) + if (item.IsInMixedFolder) { return new[] { GetSavePathForItemInMixedFolder(item, type, "fanart", extension) }; } @@ -525,7 +525,7 @@ namespace MediaBrowser.Providers.Manager var outputIndex = imageIndex.Value; - if (item.DetectIsInMixedFolder()) + if (item.IsInMixedFolder) { return new[] { GetSavePathForItemInMixedFolder(item, type, "fanart" + outputIndex.ToString(UsCulture), extension) }; } @@ -568,7 +568,7 @@ namespace MediaBrowser.Providers.Manager return new[] { Path.Combine(seasonFolder, imageFilename) }; } - if (item.DetectIsInMixedFolder() || item is MusicVideo) + if (item.IsInMixedFolder || item is MusicVideo) { return new[] { GetSavePathForItemInMixedFolder(item, type, string.Empty, extension) }; } diff --git a/SharedVersion.cs b/SharedVersion.cs index 913d9d8fc0..47cf936255 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.26.8")] +[assembly: AssemblyVersion("3.2.26.9")]