Fase 3b: de Hero bewaart zijn foto's in de bibliotheektabel (schakelaar uit), HeroImages blijft een kopie, controle bij het opstarten, FK-migratie met Down
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,10 +114,22 @@ public class HeroImageService(
|
||||
TimeProvider? time = null,
|
||||
IIndexHtmlCache? indexCache = null,
|
||||
HeroRenderSignal? signal = null,
|
||||
IMediaLibrarySync? librarySync = null) : IHeroImageService
|
||||
IMediaLibrarySync? librarySync = null,
|
||||
IHeroLegacyImageMirror? legacyMirror = null) : IHeroImageService
|
||||
{
|
||||
/// <summary>Mirrors the hero into the media library's tables (write-through, off unless switched on). Never throws.</summary>
|
||||
private Task SyncLibraryAsync() => librarySync?.SyncAsync(HeroMapping.Area, CancellationToken.None) ?? Task.CompletedTask;
|
||||
private async Task SyncLibraryAsync()
|
||||
{
|
||||
if (legacyMirror is not null)
|
||||
{
|
||||
await legacyMirror.SyncAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
if (librarySync is not null)
|
||||
{
|
||||
await librarySync.SyncAsync(HeroMapping.Area, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
|
||||
private readonly TimeProvider _time = time ?? TimeProvider.System;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user