diff --git a/back/src/Kyoo.Abstractions/Models/Resources/Episode.cs b/back/src/Kyoo.Abstractions/Models/Resources/Episode.cs index a0ec9149..09a33b2d 100644 --- a/back/src/Kyoo.Abstractions/Models/Resources/Episode.cs +++ b/back/src/Kyoo.Abstractions/Models/Resources/Episode.cs @@ -269,11 +269,7 @@ namespace Kyoo.Abstractions.Models /// Links to watch this episode. /// public VideoLinks Links => - new() - { - Direct = $"/episode/{Slug}/direct", - Hls = $"/episode/{Slug}/master.m3u8", - }; + new() { Direct = $"/episode/{Slug}/direct", Hls = $"/episode/{Slug}/master.m3u8", }; /// /// Get the slug of an episode. diff --git a/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs b/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs index 9856b783..d3ccf7c4 100644 --- a/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs +++ b/back/src/Kyoo.Abstractions/Models/Resources/Movie.cs @@ -153,11 +153,7 @@ namespace Kyoo.Abstractions.Models /// Links to watch this movie. /// public VideoLinks Links => - new() - { - Direct = $"/movie/{Slug}/direct", - Hls = $"/movie/{Slug}/master.m3u8", - }; + new() { Direct = $"/movie/{Slug}/direct", Hls = $"/movie/{Slug}/master.m3u8", }; [SerializeIgnore] public ICollection? Watched { get; set; } diff --git a/back/src/Kyoo.Core/Controllers/Repositories/WatchStatusRepository.cs b/back/src/Kyoo.Core/Controllers/Repositories/WatchStatusRepository.cs index f58f4990..e5a12cfc 100644 --- a/back/src/Kyoo.Core/Controllers/Repositories/WatchStatusRepository.cs +++ b/back/src/Kyoo.Core/Controllers/Repositories/WatchStatusRepository.cs @@ -68,7 +68,8 @@ public class WatchStatusRepository : IWatchStatusRepository DatabaseContext db = scope.ServiceProvider.GetRequiredService(); WatchStatusRepository repo = scope.ServiceProvider.GetRequiredService(); - List users = await db.ShowWatchStatus.IgnoreQueryFilters() + List users = await db + .ShowWatchStatus.IgnoreQueryFilters() .Where(x => x.ShowId == ep.ShowId && x.Status == WatchStatus.Completed) .Select(x => x.UserId) .ToListAsync(); diff --git a/back/src/Kyoo.Core/CoreModule.cs b/back/src/Kyoo.Core/CoreModule.cs index 18f0c229..24138b52 100644 --- a/back/src/Kyoo.Core/CoreModule.cs +++ b/back/src/Kyoo.Core/CoreModule.cs @@ -110,7 +110,8 @@ namespace Kyoo.Core options.SuppressMapClientErrors = true; options.InvalidModelStateResponseFactory = ctx => { - string[] errors = ctx.ModelState.SelectMany(x => x.Value!.Errors) + string[] errors = ctx + .ModelState.SelectMany(x => x.Value!.Errors) .Select(x => x.ErrorMessage) .ToArray(); return new BadRequestObjectResult(new RequestError(errors)); diff --git a/back/src/Kyoo.Core/Views/Helper/Transcoder.cs b/back/src/Kyoo.Core/Views/Helper/Transcoder.cs index 81c35302..7963c3e4 100644 --- a/back/src/Kyoo.Core/Views/Helper/Transcoder.cs +++ b/back/src/Kyoo.Core/Views/Helper/Transcoder.cs @@ -111,7 +111,6 @@ public abstract class TranscoderApi(IRepository repository, IThumbnailsMan 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) diff --git a/back/src/Kyoo.Postgresql/Migrations/20240217143306_AddIssues.cs b/back/src/Kyoo.Postgresql/Migrations/20240217143306_AddIssues.cs index be94c043..3077f6e9 100644 --- a/back/src/Kyoo.Postgresql/Migrations/20240217143306_AddIssues.cs +++ b/back/src/Kyoo.Postgresql/Migrations/20240217143306_AddIssues.cs @@ -46,7 +46,9 @@ namespace Kyoo.Postgresql.Migrations ); // language=PostgreSQL - migrationBuilder.Sql("update users set permissions = ARRAY_APPEND(permissions, 'overall.play');"); + migrationBuilder.Sql( + "update users set permissions = ARRAY_APPEND(permissions, 'overall.play');" + ); } /// diff --git a/transcoder/src/filestream.go b/transcoder/src/filestream.go index 62c4f3f4..a9d244d3 100644 --- a/transcoder/src/filestream.go +++ b/transcoder/src/filestream.go @@ -19,16 +19,16 @@ type FileStream struct { Keyframes []float64 CanTransmux bool Info *MediaInfo - videos CMap[Quality, *VideoStream] + videos CMap[Quality, *VideoStream] audios CMap[int32, *AudioStream] } func NewFileStream(path string, sha string, route string) *FileStream { ret := &FileStream{ - Path: path, - Out: fmt.Sprintf("%s/%s", Settings.Outpath, sha), + Path: path, + Out: fmt.Sprintf("%s/%s", Settings.Outpath, sha), videos: NewCMap[Quality, *VideoStream](), - audios: NewCMap[int32, *AudioStream](), + audios: NewCMap[int32, *AudioStream](), } ret.ready.Add(1) diff --git a/transcoder/src/info.go b/transcoder/src/info.go index 07be5eaa..97a12c85 100644 --- a/transcoder/src/info.go +++ b/transcoder/src/info.go @@ -181,7 +181,7 @@ func GetInfo(path string, sha string, route string) (*MediaInfo, error) { ret, _ := infos.GetOrCreate(sha, func() *MediaInfo { readyChan := make(chan struct{}) mi := &MediaInfo{ - Sha: sha, + Sha: sha, ready: readyChan, } go func() {