From 0e4972f7e63002fb3a4caeb96bafd097bc1ed56b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 3 Aug 2013 09:24:23 -0400 Subject: [PATCH] reduced some virtualization --- .../Entities/Audio/MusicAlbum.cs | 13 +++--- .../Entities/Audio/MusicArtist.cs | 7 +-- MediaBrowser.Controller/Entities/BaseItem.cs | 32 ++++++++++++-- MediaBrowser.Controller/Entities/Folder.cs | 23 +++++----- .../Entities/IndexFolder.cs | 2 +- .../Entities/TV/Episode.cs | 43 ++++++------------- MediaBrowser.Controller/Entities/TV/Season.cs | 18 +++----- 7 files changed, 70 insertions(+), 68 deletions(-) diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 79624826a..36cf995f5 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -1,7 +1,8 @@ -using System.Collections.Generic; +using MediaBrowser.Model.Entities; +using System; +using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -using MediaBrowser.Model.Entities; namespace MediaBrowser.Controller.Entities.Audio { @@ -79,9 +80,11 @@ namespace MediaBrowser.Controller.Entities.Audio { get { - var child = Children.FirstOrDefault(); - - return child == null ? base.Genres : child.Genres; + return Children + .OfType