New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tests, Fix metadata refresh deletes backgrounds #6752
Add Tests, Fix metadata refresh deletes backgrounds #6752
Conversation
Fix failing test: Invalid background images not purged by validate Fixes jellyfin#6310: Background images only delete when using "Replace existing images" when new image(s) is found to replace them
// Create a class that implements IHasScreenshots for testing since no BaseItem class is also IHasScreenshots | ||
private class MovieWithScreenshots : Movie, IHasScreenshots | ||
{ | ||
// No contents | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now the only class in my workspace that is a BaseItem
that implements IHasScreenshots
.
Assuming it's not used in some other plugin that I don't have checked out, should either the handling for IHasScreenshots
be removed or the interface itself be removed as unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't remove the interface, we never know if there is a plugin that implements it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with removing it, AFAIK it was only used by the Game
item type https://github.com/MediaBrowser/Emby.Common/blob/6ef8705ed609666555894c698dfc140fd8314831/MediaBrowser.Controller/Entities/Game.cs#L12
a97b48b
to
b478b11
Compare
…h-deletes-backgrounds
Changes
ItemImageProvider
BaseItem.ValidateImages
method up front instead of validating images piecemeal throughout the add/update handling.Issues
Fixes #6310