diff --git a/back/Dockerfile b/back/Dockerfile index 71b33142..a29161df 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -16,7 +16,7 @@ RUN dotnet restore -a $TARGETARCH COPY . . ARG VERSION -RUN dotnet publish -a $TARGETARCH --no-restore -c Release -o /app "-p:Version=${VERSION:-"0.0.0-dev"}" src/Kyoo.Host +RUN dotnet publish -a $TARGETARCH --no-restore -c Release -o /app "-p:Version=${VERSION:-"0.0.0-dev"}" src/Kyoo.Core FROM mcr.microsoft.com/dotnet/aspnet:8.0 RUN apt-get update && apt-get install -y curl diff --git a/back/src/Kyoo.Core/CoreModule.cs b/back/src/Kyoo.Core/CoreModule.cs index 114cddd4..05d3a36c 100644 --- a/back/src/Kyoo.Core/CoreModule.cs +++ b/back/src/Kyoo.Core/CoreModule.cs @@ -34,7 +34,7 @@ public static class CoreModule public static IServiceProvider Services { get; set; } public static void AddRepository(this IServiceCollection services) - where T:IResource + where T : IResource where TRepo : class, IRepository { services.AddScoped(); diff --git a/back/src/Kyoo.Meilisearch/MeilisearchModule.cs b/back/src/Kyoo.Meilisearch/MeilisearchModule.cs index 7fa428e5..bc09420e 100644 --- a/back/src/Kyoo.Meilisearch/MeilisearchModule.cs +++ b/back/src/Kyoo.Meilisearch/MeilisearchModule.cs @@ -147,13 +147,12 @@ public static class MeilisearchModule /// public static void ConfigureMeilisearch(this WebApplicationBuilder builder) { - builder - .Services.AddSingleton( - new MeilisearchClient( - builder.Configuration.GetValue("MEILI_HOST", "http://meilisearch:7700"), - builder.Configuration.GetValue("MEILI_MASTER_KEY") - ) - ); + builder.Services.AddSingleton( + new MeilisearchClient( + builder.Configuration.GetValue("MEILI_HOST", "http://meilisearch:7700"), + builder.Configuration.GetValue("MEILI_MASTER_KEY") + ) + ); builder.Services.AddScoped(); builder.Services.AddSingleton(); } diff --git a/back/src/Kyoo.Postgresql/Migrations/20240324174638_UseDateOnly.cs b/back/src/Kyoo.Postgresql/Migrations/20240324174638_UseDateOnly.cs index 53cf7cc3..eb82dddf 100644 --- a/back/src/Kyoo.Postgresql/Migrations/20240324174638_UseDateOnly.cs +++ b/back/src/Kyoo.Postgresql/Migrations/20240324174638_UseDateOnly.cs @@ -112,10 +112,7 @@ public partial class UseDateOnly : Migration "action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western" ) .OldAnnotation("Npgsql:Enum:status", "unknown,finished,airing,planned") - .OldAnnotation( - "Npgsql:Enum:watch_status", - "completed,watching,droped,planned,deleted" - ); + .OldAnnotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted"); migrationBuilder.AlterColumn( name: "start_air", diff --git a/back/src/Kyoo.Postgresql/Migrations/20240401213942_AddGenres.cs b/back/src/Kyoo.Postgresql/Migrations/20240401213942_AddGenres.cs index bb362c8a..6cb5aa67 100644 --- a/back/src/Kyoo.Postgresql/Migrations/20240401213942_AddGenres.cs +++ b/back/src/Kyoo.Postgresql/Migrations/20240401213942_AddGenres.cs @@ -23,10 +23,7 @@ public partial class AddGenres : Migration "action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western" ) .OldAnnotation("Npgsql:Enum:status", "unknown,finished,airing,planned") - .OldAnnotation( - "Npgsql:Enum:watch_status", - "completed,watching,droped,planned,deleted" - ); + .OldAnnotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted"); } /// @@ -45,9 +42,6 @@ public partial class AddGenres : Migration "action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western,kids,news,reality,soap,talk,politics" ) .OldAnnotation("Npgsql:Enum:status", "unknown,finished,airing,planned") - .OldAnnotation( - "Npgsql:Enum:watch_status", - "completed,watching,droped,planned,deleted" - ); + .OldAnnotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted"); } } diff --git a/scanner/providers/implementations/themoviedatabase.py b/scanner/providers/implementations/themoviedatabase.py index 3b86e3ab..eb1971fa 100644 --- a/scanner/providers/implementations/themoviedatabase.py +++ b/scanner/providers/implementations/themoviedatabase.py @@ -75,11 +75,10 @@ class TheMovieDatabase(Provider): if isinstance(x, list): return [j for i in x for j in flatten(i)] return [x] - return flatten([ - self.genre_map[x["id"]] - for x in genres - if x["id"] in self.genre_map - ]) + + return flatten( + [self.genre_map[x["id"]] for x in genres if x["id"] in self.genre_map] + ) def get_languages(self, *args): return self._languages + list(args)