aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Channels/ChannelAudioItem.cs')
-rw-r--r--MediaBrowser.Controller/Channels/ChannelAudioItem.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
index 6d505aecb..ede366dab 100644
--- a/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelAudioItem.cs
@@ -1,9 +1,11 @@
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Model.Channels;
using MediaBrowser.Model.Configuration;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Linq;
+using System.Threading;
namespace MediaBrowser.Controller.Channels
{
@@ -69,5 +71,22 @@ namespace MediaBrowser.Controller.Channels
{
return System.IO.Path.Combine(basePath, "channels", ChannelId, Id.ToString("N"));
}
+
+ public override IEnumerable<MediaSourceInfo> GetMediaSources(bool enablePathSubstitution)
+ {
+ var list = base.GetMediaSources(enablePathSubstitution).ToList();
+
+ var sources = ChannelManager.GetChannelItemMediaSources(Id.ToString("N"), false, CancellationToken.None)
+ .Result.ToList();
+
+ if (sources.Count > 0)
+ {
+ return sources;
+ }
+
+ list.InsertRange(0, sources);
+
+ return list;
+ }
}
}