Enhance ShowMetadataApplier with logging for poster retrieval failures
Updated the ShowMetadataApplier class to include logging for scenarios where show posters are not retrieved successfully. Introduced logging statements to capture warnings when poster URLs are empty or when downloads fail, improving traceability and debugging capabilities. Additionally, updated related tests to ensure proper logging behavior during poster processing.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using NSubstitute;
|
||||
using TeleWave.Application.Common.Interfaces;
|
||||
using TeleWave.Application.Library.Genres;
|
||||
@@ -62,7 +63,8 @@ public class ImportMoviesTests
|
||||
resolver,
|
||||
Substitute.For<IImageDownloader>(),
|
||||
Substitute.For<IImageStore>(),
|
||||
new GenreMatcher(db)
|
||||
new GenreMatcher(db),
|
||||
NullLogger<ShowMetadataApplier>.Instance
|
||||
);
|
||||
|
||||
var result = await new ImportMoviesCommandHandler(
|
||||
@@ -296,7 +298,8 @@ public class ImportMoviesTests
|
||||
resolver,
|
||||
Substitute.For<IImageDownloader>(),
|
||||
Substitute.For<IImageStore>(),
|
||||
new GenreMatcher(db)
|
||||
new GenreMatcher(db),
|
||||
NullLogger<ShowMetadataApplier>.Instance
|
||||
);
|
||||
var result = await new AutoAttachMovieCommandHandler(
|
||||
db,
|
||||
@@ -346,7 +349,8 @@ public class ImportMoviesTests
|
||||
resolver,
|
||||
Substitute.For<IImageDownloader>(),
|
||||
Substitute.For<IImageStore>(),
|
||||
new GenreMatcher(db)
|
||||
new GenreMatcher(db),
|
||||
NullLogger<ShowMetadataApplier>.Instance
|
||||
);
|
||||
|
||||
var result = await new AutoAttachMovieCommandHandler(
|
||||
|
||||
Reference in New Issue
Block a user