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

Add Named_Logos #17216

Merged
merged 5 commits into from
Dec 21, 2024
Merged

Add Named_Logos #17216

merged 5 commits into from
Dec 21, 2024

Conversation

zach-morris
Copy link
Contributor

@zach-morris zach-morris commented Nov 27, 2024

Guidelines

  1. Rebase before opening a pull request
  2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
  3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises

Description

Add Named Logos as another thumbnail/image type to the rest of the RA codebase. This is a follow on to #16758

Also note that Named_Logos assets have been added in libretro-thumbnails (currently for just one repository), for testing. This change will include those assets in the download, thumbnail folder generation locally, etc. Kind of a chicken/egg situation on whether this change be included first, or the assets be included first.

Tested qt (see below)

msg hashes for other languages weren't touched for this (just us/en), not sure if those are automatically generated or not

Related Issues

N/A

Related Pull Requests

#16758

Reviewers

[If possible @mention all the people that should review your pull request]

@RobLoach
Copy link
Member

RobLoach commented Nov 27, 2024

Was able to load up the Desktop UI, and see the Logo tab in Qt. Needed zach-morris#1 to allow selecting the content logo in the Settings though.

Screenshot from 2024-11-27 01-06-39

Screenshot from 2024-11-27 01-20-11

@zach-morris zach-morris changed the title Draft: Add Named_Logos Add Named_Logos Nov 28, 2024
@zach-morris
Copy link
Contributor Author

zach-morris commented Nov 30, 2024

OK, finally got it to locally compile. Tested on Winx64 and seems to work just fine. Logos download as expected from the thumbnail repository:

[INFO] [Thumbnail]: Download "C:\tools\RetroArch-Win64\thumbnails\Nintendo - Super Nintendo Entertainment System\Named_Logos\Super Mario Kart (USA).png".
[INFO] [Thumbnail]: Download "C:\tools\RetroArch-Win64\thumbnails\Nintendo - Super Nintendo Entertainment System\Named_Logos\Super Mario All-Stars (USA).png".
[INFO] [Thumbnail]: Download "C:\tools\RetroArch-Win64\thumbnails\Nintendo - Super Nintendo Entertainment System\Named_Logos\ActRaiser (USA).png".

Logo can be selected in the playlist settings:
Capture2

Logo displays in the playlist:
Capture

Capture3 Capture4

@RobLoach
Copy link
Member

In your Ozone screenshot, why doesn't the Super Mario Kart alpha channel work on the left?

@zach-morris
Copy link
Contributor Author

In your Ozone screenshot, why doesn't the Super Mario Kart alpha channel work on the left?

Yeah, i noticed that too. I'm not sure honestly. I assume the glui driver, the one that shows that, doesn't support it for some reason? Just to verify, i puth an alpha channel image in place for the boxart and title, and it does the same thing.

Copy link
Member

@RobLoach RobLoach left a comment

Choose a reason for hiding this comment

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

Seems good to me. Can't speak much for an in-depth code review though.

@LibretroAdmin LibretroAdmin merged commit b16f04d into libretro:master Dec 21, 2024
27 checks passed
@LibretroAdmin
Copy link
Contributor

I think it's a mistake to fetch logos now on top as well on top of Named_Boxarts, Named_Snaps and Named_Titles.

All of this is far too much traffic and bandwidth for our server to handle, and not only that, but our thumbnail scraping and underlying code cannot handle all these failed fetch requests when these named_logos don't exist. So it can actually bog down and cause instability in the program.

I'm going to find a way to selectively fetch these extra things instead of just auto trying to fetch all of this stuff. Trying to fetch all this stuff all the time is just a recipe for disaster.

@LibretroAdmin
Copy link
Contributor

In fact I'm going to just disable fetching logos altogether until this stuff is actually added to the thumbnails and it doesn't 404 fail to fetch smth for 99% of all games.

@zach-morris
Copy link
Contributor Author

I think it's a mistake to fetch logos now on top as well on top of Named_Boxarts, Named_Snaps and Named_Titles.

All of this is far too much traffic and bandwidth for our server to handle, and not only that, but our thumbnail scraping and underlying code cannot handle all these failed fetch requests when these named_logos don't exist. So it can actually bog down and cause instability in the program.

I'm going to find a way to selectively fetch these extra things instead of just auto trying to fetch all of this stuff. Trying to fetch all this stuff all the time is just a recipe for disaster.

This makes sense. Perhaps if there was an 'images' rdb, and the url or existance of the image was stored in that, avoiding pinging the server ever if the image wasn't in the rdb.

@RobLoach
Copy link
Member

Once the cron is set up, there will be .index files that we could leverage to determine which images exist:
https://github.com/libretro-thumbnails/libretro-thumbnails?tab=readme-ov-file#index-files

RetroArch could download the .index file, and see which ones it could bring down.

@zach-morris
Copy link
Contributor Author

zach-morris commented Dec 23, 2024

Once the cron is set up, there will be .index files that we could leverage to determine which images exist: https://github.com/libretro-thumbnails/libretro-thumbnails?tab=readme-ov-file#index-files

RetroArch could download the .index file, and see which ones it could bring down.

Even better. I totally forgot about that.

Sunderland93 pushed a commit to Sunderland93/RetroArch that referenced this pull request Dec 26, 2024
* Draft:  Add Named_Logos

* Allow selecting Content Logo as a thumbnail display

* Increase pl_thumbnail_download index

to 4 to match the 4 available thumb types

---------

Co-authored-by: Rob Loach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants