mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fixing task services resolving
This commit is contained in:
parent
9d45af3dd2
commit
6542062bb8
@ -178,6 +178,7 @@ namespace Kyoo.Models
|
||||
EpisodeID = ep.ID,
|
||||
Slug = ep.Slug,
|
||||
ShowSlug = ep.Show.Slug,
|
||||
ShowTitle = ep.Show.Title,
|
||||
SeasonNumber = ep.SeasonNumber,
|
||||
EpisodeNumber = ep.EpisodeNumber,
|
||||
AbsoluteNumber = ep.AbsoluteNumber,
|
||||
|
@ -20,7 +20,7 @@ namespace Kyoo
|
||||
RegisterTask<T>(this ContainerBuilder builder)
|
||||
where T : class, ITask
|
||||
{
|
||||
return builder.RegisterType<T>().As<ITask>().SingleInstance();
|
||||
return builder.RegisterType<T>().As<ITask>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -75,7 +75,7 @@ namespace Kyoo.Postgresql
|
||||
DatabaseContext context = provider.GetRequiredService<DatabaseContext>();
|
||||
context.Database.Migrate();
|
||||
|
||||
NpgsqlConnection conn = (NpgsqlConnection)context.Database.GetDbConnection();
|
||||
using NpgsqlConnection conn = (NpgsqlConnection)context.Database.GetDbConnection();
|
||||
conn.Open();
|
||||
conn.ReloadTypes();
|
||||
}
|
||||
|
@ -138,7 +138,6 @@ namespace Kyoo.Tasks
|
||||
_taskManager.StartTask<RegisterEpisode>(reporter, new Dictionary<string, object>
|
||||
{
|
||||
["path"] = episodePath,
|
||||
["relativePath"] = episodePath[path.Length..],
|
||||
["library"] = library
|
||||
}, cancellationToken);
|
||||
percent += 100f / paths.Length;
|
||||
@ -161,8 +160,7 @@ namespace Kyoo.Tasks
|
||||
{
|
||||
_taskManager.StartTask<RegisterSubtitle>(reporter, new Dictionary<string, object>
|
||||
{
|
||||
["path"] = trackPath,
|
||||
["relativePath"] = trackPath[path.Length..]
|
||||
["path"] = trackPath
|
||||
}, cancellationToken);
|
||||
percent += 100f / subtitles.Length;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user