aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/SearchService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 13:37:50 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 13:37:50 -0400
commit1936d6db43e10cc6f45fa72fde4b1628e06b8abd (patch)
treead1afffae72558c9f2d2be471d00bdd729325f1d /MediaBrowser.Api/SearchService.cs
parent3a309db3c53542be3b2d3854b077cfd125f1f435 (diff)
update search hints
Diffstat (limited to 'MediaBrowser.Api/SearchService.cs')
-rw-r--r--MediaBrowser.Api/SearchService.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/MediaBrowser.Api/SearchService.cs b/MediaBrowser.Api/SearchService.cs
index 9d1aef300..302b8d834 100644
--- a/MediaBrowser.Api/SearchService.cs
+++ b/MediaBrowser.Api/SearchService.cs
@@ -4,6 +4,7 @@ using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Search;
@@ -171,6 +172,8 @@ namespace MediaBrowser.Api
ProductionYear = item.ProductionYear
};
+ result.ChannelId = item.ChannelId;
+
var primaryImageTag = _imageProcessor.GetImageCacheTag(item, ImageType.Primary);
if (primaryImageTag != null)
@@ -218,6 +221,12 @@ namespace MediaBrowser.Api
result.Artists = song.Artists.ToArray();
}
+ if (!string.IsNullOrWhiteSpace(item.ChannelId))
+ {
+ var channel = _libraryManager.GetItemById(item.ChannelId);
+ result.ChannelName = channel == null ? null : channel.Name;
+ }
+
return result;
}