From 056373037e93656134932e86f6e651da1e51c0f0 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Thu, 29 Feb 2024 20:51:39 -0500 Subject: [PATCH] Fix missing ID when detecting intros Co-Authored-By: tibetiroka <68112292+tibetiroka@users.noreply.github.com> --- .../QueueManager.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs index ac28097..30239a4 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs @@ -65,13 +65,15 @@ public class QueueManager } _logger.LogInformation( - "Running enqueue of items in library {Name} ({ItemId})", - folder.Name, - folder.ItemId); + "Running enqueue of items in library {Name}", + folder.Name); try { - QueueLibraryContents(folder.ItemId); + foreach (var location in folder.Locations) + { + QueueLibraryContents(_libraryManager.FindByPath(location, true).Id); + } } catch (Exception ex) { @@ -126,14 +128,14 @@ public class QueueManager } } - private void QueueLibraryContents(string rawId) + private void QueueLibraryContents(Guid id) { _logger.LogDebug("Constructing anonymous internal query"); var query = new InternalItemsQuery() { // Order by series name, season, and then episode number so that status updates are logged in order - ParentId = Guid.Parse(rawId), + ParentId = id, OrderBy = new[] { ("SeriesSortName", SortOrder.Ascending),