mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fixing missing external ids for episode registering
This commit is contained in:
parent
fe68c1f608
commit
4c79514e05
@ -67,10 +67,7 @@ namespace Kyoo.Controllers
|
||||
{
|
||||
string pluginFolder = _config.GetValue<string>("plugins");
|
||||
if (!Directory.Exists(pluginFolder))
|
||||
{
|
||||
Console.WriteLine("\nPlugin directory does not exist. No plugin loaded.\n");
|
||||
return;
|
||||
}
|
||||
Directory.CreateDirectory(pluginFolder);
|
||||
|
||||
string[] pluginsPaths = Directory.GetFiles(pluginFolder);
|
||||
_plugins = pluginsPaths.SelectMany(path =>
|
||||
@ -78,7 +75,7 @@ namespace Kyoo.Controllers
|
||||
path = Path.GetFullPath(path);
|
||||
try
|
||||
{
|
||||
PluginDependencyLoader loader = new PluginDependencyLoader(path);
|
||||
PluginDependencyLoader loader = new(path);
|
||||
Assembly ass = loader.LoadFromAssemblyPath(path);
|
||||
return ass.GetTypes()
|
||||
.Where(x => typeof(IPlugin).IsAssignableFrom(x))
|
||||
|
@ -274,7 +274,10 @@ namespace Kyoo.Controllers
|
||||
{
|
||||
Show old = await libraryManager.GetShow(x => x.Path == showPath);
|
||||
if (old != null)
|
||||
{
|
||||
await libraryManager.Load(old, x => x.ExternalIDs);
|
||||
return old;
|
||||
}
|
||||
Show show = await _metadataProvider.SearchShow(showTitle, isMovie, library);
|
||||
show.Path = showPath;
|
||||
show.People = await _metadataProvider.GetPeople(show, library);
|
||||
@ -287,7 +290,10 @@ namespace Kyoo.Controllers
|
||||
{
|
||||
old = await libraryManager.GetShow(show.Slug);
|
||||
if (old.Path == showPath)
|
||||
{
|
||||
await libraryManager.Load(old, x => x.ExternalIDs);
|
||||
return old;
|
||||
}
|
||||
show.Slug += $"-{show.StartYear}";
|
||||
await libraryManager.RegisterShow(show);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user