Skip to content
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

Temporary Poster Background #609

Merged
merged 11 commits into from
Nov 24, 2024
Merged

Temporary Poster Background #609

merged 11 commits into from
Nov 24, 2024

Conversation

bagusnl
Copy link
Member

@bagusnl bagusnl commented Nov 22, 2024

Main Goal

Use poster as temporary background when requested background is not yet downloaded.
New background retrieval mechanism:

  1. Check if background is downloaded
  2. If it's downloaded, then load the downloaded background
  3. If not yet downloaded, load either last available regional background or use poster as background instead

Due to the poster having slight transparency, the switching looks a wee bit janky

This PR also contains IOException fixes especially for background loading and image cache processing (really noticeable when user uses Waifu2X)

PR Status :

  • Overall Status : Done
  • Commits : Done
  • Synced to base (Collapse:main) : Yes
  • Build status : OK
  • Crashing : No
  • Bug found caused by PR : 0

@bagusnl bagusnl added Area: Launcher Issue labeled for Launcher update mechanism Area: UI/UX Issue labeled for User Interface/eXperience related issue Priority: Medium labels Nov 22, 2024
@bagusnl bagusnl requested a review from a team November 22, 2024 15:14
@bagusnl bagusnl self-assigned this Nov 22, 2024
Copy link

github-actions bot commented Nov 22, 2024

Qodana for .NET

2 new problems were found

Inspection name Severity Problems
Redundant using directive 🔶 Warning 2

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Try to unassign read only flag from RunDownloadTask if it gets IODenied error
DO NOT ASK
This reverts commit 7e504b2.
Copy link
Collaborator

@Cryotechnic Cryotechnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the commented code intentional? Otherwise, looks good

CollapseLauncher/Classes/Helper/Image/ImageLoaderHelper.cs Outdated Show resolved Hide resolved

// TODO: Use FallbackCDNUtil to get the sprites
_gamePosterPath = await ImageLoaderHelper.GetCachedSpritesAsync(FallbackCDNUtil.TryGetAbsoluteToRelativeCDNURL(config.ZonePosterURL, "metadata/"), default);
//_gamePosterPath = await ImageLoaderHelper.GetCachedSpritesAsync(FallbackCDNUtil.TryGetAbsoluteToRelativeCDNURL(config.ZonePosterURL, "metadata/"), default);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove if not in use, or uncomment if you commented it for testing

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional as the code might be used again if the local loading method is removed or we want to use different posters for OOBE

@bagusnl bagusnl requested a review from Cryotechnic November 24, 2024 04:31
@bagusnl
Copy link
Member Author

bagusnl commented Nov 24, 2024

Merging as no more review came :sadge:

@bagusnl bagusnl merged commit 7ef4fab into main Nov 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Launcher Issue labeled for Launcher update mechanism Area: UI/UX Issue labeled for User Interface/eXperience related issue Priority: Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants