Catch any exception thrown during plugin startup

This commit is contained in:
ConfusedPolarBear 2022-06-12 16:08:31 -05:00
parent 2394c03bbe
commit 01d7f570fa

View File

@ -58,6 +58,8 @@ public class Entrypoint : IServerEntryPoint
return Task.CompletedTask;
}
try
{
// As soon as a new episode is added, queue it for later analysis.
_libraryManager.ItemAdded += ItemAdded;
@ -76,6 +78,11 @@ public class Entrypoint : IServerEntryPoint
QueueLibraryContents(folder.ItemId);
}
}
catch (Exception ex)
{
_logger.LogError("Unable to run startup enqueue: {Exception}", ex);
}
return Task.CompletedTask;
}