mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 13:44:33 -04:00
Format code
This commit is contained in:
parent
8a639a3aee
commit
8758c7447e
@ -16,7 +16,7 @@ RUN dotnet restore -a $TARGETARCH
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
ARG VERSION
|
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
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||||
RUN apt-get update && apt-get install -y curl
|
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 IServiceProvider Services { get; set; }
|
||||||
|
|
||||||
public static void AddRepository<T, TRepo>(this IServiceCollection services)
|
public static void AddRepository<T, TRepo>(this IServiceCollection services)
|
||||||
where T:IResource
|
where T : IResource
|
||||||
where TRepo : class, IRepository<T>
|
where TRepo : class, IRepository<T>
|
||||||
{
|
{
|
||||||
services.AddScoped<TRepo>();
|
services.AddScoped<TRepo>();
|
||||||
|
@ -147,13 +147,12 @@ public static class MeilisearchModule
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public static void ConfigureMeilisearch(this WebApplicationBuilder builder)
|
public static void ConfigureMeilisearch(this WebApplicationBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder.Services.AddSingleton(
|
||||||
.Services.AddSingleton(
|
new MeilisearchClient(
|
||||||
new MeilisearchClient(
|
builder.Configuration.GetValue("MEILI_HOST", "http://meilisearch:7700"),
|
||||||
builder.Configuration.GetValue("MEILI_HOST", "http://meilisearch:7700"),
|
builder.Configuration.GetValue<string?>("MEILI_MASTER_KEY")
|
||||||
builder.Configuration.GetValue<string?>("MEILI_MASTER_KEY")
|
)
|
||||||
)
|
);
|
||||||
);
|
|
||||||
builder.Services.AddScoped<ISearchManager, SearchManager>();
|
builder.Services.AddScoped<ISearchManager, SearchManager>();
|
||||||
builder.Services.AddSingleton<MeiliSync>();
|
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"
|
"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:status", "unknown,finished,airing,planned")
|
||||||
.OldAnnotation(
|
.OldAnnotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted");
|
||||||
"Npgsql:Enum:watch_status",
|
|
||||||
"completed,watching,droped,planned,deleted"
|
|
||||||
);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
name: "start_air",
|
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"
|
"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:status", "unknown,finished,airing,planned")
|
||||||
.OldAnnotation(
|
.OldAnnotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted");
|
||||||
"Npgsql:Enum:watch_status",
|
|
||||||
"completed,watching,droped,planned,deleted"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <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"
|
"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:status", "unknown,finished,airing,planned")
|
||||||
.OldAnnotation(
|
.OldAnnotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted");
|
||||||
"Npgsql:Enum:watch_status",
|
|
||||||
"completed,watching,droped,planned,deleted"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,11 +75,10 @@ class TheMovieDatabase(Provider):
|
|||||||
if isinstance(x, list):
|
if isinstance(x, list):
|
||||||
return [j for i in x for j in flatten(i)]
|
return [j for i in x for j in flatten(i)]
|
||||||
return [x]
|
return [x]
|
||||||
return flatten([
|
|
||||||
self.genre_map[x["id"]]
|
return flatten(
|
||||||
for x in genres
|
[self.genre_map[x["id"]] for x in genres if x["id"] in self.genre_map]
|
||||||
if x["id"] in self.genre_map
|
)
|
||||||
])
|
|
||||||
|
|
||||||
def get_languages(self, *args):
|
def get_languages(self, *args):
|
||||||
return self._languages + list(args)
|
return self._languages + list(args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user