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
Fix backdrop image fetching to prioritize non-language images #8982
Fix backdrop image fetching to prioritize non-language images #8982
Conversation
c164f8c
to
fa673b6
Compare
fa673b6
to
d639d35
Compare
I think a better change for this is to update - foreach (var image in images.Where(i => i.Type == imageType))
+ foreach (var image in images.OrderBy(i => string.IsNullOrWhiteSpace(i.Language)).Where(i => i.Type == imageType)) |
My concern with that change is that it binds |
Ok, I would still change the sort method to what I suggested |
Ah! So the intent behind I'm unclear if C# ordering with |
Context
#8946 accidentally introduced a side effect of all backdrop images preferring the explicit language of the library. The purpose of backdrop images should actually deprioritize language.
We could additionally modify
OrderByLanguageDescending
, but how this gets used with both manual image searches and during metadata refresh makes it a little slippery to refactor properly. The proposed solution here is fairly simple and gets us the behaviour we're looking for.Changes
Image sorting prioritizes non-language images for backdrop metadata refreshes.