diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 4cc3f1892..038aa98aa 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -20,6 +20,7 @@ namespace MediaBrowser.Controller.Entities.Audio public bool IsAccessedByName { get; set; } public List ProductionLocations { get; set; } + [IgnoreDataMember] public override bool IsFolder { get @@ -78,6 +79,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -90,6 +92,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -177,19 +180,16 @@ namespace MediaBrowser.Controller.Entities.Audio public IEnumerable GetTaggedItems(IEnumerable inputItems) { - return inputItems.Where(ItemFilter); + return inputItems.Where(GetItemFilter()); } - public Func ItemFilter + public Func GetItemFilter() { - get + return i => { - return i => - { - var hasArtist = i as IHasArtist; - return hasArtist != null && hasArtist.HasArtist(Name); - }; - } + var hasArtist = i as IHasArtist; + return hasArtist != null && hasArtist.HasArtist(Name); + }; } } } diff --git a/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs b/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs index b2c2a1b48..9689d7cce 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs @@ -30,6 +30,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -42,6 +43,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -52,13 +54,12 @@ namespace MediaBrowser.Controller.Entities.Audio public IEnumerable GetTaggedItems(IEnumerable inputItems) { - return inputItems.Where(ItemFilter); + return inputItems.Where(GetItemFilter()); } - - public Func ItemFilter + public Func GetItemFilter() { - get { return i => (i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); } + return i => (i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); } } } diff --git a/MediaBrowser.Controller/Entities/GameGenre.cs b/MediaBrowser.Controller/Entities/GameGenre.cs index d69a6ca46..41ce0c12a 100644 --- a/MediaBrowser.Controller/Entities/GameGenre.cs +++ b/MediaBrowser.Controller/Entities/GameGenre.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities { @@ -20,6 +21,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -32,6 +34,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -42,13 +45,12 @@ namespace MediaBrowser.Controller.Entities public IEnumerable GetTaggedItems(IEnumerable inputItems) { - return inputItems.Where(ItemFilter); + return inputItems.Where(GetItemFilter()); } - - public Func ItemFilter + public Func GetItemFilter() { - get { return i => (i is Game) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); } + return i => (i is Game) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); } } } diff --git a/MediaBrowser.Controller/Entities/Genre.cs b/MediaBrowser.Controller/Entities/Genre.cs index a33e6131f..f581c55e8 100644 --- a/MediaBrowser.Controller/Entities/Genre.cs +++ b/MediaBrowser.Controller/Entities/Genre.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Entities.Audio; +using System.Runtime.Serialization; +using MediaBrowser.Controller.Entities.Audio; using System; using System.Collections.Generic; using System.Linq; @@ -24,6 +25,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -46,12 +49,12 @@ namespace MediaBrowser.Controller.Entities public IEnumerable GetTaggedItems(IEnumerable inputItems) { - return inputItems.Where(ItemFilter); + return inputItems.Where(GetItemFilter()); } - public Func ItemFilter + public Func GetItemFilter() { - get { return i => !(i is Game) && !(i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); } + return i => !(i is Game) && !(i is IHasMusicGenres) && i.Genres.Contains(Name, StringComparer.OrdinalIgnoreCase); } } } diff --git a/MediaBrowser.Controller/Entities/IItemByName.cs b/MediaBrowser.Controller/Entities/IItemByName.cs index e303e9453..b48ad788f 100644 --- a/MediaBrowser.Controller/Entities/IItemByName.cs +++ b/MediaBrowser.Controller/Entities/IItemByName.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Entities /// IEnumerable{BaseItem}. IEnumerable GetTaggedItems(IEnumerable inputItems); - Func ItemFilter { get; } + Func GetItemFilter(); } public interface IHasDualAccess : IItemByName diff --git a/MediaBrowser.Controller/Entities/Person.cs b/MediaBrowser.Controller/Entities/Person.cs index 19af6e6f0..25509b153 100644 --- a/MediaBrowser.Controller/Entities/Person.cs +++ b/MediaBrowser.Controller/Entities/Person.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Providers; +using System.Runtime.Serialization; +using MediaBrowser.Controller.Providers; using System; using System.Collections.Generic; using System.Linq; @@ -15,7 +16,7 @@ namespace MediaBrowser.Controller.Entities /// /// The place of birth. public string PlaceOfBirth { get; set; } - + /// /// Gets the user data key. /// @@ -35,6 +36,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -47,6 +49,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -57,13 +60,13 @@ namespace MediaBrowser.Controller.Entities public IEnumerable GetTaggedItems(IEnumerable inputItems) { - return inputItems.Where(ItemFilter); + return inputItems.Where(GetItemFilter()); } - public Func ItemFilter + public Func GetItemFilter() { - get { return i => i.People.Any(p => string.Equals(p.Name, Name, StringComparison.OrdinalIgnoreCase)); } + return i => i.People.Any(p => string.Equals(p.Name, Name, StringComparison.OrdinalIgnoreCase)); } } diff --git a/MediaBrowser.Controller/Entities/Studio.cs b/MediaBrowser.Controller/Entities/Studio.cs index 53c635eba..76193d6c4 100644 --- a/MediaBrowser.Controller/Entities/Studio.cs +++ b/MediaBrowser.Controller/Entities/Studio.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities { @@ -15,7 +16,7 @@ namespace MediaBrowser.Controller.Entities { Tags = new List(); } - + /// /// Gets the user data key. /// @@ -30,6 +31,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -42,6 +44,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -52,13 +55,13 @@ namespace MediaBrowser.Controller.Entities public IEnumerable GetTaggedItems(IEnumerable inputItems) { - return inputItems.Where(ItemFilter); + return inputItems.Where(GetItemFilter()); } - public Func ItemFilter + public Func GetItemFilter() { - get { return i => i.Studios.Contains(Name, StringComparer.OrdinalIgnoreCase); } + return i => i.Studios.Contains(Name, StringComparer.OrdinalIgnoreCase); } } } diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index 869c30ba8..ac1ab14de 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -62,6 +62,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -74,6 +75,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get diff --git a/MediaBrowser.Controller/Entities/Year.cs b/MediaBrowser.Controller/Entities/Year.cs index bbf473a9a..59a4bf16d 100644 --- a/MediaBrowser.Controller/Entities/Year.cs +++ b/MediaBrowser.Controller/Entities/Year.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities { @@ -24,6 +25,7 @@ namespace MediaBrowser.Controller.Entities /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.Entities /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -48,8 +51,8 @@ namespace MediaBrowser.Controller.Entities { int year; - var usCulture = new CultureInfo("en-US"); - + var usCulture = new CultureInfo("en-US"); + if (!int.TryParse(Name, NumberStyles.Integer, usCulture, out year)) { return inputItems; @@ -58,10 +61,22 @@ namespace MediaBrowser.Controller.Entities return inputItems.Where(i => i.ProductionYear.HasValue && i.ProductionYear.Value == year); } - - public Func ItemFilter + public int? GetYearValue() { - get { throw new System.NotImplementedException(); } + int i; + + if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out i)) + { + return i; + } + + return null; + } + + public Func GetItemFilter() + { + var val = GetYearValue(); + return i => i.ProductionYear.HasValue && val.HasValue && i.ProductionYear.Value == val.Value; } } } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs index 5cfdb5dbf..8faaa895c 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Entities.Audio; +using System.Runtime.Serialization; +using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Users; @@ -32,6 +33,7 @@ namespace MediaBrowser.Controller.LiveTv /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -40,6 +42,7 @@ namespace MediaBrowser.Controller.LiveTv } } + [IgnoreDataMember] public override string MediaType { get @@ -48,6 +51,7 @@ namespace MediaBrowser.Controller.LiveTv } } + [IgnoreDataMember] public override LocationType LocationType { get @@ -71,6 +75,7 @@ namespace MediaBrowser.Controller.LiveTv return false; } + [IgnoreDataMember] public override bool SupportsLocalMetadata { get diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs index 72b497026..1948ce0d5 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Entities; +using System.Runtime.Serialization; +using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; @@ -30,6 +31,7 @@ namespace MediaBrowser.Controller.LiveTv /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -88,6 +90,7 @@ namespace MediaBrowser.Controller.LiveTv return number.ToString("000-") + (Name ?? string.Empty); } + [IgnoreDataMember] public override string MediaType { get diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index 6308a71dc..a66aaad6f 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Entities; +using System.Runtime.Serialization; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.LiveTv; @@ -138,6 +139,7 @@ namespace MediaBrowser.Controller.LiveTv /// If the item is a folder, it returns the folder itself /// /// The containing folder path. + [IgnoreDataMember] public override string ContainingFolderPath { get @@ -150,6 +152,7 @@ namespace MediaBrowser.Controller.LiveTv /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get @@ -158,6 +161,7 @@ namespace MediaBrowser.Controller.LiveTv } } + [IgnoreDataMember] public override string MediaType { get @@ -166,6 +170,7 @@ namespace MediaBrowser.Controller.LiveTv } } + [IgnoreDataMember] public bool IsAiring { get @@ -176,6 +181,7 @@ namespace MediaBrowser.Controller.LiveTv } } + [IgnoreDataMember] public bool HasAired { get diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs index 098400b50..34fe757a7 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Entities; +using System.Runtime.Serialization; +using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using System.Linq; @@ -28,6 +29,7 @@ namespace MediaBrowser.Controller.LiveTv public string ServiceName { get; set; } + [IgnoreDataMember] public override string MediaType { get @@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.LiveTv } } + [IgnoreDataMember] public override LocationType LocationType { get @@ -53,6 +56,7 @@ namespace MediaBrowser.Controller.LiveTv /// Gets a value indicating whether this instance is owned item. /// /// true if this instance is owned item; otherwise, false. + [IgnoreDataMember] public override bool IsOwnedItem { get diff --git a/MediaBrowser.Dlna/PlayTo/Device.cs b/MediaBrowser.Dlna/PlayTo/Device.cs index c43efcd1d..00cb34be3 100644 --- a/MediaBrowser.Dlna/PlayTo/Device.cs +++ b/MediaBrowser.Dlna/PlayTo/Device.cs @@ -712,14 +712,10 @@ namespace MediaBrowser.Dlna.PlayTo if (avService == null) return; - var url = avService.ScpdUrl; - if (!url.Contains("/")) - url = "/dmr/" + url; - if (!url.StartsWith("/")) - url = "/" + url; + string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl); var httpClient = new SsdpHttpClient(_httpClient, _config); - var document = await httpClient.GetDataAsync(Properties.BaseUrl + url); + var document = await httpClient.GetDataAsync(url); AvCommands = TransportCommands.Create(document); } @@ -730,16 +726,28 @@ namespace MediaBrowser.Dlna.PlayTo if (avService == null) return; - string url = avService.ScpdUrl; + string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl); + + var httpClient = new SsdpHttpClient(_httpClient, _config); + var document = await httpClient.GetDataAsync(url); + + RendererCommands = TransportCommands.Create(document); + } + + private string NormalizeUrl(string baseUrl, string url) + { + // If it's already a complete url, don't stick anything onto the front of it + if (url.StartsWith("http", StringComparison.OrdinalIgnoreCase)) + { + return url; + } + if (!url.Contains("/")) url = "/dmr/" + url; if (!url.StartsWith("/")) url = "/" + url; - var httpClient = new SsdpHttpClient(_httpClient, _config); - var document = await httpClient.GetDataAsync(Properties.BaseUrl + url); - - RendererCommands = TransportCommands.Create(document); + return baseUrl + url; } private TransportCommands AvCommands diff --git a/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs b/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs index ccc7d46e6..f0689751c 100644 --- a/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs +++ b/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Common.Net; +using System; +using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; using MediaBrowser.Dlna.Common; using System.Globalization; @@ -29,11 +30,7 @@ namespace MediaBrowser.Dlna.PlayTo string postData, string header = null) { - var serviceUrl = service.ControlUrl; - if (!serviceUrl.StartsWith("/")) - serviceUrl = "/" + serviceUrl; - - var response = await PostSoapDataAsync(baseUrl + serviceUrl, "\"" + service.ServiceType + "#" + command + "\"", postData, header) + var response = await PostSoapDataAsync(NormalizeServiceUrl(baseUrl, service.ControlUrl), "\"" + service.ServiceType + "#" + command + "\"", postData, header) .ConfigureAwait(false); using (var stream = response.Content) @@ -45,6 +42,20 @@ namespace MediaBrowser.Dlna.PlayTo } } + private string NormalizeServiceUrl(string baseUrl, string serviceUrl) + { + // If it's already a complete url, don't stick anything onto the front of it + if (serviceUrl.StartsWith("http", StringComparison.OrdinalIgnoreCase)) + { + return serviceUrl; + } + + if (!serviceUrl.StartsWith("/")) + serviceUrl = "/" + serviceUrl; + + return baseUrl + serviceUrl; + } + private readonly CultureInfo _usCulture = new CultureInfo("en-US"); public async Task SubscribeAsync(string url, diff --git a/MediaBrowser.Providers/Music/ArtistMetadataService.cs b/MediaBrowser.Providers/Music/ArtistMetadataService.cs index 51c4d18a9..2497cc1ec 100644 --- a/MediaBrowser.Providers/Music/ArtistMetadataService.cs +++ b/MediaBrowser.Providers/Music/ArtistMetadataService.cs @@ -43,8 +43,10 @@ namespace MediaBrowser.Providers.Music { if (!item.IsLocked) { + var itemFilter = item.GetItemFilter(); + var taggedItems = item.IsAccessedByName ? - _libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && item.ItemFilter(i)).ToList() : + _libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && itemFilter(i)).ToList() : item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder).ToList(); if (!item.LockedFields.Contains(MetadataFields.Genres)) diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 5640f2745..06b5138f1 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -95,9 +95,11 @@ namespace MediaBrowser.Server.Implementations.Dto if (byName != null && !(item is LiveTvChannel)) { + var itemFilter = byName.GetItemFilter(); + var libraryItems = user != null ? - user.RootFolder.GetRecursiveChildren(user, byName.ItemFilter) : - _libraryManager.RootFolder.GetRecursiveChildren(byName.ItemFilter); + user.RootFolder.GetRecursiveChildren(user, itemFilter) : + _libraryManager.RootFolder.GetRecursiveChildren(itemFilter); SetItemByNameInfo(item, dto, libraryItems.ToList(), user); } @@ -118,9 +120,11 @@ namespace MediaBrowser.Server.Implementations.Dto if (byName != null && !(item is LiveTvChannel)) { + var itemFilter = byName.GetItemFilter(); + var libraryItems = user != null ? - user.RootFolder.GetRecursiveChildren(user, byName.ItemFilter) : - _libraryManager.RootFolder.GetRecursiveChildren(byName.ItemFilter); + user.RootFolder.GetRecursiveChildren(user, itemFilter) : + _libraryManager.RootFolder.GetRecursiveChildren(itemFilter); SetItemByNameInfo(item, dto, libraryItems.ToList(), user); diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 0613cda30..f1616b85e 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -899,9 +899,11 @@ namespace MediaBrowser.Server.Implementations.Session if (byName != null) { + var itemFilter = byName.GetItemFilter(); + var items = user == null ? - _libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && byName.ItemFilter(i)) : - user.RootFolder.GetRecursiveChildren(user, i => !i.IsFolder && byName.ItemFilter(i)); + _libraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && itemFilter(i)) : + user.RootFolder.GetRecursiveChildren(user, i => !i.IsFolder && itemFilter(i)); items = items.OrderBy(i => i.SortName); diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs index fd4474b80..8cad50b91 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs @@ -289,7 +289,7 @@ namespace MediaBrowser.Server.Implementations.Sync if (itemByName != null) { return user.RootFolder - .GetRecursiveChildren(user, itemByName.ItemFilter); + .GetRecursiveChildren(user, itemByName.GetItemFilter()); } if (item.IsFolder) diff --git a/MediaBrowser.XbmcMetadata/EntryPoint.cs b/MediaBrowser.XbmcMetadata/EntryPoint.cs index 4b89785ae..d07633268 100644 --- a/MediaBrowser.XbmcMetadata/EntryPoint.cs +++ b/MediaBrowser.XbmcMetadata/EntryPoint.cs @@ -50,7 +50,7 @@ namespace MediaBrowser.XbmcMetadata return; } - var items = _libraryManager.RootFolder.GetRecursiveChildren(person.ItemFilter); + var items = _libraryManager.RootFolder.GetRecursiveChildren(person.GetItemFilter()); foreach (var item in items) {