The Free Software Media System - Server Backend & API
fix failing scan
Luke Pulverentif5919990c9ef
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.csindex 4cc3f18927..038aa98aae 100644--- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs+++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs@@ -20,6 +20,7 @@ namespace MediaBrowser.Controller.Entities.Audiopublic bool IsAccessedByName { get; set; }public List<string> 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/// </summary>/// <value>The containing folder path.</value>+ [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./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -177,19 +180,16 @@ namespace MediaBrowser.Controller.Entities.Audiopublic IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems){- return inputItems.Where(ItemFilter);+ return inputItems.Where(GetItemFilter());}- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> 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.csindex b2c2a1b484..9689d7cce2 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/// </summary>/// <value>The containing folder path.</value>+ [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./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -52,13 +54,12 @@ namespace MediaBrowser.Controller.Entities.Audiopublic IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems){- return inputItems.Where(ItemFilter);+ return inputItems.Where(GetItemFilter());}-- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> 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.csindex d69a6ca464..41ce0c12ab 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/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -32,6 +34,7 @@ namespace MediaBrowser.Controller.Entities/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -42,13 +45,12 @@ namespace MediaBrowser.Controller.Entitiespublic IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems){- return inputItems.Where(ItemFilter);+ return inputItems.Where(GetItemFilter());}-- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> 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.csindex a33e6131fc..f581c55e83 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/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.Entities/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -46,12 +49,12 @@ namespace MediaBrowser.Controller.Entitiespublic IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems){- return inputItems.Where(ItemFilter);+ return inputItems.Where(GetItemFilter());}- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> 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.csindex e303e94536..b48ad788fc 100644--- a/MediaBrowser.Controller/Entities/IItemByName.cs+++ b/MediaBrowser.Controller/Entities/IItemByName.cs@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Entities/// <returns>IEnumerable{BaseItem}.</returns>IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems);- Func<BaseItem, bool> ItemFilter { get; }+ Func<BaseItem, bool> GetItemFilter();}public interface IHasDualAccess : IItemByNamediff --git a/MediaBrowser.Controller/Entities/Person.cs b/MediaBrowser.Controller/Entities/Person.csindex 19af6e6f02..25509b1530 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/// </summary>/// <value>The place of birth.</value>public string PlaceOfBirth { get; set; }-+/// <summary>/// Gets the user data key./// </summary>@@ -35,6 +36,7 @@ namespace MediaBrowser.Controller.Entities/// If the item is a folder, it returns the folder itself/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -47,6 +49,7 @@ namespace MediaBrowser.Controller.Entities/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -57,13 +60,13 @@ namespace MediaBrowser.Controller.Entitiespublic IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems){- return inputItems.Where(ItemFilter);+ return inputItems.Where(GetItemFilter());}- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> 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.csindex 53c635ebab..76193d6c42 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<string>();}-+/// <summary>/// Gets the user data key./// </summary>@@ -30,6 +31,7 @@ namespace MediaBrowser.Controller.Entities/// If the item is a folder, it returns the folder itself/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -42,6 +44,7 @@ namespace MediaBrowser.Controller.Entities/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -52,13 +55,13 @@ namespace MediaBrowser.Controller.Entitiespublic IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems){- return inputItems.Where(ItemFilter);+ return inputItems.Where(GetItemFilter());}- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> 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.csindex 869c30ba88..ac1ab14de5 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/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -74,6 +75,7 @@ namespace MediaBrowser.Controller.Entities/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{getdiff --git a/MediaBrowser.Controller/Entities/Year.cs b/MediaBrowser.Controller/Entities/Year.csindex bbf473a9ae..59a4bf16d3 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/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -36,6 +38,7 @@ namespace MediaBrowser.Controller.Entities/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [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.Entitiesreturn inputItems.Where(i => i.ProductionYear.HasValue && i.ProductionYear.Value == year);}+ public int? GetYearValue()+ {+ int i;++ if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out i))+ {+ return i;+ }++ return null;+ }- public Func<BaseItem, bool> ItemFilter+ public Func<BaseItem, bool> GetItemFilter(){- get { throw new System.NotImplementedException(); }+ 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.csindex 5cfdb5dbf5..8faaa895c2 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./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [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.LiveTvreturn false;}+ [IgnoreDataMember]public override bool SupportsLocalMetadata{getdiff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.csindex 72b4970262..1948ce0d50 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./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{get@@ -88,6 +90,7 @@ namespace MediaBrowser.Controller.LiveTvreturn number.ToString("000-") + (Name ?? string.Empty);}+ [IgnoreDataMember]public override string MediaType{getdiff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.csindex 6308a71dc3..a66aaad6f8 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/// </summary>/// <value>The containing folder path.</value>+ [IgnoreDataMember]public override string ContainingFolderPath{get@@ -150,6 +152,7 @@ namespace MediaBrowser.Controller.LiveTv/// Gets a value indicating whether this instance is owned item./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [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{getdiff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.csindex 098400b502..34fe757a71 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.LiveTvpublic 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./// </summary>/// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>+ [IgnoreDataMember]public override bool IsOwnedItem{getdiff --git a/MediaBrowser.Dlna/PlayTo/Device.cs b/MediaBrowser.Dlna/PlayTo/Device.csindex c43efcd1da..00cb34be3e 100644--- a/MediaBrowser.Dlna/PlayTo/Device.cs+++ b/MediaBrowser.Dlna/PlayTo/Device.cs@@ -712,14 +712,10 @@ namespace MediaBrowser.Dlna.PlayToif (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.PlayToif (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 AvCommandsdiff --git a/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs b/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.csindex ccc7d46e6e..f0689751c5 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.PlayTostring 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.csindex 51c4d18a94..2497cc1ec7 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.csindex 5640f27457..06b5138f1c 100644--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs@@ -95,9 +95,11 @@ namespace MediaBrowser.Server.Implementations.Dtoif (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.Dtoif (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.csindex 0613cda30a..f1616b85e8 100644--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs@@ -899,9 +899,11 @@ namespace MediaBrowser.Server.Implementations.Sessionif (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.csindex fd4474b80e..8cad50b913 100644--- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs+++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs@@ -289,7 +289,7 @@ namespace MediaBrowser.Server.Implementations.Syncif (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.csindex 4b89785ae9..d076332681 100644--- a/MediaBrowser.XbmcMetadata/EntryPoint.cs+++ b/MediaBrowser.XbmcMetadata/EntryPoint.cs@@ -50,7 +50,7 @@ namespace MediaBrowser.XbmcMetadatareturn;}- var items = _libraryManager.RootFolder.GetRecursiveChildren(person.ItemFilter);+ var items = _libraryManager.RootFolder.GetRecursiveChildren(person.GetItemFilter());foreach (var item in items){