fix: pre-roll/feature pre-roll bumpers not found in library (v1.0.0.8)
All checks were successful
Publish Release / release (push) Successful in 8s
All checks were successful
Publish Release / release (push) Successful in 8s
TopParentIds-based queries could fail to match Movie items in the configured pre-roll library even when they appear correctly in the Jellyfin UI. Look up the library Folder by ID and walk its recursive children directly instead, matching the path-based approach already used for the trailer pool.
This commit is contained in:
@@ -193,13 +193,16 @@ namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services
|
||||
return null;
|
||||
}
|
||||
|
||||
var movies = _libraryManager
|
||||
.GetItemList(new InternalItemsQuery
|
||||
{
|
||||
IncludeItemTypes = new[] { BaseItemKind.Movie },
|
||||
TopParentIds = new[] { parsedId },
|
||||
Recursive = true,
|
||||
})
|
||||
if (_libraryManager.GetItemById(parsedId) is not Folder folder)
|
||||
{
|
||||
_logger.LogWarning(
|
||||
"|CinemaTrailers4Jellyfins| {Label} library {LibraryId} could not be found.",
|
||||
label,
|
||||
parsedId);
|
||||
return null;
|
||||
}
|
||||
|
||||
var movies = folder.GetRecursiveChildren()
|
||||
.OfType<Movie>()
|
||||
.Where(m => m.Id != excludeId)
|
||||
.ToList();
|
||||
|
||||
Reference in New Issue
Block a user