diff --git a/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs b/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs index f97c0f05..9856b783 100644 --- a/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs +++ b/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs @@ -155,8 +155,8 @@ namespace Kyoo.Abstractions.Models public VideoLinks Links => new() { - Direct = $"/video/movie/{Slug}/direct", - Hls = $"/video/movie/{Slug}/master.m3u8", + Direct = $"/movie/{Slug}/direct", + Hls = $"/movie/{Slug}/master.m3u8", }; [SerializeIgnore] diff --git a/back/src/Kyoo.Core/Views/Helper/Transcoder.cs b/back/src/Kyoo.Core/Views/Helper/Transcoder.cs index d864425d..81c35302 100644 --- a/back/src/Kyoo.Core/Views/Helper/Transcoder.cs +++ b/back/src/Kyoo.Core/Views/Helper/Transcoder.cs @@ -53,7 +53,7 @@ public abstract class TranscoderApi(IRepository repository, IThumbnailsMan } ) .Build(); - return this.HttpProxyAsync($"http://transcoder:7666/{route}", proxyOptions); + return this.HttpProxyAsync($"http://transcoder:7666{route}", proxyOptions); } protected abstract Task<(string path, string route)> GetPath(Identifier identifier); @@ -104,6 +104,14 @@ public abstract class TranscoderApi(IRepository repository, IThumbnailsMan await _Proxy($"/{quality}/index.m3u8", await GetPath(identifier)); } + [HttpGet("{identifier:id}/{quality}/{segment}")] + [PartialPermission(Kind.Play)] + public async Task GetVideoSegment(Identifier identifier, string quality, string segment) + { + await _Proxy($"/{quality}/{segment}", await GetPath(identifier)); + } + + [HttpGet("{identifier:id}/audio/{audio}/index.m3u8")] [PartialPermission(Kind.Play)] public async Task GetAudioIndex(Identifier identifier, string audio)