diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-11 13:54:59 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-11 13:54:59 -0400 |
| commit | 803e8b4a2eb5fcf1b5a3679fe551d541620d4743 (patch) | |
| tree | 8d070a411db7406fe5e7f30e03feefe83ad7127d /MediaBrowser.Server.Implementations/Dto | |
| parent | 1496991096c4db9f69bc572aeefc8099ca0f0c01 (diff) | |
improved performance of item counts
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 5f383f1a0e..948e9a14a3 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -137,7 +137,8 @@ namespace MediaBrowser.Server.Implementations.Dto if (user == null) { - counts = item.ItemCounts; + //counts = item.ItemCounts; + return; } else { @@ -376,7 +377,7 @@ namespace MediaBrowser.Server.Implementations.Dto } dto.Album = item.Album; - dto.Artists = string.IsNullOrEmpty(item.Artist) ? new string[] { } : new[] { item.Artist }; + dto.Artists = string.IsNullOrEmpty(item.Artist) ? new List<string>() : new List<string> { item.Artist }; } private void SetGameProperties(BaseItemDto dto, Game item) @@ -804,6 +805,7 @@ namespace MediaBrowser.Server.Implementations.Dto dto.Language = item.Language; dto.MediaType = item.MediaType; dto.LocationType = item.LocationType; + dto.CriticRating = item.CriticRating; if (fields.Contains(ItemFields.CriticRatingSummary)) @@ -938,7 +940,7 @@ namespace MediaBrowser.Server.Implementations.Dto if (audio != null) { dto.Album = audio.Album; - dto.Artists = audio.Artists.ToArray(); + dto.Artists = audio.Artists; var albumParent = audio.FindParent<MusicAlbum>(); |
