mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
removed ILiveTvItem interface
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -719,15 +719,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
_saveItemCommand.GetParameter(index++).Value = null;
|
||||
}
|
||||
|
||||
var tvItem = item as ILiveTvItem;
|
||||
if (tvItem != null)
|
||||
{
|
||||
_saveItemCommand.GetParameter(index++).Value = tvItem.ServiceName;
|
||||
}
|
||||
else
|
||||
{
|
||||
_saveItemCommand.GetParameter(index++).Value = null;
|
||||
}
|
||||
_saveItemCommand.GetParameter(index++).Value = item.ServiceName;
|
||||
|
||||
_saveItemCommand.GetParameter(index++).Value = string.Join("|", item.Tags.ToArray());
|
||||
_saveItemCommand.GetParameter(index++).Value = item.IsFolder;
|
||||
@@ -1095,11 +1087,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
|
||||
if (!reader.IsDBNull(43))
|
||||
{
|
||||
var tvItem = item as ILiveTvItem;
|
||||
if (tvItem != null)
|
||||
{
|
||||
tvItem.ServiceName = reader.GetString(43);
|
||||
}
|
||||
item.ServiceName = reader.GetString(43);
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(44))
|
||||
|
||||
Reference in New Issue
Block a user