mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
fixes #838 - Support rtmp protocol with channels
This commit is contained in:
@@ -1111,7 +1111,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
|
||||
if (tvChannel != null)
|
||||
{
|
||||
dto.MediaSources = GetMediaSources(tvChannel);
|
||||
dto.MediaSources = tvChannel.GetMediaSources(true).ToList();
|
||||
}
|
||||
|
||||
var channelItem = item as IChannelItem;
|
||||
@@ -1123,43 +1123,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
}
|
||||
}
|
||||
|
||||
public List<MediaSourceInfo> GetMediaSources(BaseItem item)
|
||||
{
|
||||
var video = item as Video;
|
||||
|
||||
if (video != null)
|
||||
{
|
||||
return video.GetMediaSources(true).ToList();
|
||||
}
|
||||
|
||||
var audio = item as Audio;
|
||||
|
||||
if (audio != null)
|
||||
{
|
||||
return audio.GetMediaSources(true).ToList();
|
||||
}
|
||||
|
||||
var result = new List<MediaSourceInfo>
|
||||
{
|
||||
new MediaSourceInfo
|
||||
{
|
||||
Id = item.Id.ToString("N"),
|
||||
LocationType = item.LocationType,
|
||||
Name = item.Name,
|
||||
Path = GetMappedPath(item),
|
||||
MediaStreams = _itemRepo.GetMediaStreams(new MediaStreamQuery
|
||||
{
|
||||
ItemId = item.Id
|
||||
|
||||
}).ToList(),
|
||||
|
||||
RunTimeTicks = item.RunTimeTicks
|
||||
}
|
||||
};
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private string GetMappedPath(IHasMetadata item)
|
||||
{
|
||||
var path = item.Path;
|
||||
|
||||
Reference in New Issue
Block a user