@ -311,12 +311,11 @@ public class MetadataRepository(IDbContextFactory<TvContext> dbContextFactory) :
@@ -311,12 +311,11 @@ public class MetadataRepository(IDbContextFactory<TvContext> dbContextFactory) :
public async Task < Unit > RemoveArtwork ( Core . Domain . Metadata metadata , ArtworkKind artworkKind )
{
// this is only used by plex, so only needs to support plex media kinds (movie, show, season, episode, other video)
await using TvContext dbContext = await dbContextFactory . CreateDbContextAsync ( ) ;
return await dbContext . Connection . ExecuteAsync (
@ "DELETE FROM Artwork WHERE ArtworkKind = @ArtworkKind AND (MovieMetadataId = @Id
OR ShowMetadataId = @Id OR SeasonMetadataId = @Id OR EpisodeMetadataId = @Id
OR ArtistMetadataId = @Id OR MusicVideoMetadataId = @Id OR SongMetadataId = @Id
OR OtherVideoMetadataId = @Id OR RemoteStreamMetadataId = @Id ) ",
OR ShowMetadataId = @Id OR SeasonMetadataId = @Id OR EpisodeMetadataId = @Id OR OtherVideoMetadataId = @Id ) ",
new { ArtworkKind = artworkKind , metadata . Id } ) . ToUnit ( ) ;
}