Corrects media library cover storage internal path

This commit is contained in:
BinaryAlley committed 2025-01-12 10:38:38 +02:00
1 parent ecc332a91a
commit 5a2919f89a
3 files changed
+7 -3

No files matched your search

@@ -192,7 +192,11 @@ public class LibrarySavedDomainEventHandler : INotificationHandler<LibrarySavedD
if (renameFileResult.IsError)
return renameFileResult.Errors;
return $"cover.{imageCheckResult.Value.ToString().ToLower()}";
// get the internal relative path for the copied file
string relativePath = renameFileResult.Value.Path[AppContext.BaseDirectory.Length..];
if (!relativePath.StartsWith(_pathService.PathSeparator))
relativePath = $"{_pathService.PathSeparator}{relativePath}";
return relativePath;
}
/// <summary>