From 740a10a4e3f85ffcfd26ec18263d4c78d4b14ecc Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 10 Sep 2013 14:56:00 -0400 Subject: de-normalize item by name data. create counts during library scan for fast access. --- MediaBrowser.Api/UserLibrary/ItemsService.cs | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs') diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index c9218c6b5..5f08b6131 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -427,28 +427,9 @@ namespace MediaBrowser.Api.UserLibrary items = items.Where(i => { - var audio = i as Audio; - - if (audio != null) - { - return artists.Any(audio.HasArtist); - } - - var album = i as MusicAlbum; - - if (album != null) - { - return artists.Any(album.HasArtist); - } + var audio = i as IHasArtist; - var musicVideo = i as MusicVideo; - - if (musicVideo != null) - { - return artists.Any(musicVideo.HasArtist); - } - - return false; + return audio != null && artists.Any(audio.HasArtist); }); } -- cgit v1.2.3