mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Format code
This commit is contained in:
parent
8a639a3aee
commit
8758c7447e
@ -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
|
||||
|
@ -34,7 +34,7 @@ public static class CoreModule
|
||||
public static IServiceProvider Services { get; set; }
|
||||
|
||||
public static void AddRepository<T, TRepo>(this IServiceCollection services)
|
||||
where T:IResource
|
||||
where T : IResource
|
||||
where TRepo : class, IRepository<T>
|
||||
{
|
||||
services.AddScoped<TRepo>();
|
||||
|
@ -147,13 +147,12 @@ public static class MeilisearchModule
|
||||
/// <inheritdoc />
|
||||
public static void ConfigureMeilisearch(this WebApplicationBuilder builder)
|
||||
{
|
||||
builder
|
||||
.Services.AddSingleton(
|
||||
new MeilisearchClient(
|
||||
builder.Configuration.GetValue("MEILI_HOST", "http://meilisearch:7700"),
|
||||
builder.Configuration.GetValue<string?>("MEILI_MASTER_KEY")
|
||||
)
|
||||
);
|
||||
builder.Services.AddSingleton(
|
||||
new MeilisearchClient(
|
||||
builder.Configuration.GetValue("MEILI_HOST", "http://meilisearch:7700"),
|
||||
builder.Configuration.GetValue<string?>("MEILI_MASTER_KEY")
|
||||
)
|
||||
);
|
||||
builder.Services.AddScoped<ISearchManager, SearchManager>();
|
||||
builder.Services.AddSingleton<MeiliSync>();
|
||||
}
|
||||
|
@ -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<DateTime>(
|
||||
name: "start_air",
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user