In ItemAddedManager.ProcessItemsAsync (L60), a missing item results in the foreach loop exiting prematurely:
|
foreach (var (key, container) in currentItems) |
|
{ |
|
var item = _libraryManager.GetItemById(key); |
|
if (item is null) |
|
{ |
|
// Remove item from queue. |
|
_itemProcessQueue.TryRemove(key, out _); |
|
return; |
|
} |
Because this is inside a foreach, return exits the entire method, preventing remaining queued items from being processed during the same run.
This likely should be continue; so only the missing item is skipped.
If the early exit is intentional, clarification in a comment would help.
(Edit: The reason I found this was because sometimes I would have to run the webhook notifier multiple times to deliver all new updates, even when the metadata was populated)
In ItemAddedManager.ProcessItemsAsync (L60), a missing item results in the foreach loop exiting prematurely:
jellyfin-plugin-webhook/Jellyfin.Plugin.Webhook/Notifiers/ItemAddedNotifier/ItemAddedManager.cs
Lines 53 to 61 in d4d6999
Because this is inside a
foreach, return exits the entire method, preventing remaining queued items from being processed during the same run.This likely should be
continue;so only the missing item is skipped.If the early exit is intentional, clarification in a comment would help.
(Edit: The reason I found this was because sometimes I would have to run the webhook notifier multiple times to deliver all new updates, even when the metadata was populated)