fix(home): resolve missing library images in Multi-Server Libraries#505
Merged
RadicalMuffinMan merged 1 commit intoJun 12, 2026
Conversation
…lti-server My Media row - Remove forced alphabetical sorting in getAggregatedLibraries to preserve the server-defined custom ordering. - Add primaryImageAspectRatio to AggregatedLibrary and parse it from Jellyfin/Emby UserViews API. - Update getAggregatedLibraryTiles to forward primaryImageAspectRatio to the home screen item. - Modify the poster aspect ratio check on the home screen to permit library poster images when PrimaryImageAspectRatio is null.
Contributor
Author
|
Just confirmed - the sorting removal is actually necessary because keeping it overrides the custom library order set on the server, which differs from the single-server behavior (keeping those lines puts them in alpha order). This should be good to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
This PR fixes a visual bug that occurs on the home screen "My Media" row when "Multi-Server Libraries" is enabled - library poster images failed to load, leaving library cards as blank gradient placeholders.
Related Issues
Link related issues or tickets separated by commas.
Type of Change
Changes Made
Data Model: Added a primaryImageAspectRatio field to the AggregatedLibrary model.
Repository Parsing: Updated user_views_repository.dart and multi_server_repository.dart to parse PrimaryImageAspectRatio from raw data and pass it to AggregatedLibrary.
Item Mapping: Modified getAggregatedLibraryTiles in multi_server_repository.dart to copy PrimaryImageAspectRatio to AggregatedItem's rawData map.
UI Logic: Adjusted the aspect ratio validation inside _resolveRowImageUrl in home_screen.dart from if (primaryAr == null || primaryAr >= 1.0) to if (primaryAr != null && primaryAr >= 1.0). This ensures that library items without a pre-computed aspect ratio returned by the server (which default to null on the /UserViews endpoint) can still resolve and render their poster art.
Platform
Testing
Describe how this change was tested.
Test Steps
Screenshots (if applicable)
Checklist