diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-14 14:04:26 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-14 14:04:26 -0400 |
| commit | a46cbfa02b22d63ff9b077c8a523b5b51dd45811 (patch) | |
| tree | 51d35ceb16aff0f30777f303fa9a01a4b8374750 /MediaBrowser.Api/Library/LibraryService.cs | |
| parent | be18983f918c4b4a68cfb95339104f8732859ccb (diff) | |
rework channel checking
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryService.cs | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 15fe4a177..0e5a3ab25 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -8,7 +8,6 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Session; -using MediaBrowser.Model.Channels; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; @@ -432,21 +431,6 @@ namespace MediaBrowser.Api.Library var songs = filteredItems.OfType<Audio>().ToList(); var series = filteredItems.OfType<Series>().ToList(); - var channelCount = 0; - - try - { - channelCount = _channelManager.GetChannels(new ChannelQuery - { - UserId = request.UserId.HasValue ? request.UserId.Value.ToString("N") : null - - }, CancellationToken.None).Result.TotalRecordCount; - } - catch (Exception ex) - { - Logger.ErrorException("Error getting channels", ex); - } - var counts = new ItemCounts { AlbumCount = albums.Count, @@ -462,9 +446,7 @@ namespace MediaBrowser.Api.Library BoxSetCount = boxsets.Count, BookCount = books.Count, - UniqueTypes = items.Select(i => i.GetClientTypeName()).Distinct().ToList(), - - ChannelCount = channelCount + UniqueTypes = items.Select(i => i.GetClientTypeName()).Distinct().ToList() }; return ToOptimizedSerializedResultUsingCache(counts); |
