diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-19 17:17:08 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-19 17:17:08 -0400 |
| commit | b9082d7e64034c92804a0196de9b52efa2333e88 (patch) | |
| tree | e0079762998cf8d311e958b0e4048fe5e6726902 /MediaBrowser.Server.Implementations/LiveTv | |
| parent | 036be902783ef8b94d504dee6fcc33f380f6c223 (diff) | |
removed ILiveTvItem interface
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs | 14 |
2 files changed, 12 insertions, 9 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index e54adc0c5c..5949a65371 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -358,7 +358,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv return list; } - private ILiveTvService GetService(ILiveTvItem item) + private ILiveTvService GetService(ILiveTvRecording item) + { + return GetService(item.ServiceName); + } + + private ILiveTvService GetService(BaseItem item) { return GetService(item.ServiceName); } diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs index ff102b0f79..d3bb87bc70 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs @@ -36,15 +36,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken) { - var channelItem = item as ILiveTvItem; + var baseItem = (BaseItem)item; - if (channelItem != null) + if (baseItem.SourceType == SourceType.LiveTV) { - var hasMetadata = (IHasMetadata)channelItem; - - if (string.IsNullOrWhiteSpace(hasMetadata.Path)) + if (string.IsNullOrWhiteSpace(baseItem.Path)) { - return GetMediaSourcesInternal(channelItem, cancellationToken); + return GetMediaSourcesInternal(item, cancellationToken); } } @@ -54,8 +52,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv // Do not use a pipe here because Roku http requests to the server will fail, without any explicit error message. private const char StreamIdDelimeter = '_'; private const string StreamIdDelimeterString = "_"; - - private async Task<IEnumerable<MediaSourceInfo>> GetMediaSourcesInternal(ILiveTvItem item, CancellationToken cancellationToken) + + private async Task<IEnumerable<MediaSourceInfo>> GetMediaSourcesInternal(IHasMediaSources item, CancellationToken cancellationToken) { IEnumerable<MediaSourceInfo> sources; |
