From 6987f2794aa0bb547072924c0a44aba7baf95350 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 2 Mar 2014 13:01:46 -0500 Subject: search refinements --- .../Library/LibraryManager.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 66e9e4fa1..c5cddf40a 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -922,6 +922,9 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidatePeople(CancellationToken cancellationToken, IProgress progress) { + // Ensure the location is unavailable. + Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath); + return new PeopleValidator(this, _logger).ValidatePeople(cancellationToken, progress); } @@ -933,6 +936,9 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidateArtists(CancellationToken cancellationToken, IProgress progress) { + // Ensure the location is unavailable. + Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.ArtistsPath); + return new ArtistsValidator(this, _userManager, _logger).Run(progress, cancellationToken); } @@ -944,6 +950,9 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidateMusicGenres(CancellationToken cancellationToken, IProgress progress) { + // Ensure the location is unavailable. + Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.MusicGenrePath); + return new MusicGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken); } @@ -955,6 +964,9 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidateGameGenres(CancellationToken cancellationToken, IProgress progress) { + // Ensure the location is unavailable. + Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.GameGenrePath); + return new GameGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken); } @@ -966,6 +978,9 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidateStudios(CancellationToken cancellationToken, IProgress progress) { + // Ensure the location is unavailable. + Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.StudioPath); + return new StudiosValidator(this, _userManager, _logger).Run(progress, cancellationToken); } @@ -977,6 +992,9 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidateGenres(CancellationToken cancellationToken, IProgress progress) { + // Ensure the location is unavailable. + Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.GenrePath); + return new GenresValidator(this, _userManager, _logger).Run(progress, cancellationToken); } -- cgit v1.2.3 From 6efb78b8b2c023369d18097ba8d17c396faabce1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 3 Mar 2014 00:11:03 -0500 Subject: fixes #697 - Support xbmc offline discs --- MediaBrowser.Api/GamesService.cs | 4 ++-- MediaBrowser.Api/UserLibrary/ItemsService.cs | 18 ++++++++++++++++++ .../MediaBrowser.Common.Implementations.csproj | 8 ++++---- .../packages.config | 2 +- MediaBrowser.Controller/Entities/BaseItem.cs | 14 +------------- MediaBrowser.Controller/Entities/Folder.cs | 22 +++++++++++++++++++++- MediaBrowser.Controller/Entities/Game.cs | 8 ++++---- MediaBrowser.Controller/Entities/IHasMetadata.cs | 6 ++++++ .../Entities/ISupportsPlaceHolders.cs | 12 ++++++++++++ MediaBrowser.Controller/Entities/Video.cs | 4 +++- MediaBrowser.Controller/Library/TVUtils.cs | 7 +++++-- .../MediaBrowser.Controller.csproj | 1 + .../Resolvers/BaseVideoResolver.cs | 7 +++++-- .../Resolvers/EntityResolutionHelper.cs | 18 ++++++++++++++++++ MediaBrowser.Model/Dto/BaseItemDto.cs | 6 ++++++ MediaBrowser.Model/Providers/RemoteSearchResult.cs | 2 ++ .../Games/GameMetadataService.cs | 13 ++++++------- MediaBrowser.Providers/Manager/MetadataService.cs | 14 ++++++++++++++ .../MediaInfo/FFProbeProvider.cs | 7 ++++++- .../MediaInfo/VideoImageProvider.cs | 2 +- .../Dto/DtoService.cs | 6 ++++++ .../Library/LibraryManager.cs | 2 +- .../Library/Resolvers/Audio/MusicAlbumResolver.cs | 1 + .../MediaEncoder/EncodingManager.cs | 5 +++++ Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 27 files changed, 154 insertions(+), 45 deletions(-) create mode 100644 MediaBrowser.Controller/Entities/ISupportsPlaceHolders.cs (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Api/GamesService.cs b/MediaBrowser.Api/GamesService.cs index d3b7cbe41..eabda673a 100644 --- a/MediaBrowser.Api/GamesService.cs +++ b/MediaBrowser.Api/GamesService.cs @@ -155,11 +155,11 @@ namespace MediaBrowser.Api var games = items.OfType().ToList(); - summary.ClientInstalledGameCount = games.Count(i => !i.IsInstalledOnClient); + summary.ClientInstalledGameCount = games.Count(i => !i.IsPlaceHolder); summary.GameCount = games.Count; - summary.GameFileExtensions = games.Where(i => !i.IsInstalledOnClient).Select(i => Path.GetExtension(i.Path)) + summary.GameFileExtensions = games.Where(i => !i.IsPlaceHolder).Select(i => Path.GetExtension(i.Path)) .Distinct(StringComparer.OrdinalIgnoreCase) .ToList(); diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 9075bdfc6..4a5b69704 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -220,6 +220,12 @@ namespace MediaBrowser.Api.UserLibrary [ApiMember(Name = "IsInBoxSet", Description = "Optional filter by items that are in boxsets, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")] public bool? IsInBoxSet { get; set; } + + [ApiMember(Name = "IsLocked", Description = "Optional filter by items that are locked.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] + public bool? IsLocked { get; set; } + + [ApiMember(Name = "HasSubtitles", Description = "Optional filter by items that are unidentified by internet metadata providers.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] + public bool? IsUnidentified { get; set; } } /// @@ -1019,6 +1025,18 @@ namespace MediaBrowser.Api.UserLibrary items = items.Where(i => i.IsPlayed(user) == val); } + if (request.IsUnidentified.HasValue) + { + var val = request.IsUnidentified.Value; + items = items.Where(i => i.IsUnidentified == val); + } + + if (request.IsLocked.HasValue) + { + var val = request.IsLocked.Value; + items = items.Where(i => i.IsLocked == val); + } + if (request.ParentIndexNumber.HasValue) { var filterValue = request.ParentIndexNumber.Value; diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj index 1688fac8b..04b8865c1 100644 --- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj +++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj @@ -48,13 +48,13 @@ Always - + False - ..\packages\SimpleInjector.2.4.1\lib\net45\SimpleInjector.dll + ..\packages\SimpleInjector.2.5.0\lib\net45\SimpleInjector.dll - + False - ..\packages\SimpleInjector.2.4.1\lib\net45\SimpleInjector.Diagnostics.dll + ..\packages\SimpleInjector.2.5.0\lib\net45\SimpleInjector.Diagnostics.dll diff --git a/MediaBrowser.Common.Implementations/packages.config b/MediaBrowser.Common.Implementations/packages.config index e04fecc1d..38d6be2ef 100644 --- a/MediaBrowser.Common.Implementations/packages.config +++ b/MediaBrowser.Common.Implementations/packages.config @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index f7f2346a8..923673bd8 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -229,19 +229,7 @@ namespace MediaBrowser.Controller.Entities } } - [IgnoreDataMember] - public bool IsUnidentified - { - get - { - if (ProviderIds.Any()) - { - return false; - } - - return false; - } - } + public bool IsUnidentified { get; set; } /// /// Gets or sets the locked fields. diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 522bc3a2d..627f657ab 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -352,6 +352,26 @@ namespace MediaBrowser.Controller.Entities return dictionary; } + private bool IsValidFromResolver(BaseItem current, BaseItem newItem) + { + var currentAsPlaceHolder = current as ISupportsPlaceHolders; + + if (currentAsPlaceHolder != null) + { + var newHasPlaceHolder = newItem as ISupportsPlaceHolders; + + if (newHasPlaceHolder != null) + { + if (currentAsPlaceHolder.IsPlaceHolder != newHasPlaceHolder.IsPlaceHolder) + { + return false; + } + } + } + + return current.IsInMixedFolder == newItem.IsInMixedFolder; + } + /// /// Validates the children internal. /// @@ -401,7 +421,7 @@ namespace MediaBrowser.Controller.Entities { BaseItem currentChild; - if (currentChildren.TryGetValue(child.Id, out currentChild) && child.IsInMixedFolder == currentChild.IsInMixedFolder) + if (currentChildren.TryGetValue(child.Id, out currentChild) && IsValidFromResolver(currentChild, child)) { var currentChildLocationType = currentChild.LocationType; if (currentChildLocationType != LocationType.Remote && diff --git a/MediaBrowser.Controller/Entities/Game.cs b/MediaBrowser.Controller/Entities/Game.cs index e490a59cd..062bdfa88 100644 --- a/MediaBrowser.Controller/Entities/Game.cs +++ b/MediaBrowser.Controller/Entities/Game.cs @@ -7,7 +7,7 @@ using System.Linq; namespace MediaBrowser.Controller.Entities { - public class Game : BaseItem, IHasSoundtracks, IHasTrailers, IHasThemeMedia, IHasTags, IHasScreenshots, IHasPreferredMetadataLanguage, IHasLookupInfo + public class Game : BaseItem, IHasSoundtracks, IHasTrailers, IHasThemeMedia, IHasTags, IHasScreenshots, ISupportsPlaceHolders, IHasPreferredMetadataLanguage, IHasLookupInfo { public List SoundtrackIds { get; set; } @@ -63,10 +63,10 @@ namespace MediaBrowser.Controller.Entities public int? PlayersSupported { get; set; } /// - /// Gets or sets a value indicating whether this instance is installed on client. + /// Gets a value indicating whether this instance is place holder. /// - /// true if this instance is installed on client; otherwise, false. - public bool IsInstalledOnClient { get; set; } + /// true if this instance is place holder; otherwise, false. + public bool IsPlaceHolder { get; set; } /// /// Gets or sets the game system. diff --git a/MediaBrowser.Controller/Entities/IHasMetadata.cs b/MediaBrowser.Controller/Entities/IHasMetadata.cs index 095db0815..91f37135f 100644 --- a/MediaBrowser.Controller/Entities/IHasMetadata.cs +++ b/MediaBrowser.Controller/Entities/IHasMetadata.cs @@ -49,5 +49,11 @@ namespace MediaBrowser.Controller.Entities /// /// true if XXXX, false otherwise. bool BeforeMetadataRefresh(); + + /// + /// Gets or sets a value indicating whether this instance is unidentified. + /// + /// true if this instance is unidentified; otherwise, false. + bool IsUnidentified { get; set; } } } diff --git a/MediaBrowser.Controller/Entities/ISupportsPlaceHolders.cs b/MediaBrowser.Controller/Entities/ISupportsPlaceHolders.cs new file mode 100644 index 000000000..2507c8ee6 --- /dev/null +++ b/MediaBrowser.Controller/Entities/ISupportsPlaceHolders.cs @@ -0,0 +1,12 @@ + +namespace MediaBrowser.Controller.Entities +{ + public interface ISupportsPlaceHolders + { + /// + /// Gets a value indicating whether this instance is place holder. + /// + /// true if this instance is place holder; otherwise, false. + bool IsPlaceHolder { get; } + } +} diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index fa85f0edc..e61e958f5 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.Controller.Entities /// /// Class Video /// - public class Video : BaseItem, IHasMediaStreams, IHasAspectRatio, IHasTags + public class Video : BaseItem, IHasMediaStreams, IHasAspectRatio, IHasTags, ISupportsPlaceHolders { public bool IsMultiPart { get; set; } @@ -42,6 +42,8 @@ namespace MediaBrowser.Controller.Entities /// true if this instance has subtitles; otherwise, false. public bool HasSubtitles { get; set; } + public bool IsPlaceHolder { get; set; } + /// /// Gets or sets the tags. /// diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index 82911117f..c64e4fa0c 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -234,9 +234,12 @@ namespace MediaBrowser.Controller.Library { var fullName = child.FullName; - if (EntityResolutionHelper.IsVideoFile(fullName) && GetEpisodeNumberFromFile(fullName, false).HasValue) + if (EntityResolutionHelper.IsVideoFile(fullName) || EntityResolutionHelper.IsVideoPlaceHolder(fullName)) { - return true; + if (GetEpisodeNumberFromFile(fullName, false).HasValue) + { + return true; + } } } } diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index c07693b36..ff446f2ef 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -105,6 +105,7 @@ + diff --git a/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs b/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs index aadaf5423..9e5d68c48 100644 --- a/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs +++ b/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs @@ -35,7 +35,9 @@ namespace MediaBrowser.Controller.Resolvers // If the path is a file check for a matching extensions if (!args.IsDirectory) { - if (EntityResolutionHelper.IsVideoFile(args.Path)) + var isPlaceHolder = EntityResolutionHelper.IsVideoPlaceHolder(args.Path); + + if (EntityResolutionHelper.IsVideoFile(args.Path) || isPlaceHolder) { var extension = Path.GetExtension(args.Path); @@ -46,7 +48,8 @@ namespace MediaBrowser.Controller.Resolvers { VideoType = type, Path = args.Path, - IsInMixedFolder = true + IsInMixedFolder = true, + IsPlaceHolder = isPlaceHolder }; } } diff --git a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs index 42b637140..0f93e8e8a 100644 --- a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs +++ b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs @@ -139,6 +139,24 @@ namespace MediaBrowser.Controller.Resolvers return VideoFileExtensionsDictionary.ContainsKey(extension); } + /// + /// Determines whether [is place holder] [the specified path]. + /// + /// The path. + /// true if [is place holder] [the specified path]; otherwise, false. + /// path + public static bool IsVideoPlaceHolder(string path) + { + if (string.IsNullOrEmpty(path)) + { + throw new ArgumentNullException("path"); + } + + var extension = Path.GetExtension(path); + + return string.Equals(extension, ".disc", StringComparison.OrdinalIgnoreCase); + } + /// /// Ensures DateCreated and DateModified have values /// diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 661dc62bb..9e57f045a 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -208,6 +208,12 @@ namespace MediaBrowser.Model.Dto /// The players. public int? Players { get; set; } + /// + /// Gets or sets a value indicating whether this instance is place holder. + /// + /// null if [is place holder] contains no value, true if [is place holder]; otherwise, false. + public bool? IsPlaceHolder { get; set; } + /// /// Gets or sets the index number. /// diff --git a/MediaBrowser.Model/Providers/RemoteSearchResult.cs b/MediaBrowser.Model/Providers/RemoteSearchResult.cs index 122266614..8c9e116d6 100644 --- a/MediaBrowser.Model/Providers/RemoteSearchResult.cs +++ b/MediaBrowser.Model/Providers/RemoteSearchResult.cs @@ -31,6 +31,8 @@ namespace MediaBrowser.Model.Providers public string SearchProviderName { get; set; } + public string GameSystem { get; set; } + public RemoteSearchResult() { ProviderIds = new Dictionary(StringComparer.OrdinalIgnoreCase); diff --git a/MediaBrowser.Providers/Games/GameMetadataService.cs b/MediaBrowser.Providers/Games/GameMetadataService.cs index 1586414ea..1e184bb06 100644 --- a/MediaBrowser.Providers/Games/GameMetadataService.cs +++ b/MediaBrowser.Providers/Games/GameMetadataService.cs @@ -1,25 +1,19 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; using MediaBrowser.Providers.Manager; using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; namespace MediaBrowser.Providers.Games { public class GameMetadataService : MetadataService { - private readonly ILibraryManager _libraryManager; - - public GameMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IProviderRepository providerRepo, IFileSystem fileSystem, ILibraryManager libraryManager) + public GameMetadataService(IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IProviderRepository providerRepo, IFileSystem fileSystem) : base(serverConfigurationManager, logger, providerManager, providerRepo, fileSystem) { - _libraryManager = libraryManager; } /// @@ -38,6 +32,11 @@ namespace MediaBrowser.Providers.Games { target.GameSystem = source.GameSystem; } + + if (replaceData || !target.PlayersSupported.HasValue) + { + target.PlayersSupported = source.PlayersSupported; + } } } } diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 24f4b3b2f..2ecc6c9dd 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -386,6 +386,9 @@ namespace MediaBrowser.Providers.Manager { TIdType id = null; + var unidentifiedCount = 0; + var identifiedCount = 0; + foreach (var provider in providers) { var providerName = provider.GetType().Name; @@ -410,9 +413,11 @@ namespace MediaBrowser.Providers.Manager refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload; + identifiedCount++; } else { + unidentifiedCount++; Logger.Debug("{0} returned no metadata for {1}", providerName, item.Path ?? item.Name); } } @@ -422,11 +427,20 @@ namespace MediaBrowser.Providers.Manager } catch (Exception ex) { + unidentifiedCount++; refreshResult.Status = ProviderRefreshStatus.CompletedWithErrors; refreshResult.ErrorMessage = ex.Message; Logger.ErrorException("Error in {0}", ex, provider.Name); } } + + var isUnidentified = unidentifiedCount > 0 && identifiedCount == 0; + + if (item.IsUnidentified != isUnidentified) + { + item.IsUnidentified = isUnidentified; + refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport; + } } private void MergeNewData(TItemType source, TIdType lookupInfo) diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs index bb417536a..55d09b68b 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs @@ -126,6 +126,11 @@ namespace MediaBrowser.Providers.MediaInfo return _cachedTask; } + if (item.IsPlaceHolder) + { + return _cachedTask; + } + var prober = new FFProbeVideoInfo(_logger, _isoManager, _mediaEncoder, _itemRepo, _blurayExaminer, _localization, _appPaths, _json, _encodingManager); return prober.ProbeVideo(item, directoryService, cancellationToken); @@ -155,7 +160,7 @@ namespace MediaBrowser.Providers.MediaInfo { var video = item as Video; - if (video != null) + if (video != null && !video.IsPlaceHolder) { var prober = new FFProbeVideoInfo(_logger, _isoManager, _mediaEncoder, _itemRepo, _blurayExaminer, _localization, _appPaths, _json, _encodingManager); diff --git a/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs b/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs index 68216c6e1..354758497 100644 --- a/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs +++ b/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs @@ -56,7 +56,7 @@ namespace MediaBrowser.Providers.MediaInfo var video = (Video)item; // No support for this - if (video.VideoType == VideoType.HdDvd) + if (video.VideoType == VideoType.HdDvd || video.IsPlaceHolder) { return Task.FromResult(new DynamicImageResponse { HasImage = false }); } diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 1174f16ae..7bf87875e 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -970,6 +970,12 @@ namespace MediaBrowser.Server.Implementations.Dto } } + var supportsPlaceHolders = item as ISupportsPlaceHolders; + if (supportsPlaceHolders != null) + { + dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder; + } + // Add audio info var audio = item as Audio; if (audio != null) diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index c5cddf40a..6e9d803bf 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -451,7 +451,7 @@ namespace MediaBrowser.Server.Implementations.Library } } - if (options.DeleteFileLocation && (locationType == LocationType.FileSystem || locationType == LocationType.Offline)) + if (options.DeleteFileLocation && locationType != LocationType.Remote && locationType != LocationType.Virtual) { foreach (var path in item.GetDeletePaths().ToList()) { diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs index 7e643cd99..871171541 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs @@ -132,6 +132,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio return true; } if (EntityResolutionHelper.IsVideoFile(fullName)) return false; + if (EntityResolutionHelper.IsVideoPlaceHolder(fullName)) return false; } // or a single audio file and no video files diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs index 6f4b7a8a7..f74865d2c 100644 --- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -84,6 +84,11 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder /// true if [is eligible for chapter image extraction] [the specified video]; otherwise, false. private bool IsEligibleForChapterImageExtraction(Video video) { + if (video.IsPlaceHolder) + { + return false; + } + if (video is Movie) { if (!_config.Configuration.EnableMovieChapterImageExtraction) diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index b9e4fc39c..e570f18d8 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.334 + 3.0.335 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 0db7f2139..75b695584 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.334 + 3.0.335 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 7bcee1e78..581a82106 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.334 + 3.0.335 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - + -- cgit v1.2.3