diff options
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/AudioHlsService.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/BaseHlsService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/VideoHlsService.cs | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs b/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs index ecdab94b3c..98033c057d 100644 --- a/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs @@ -18,8 +18,8 @@ namespace MediaBrowser.Api.Playback.Hls } - [Route("/Audio/{Id}/segments/{SegmentId}.mp3", "GET")] - [Route("/Audio/{Id}/segments/{SegmentId}.aac", "GET")] + [Route("/Audio/{Id}/segments/{SegmentId}/stream.mp3", "GET")] + [Route("/Audio/{Id}/segments/{SegmentId}/stream.aac", "GET")] [ServiceStack.ServiceHost.Api(Description = "Gets an Http live streaming segment file. Internal use only.")] public class GetHlsAudioSegment { diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 1fb8a504fb..c27219bbf4 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -127,7 +127,7 @@ namespace MediaBrowser.Api.Playback.Hls // The segement paths within the playlist are phsyical, so strip that out to make it relative fileText = fileText.Replace(Path.GetDirectoryName(playlist) + Path.DirectorySeparatorChar, string.Empty); - fileText = fileText.Replace(SegmentFilePrefix, "segments/"); + fileText = fileText.Replace(SegmentFilePrefix, "segments/").Replace(".ts", "/stream.ts").Replace(".aac", "/stream.aac").Replace(".mp3", "/stream.mp3"); // Even though we specify target duration of 9, ffmpeg seems unable to keep all segments under that amount fileText = fileText.Replace("#EXT-X-TARGETDURATION:9", "#EXT-X-TARGETDURATION:10"); diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs index dfbed538f4..59ac741297 100644 --- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Api.Playback.Hls } - [Route("/Videos/{Id}/segments/{SegmentId}.ts", "GET")] + [Route("/Videos/{Id}/segments/{SegmentId}/stream.ts", "GET")] [ServiceStack.ServiceHost.Api(Description = "Gets an Http live streaming segment file. Internal use only.")] public class GetHlsVideoSegment { @@ -35,6 +35,7 @@ namespace MediaBrowser.Api.Playback.Hls var file = SegmentFilePrefix + request.SegmentId + Path.GetExtension(Request.PathInfo); file = Path.Combine(ApplicationPaths.EncodedMediaCachePath, file); + Logger.Info(file); return ToStaticFileResult(file); } |
