Fix Extra refresh

This commit is contained in:
Shadowghost
2026-02-15 23:13:01 +01:00
parent 3439d3c017
commit ba356638e8
2 changed files with 5 additions and 6 deletions

View File

@@ -3134,13 +3134,12 @@ namespace Emby.Server.Implementations.Library
extra.ExtraType = extraType;
}
// Only set OwnerId if this is actually an extra (not Unknown or null)
// Only return items that are actual extras (have ExtraType set)
// Note: OwnerId and ParentId are set by RefreshExtras, not here,
// so that RefreshExtras can detect when they need updating and set ForceSave.
if (extra.ExtraType is not null)
{
extra.ParentId = Guid.Empty;
extra.OwnerId = owner.Id;
extra.IsInMixedFolder = isInMixedFolder;
return extra;
}

View File

@@ -1432,11 +1432,11 @@ namespace MediaBrowser.Controller.Entities
var subOptions = new MetadataRefreshOptions(options);
if (!i.OwnerId.Equals(ownerId) || !i.ParentId.IsEmpty())
{
i.OwnerId = ownerId;
i.ParentId = Guid.Empty;
subOptions.ForceSave = true;
}
i.OwnerId = ownerId;
i.ParentId = Guid.Empty;
return RefreshMetadataForOwnedItem(i, true, subOptions, cancellationToken);
});