aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/SearchService.cs
diff options
context:
space:
mode:
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;
}