Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
8.06k stars 423 forks source link

Can't add games that don't have an image to automatically cache based on game title. #2607

Closed rabidcopy closed 1 year ago

rabidcopy commented 1 year ago

Describe the bug

Cannot finish setting up a new game in the library if the title of the game does not find an automatic game banner image. Finish will be grayed out.

Add logs

No logs pertaining to this behavior appears in the log tab.

Steps to reproduce

  1. Go to Library
  2. Add a new game
  3. Select its executable
  4. Type in the name of the game
  5. Attempt to click finish
  6. Observe it will immediately become grayed out and unavailable if an image for the game title can't be found.
  7. Additionally, manually setting an image for the game does not resolve this either.

Expected behavior

To be able to add games even if there's no image in the database for them.

Screenshots

image

Applies to trying to edit the title of the game after it's been added as well.

image

Heroic Version

Latest Stable

System Information

Additional information

After a bit of investigation, narrowed it down to this line. https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/48d2787af4079e4365624a38baf1238287d13a62/src/frontend/screens/Library/components/InstallModal/SideloadDialog/index.tsx#L309 Simply removed || searching so the Finish button can be clicked even if it doesn't find an image to use based on the game title. Suggestion is to add a timeout period to searchImage() in the event an image can't be found.

DennyStark commented 1 year ago

I have the same problem. If the poster for the game is not in the database, then I can't complete adding the game. However, if you turn off the connection to the Internet, then the game can be added, but only the poster of this game will not load even after rebooting the steam deck. Moreover, after this problem appeared once, then all subsequent games that 100 percent have a poster cannot be added either. Now I can't add any game at all

flavioislima commented 1 year ago

Well, you can just paste an image link there and it will be fine.

rabidcopy commented 1 year ago

Incorrect, even when manually giving it an image, it doesn't let you click finish as it's still "searching" for an image automatically. image

DennyStark commented 1 year ago

Well, you can just paste an image link there and it will be fine.

I did a hard reset on the steam deck and reinstalled everything, but it has no effect. Now I can't add any game at all. Even those who were before

Phane7 commented 1 year ago

Also having this issue. Temporary workaround is just to add the App/Game without changing the Title at all and then manually edit the title in library.json under sideload_apps. I suggest that you change the WinePrefix when adding it, though, so it'll be something you can recognize in the library.json as well as find later, although I think it should be at the bottom of the library.json if it's the one you just added.

Full path on Steam Deck = ~home/.var/app/com.heroicgameslauncher.hgl/config/heroic/sideload_apps/library.json

DennyStark commented 1 year ago

Also having this issue. Temporary workaround is just to add the App/Game without changing the Title at all and then manually edit the title in library.json under sideload_apps. I suggest that you change the WinePrefix when adding it, though, so it'll be something you can recognize in the library.json as well as find later, although I think it should be at the bottom of the library.json if it's the one you just added.

Full path on Steam Deck = ~home/.var/app/com.heroicgameslauncher.hgl/config/heroic/sideload_apps/library.json

My temporary solution is a bit easier. I turn on airplane mode and then I can edit the name and settings of the game. In this state, the "complete" button is active. After adding the game, I turn off airplane mode and can play. But the game info and the posters still won't load.

Phane7 commented 1 year ago

My temporary solution is a bit easier. I turn on airplane mode and then I can edit the name and settings of the game. In this state, the "complete" button is active. After adding the game, I turn off airplane mode and can play. But the game info and the posters still won't load.

I thought you said that after using that method once that you couldn't add ANY games at all anymore, but maybe your wording was just confusing.

madson007 commented 1 year ago

Just a quick workaround, don't need to turn off internet AND keep the pritty pictures ;)

if you go to https://www.steamgriddb.com and search for your game then find the "grid" image you want and get the URL for that image (you can inspect the source code of the page for that) and paste that in the "App image" field. works like a charm, you can even CHOOSE the image you want :)

most image on heroic get pulled from steamgriddb anyways (according to what my flaptpak version is doing) so just manually providing the image url works just as well

example: For Cult of the Lamb found this one on the website - https://www.steamgriddb.com/grid/201919 that image's source is https://cdn2.steamgriddb.com/file/sgdb-cdn/thumb/d8581dcfb050f8f1773768110b80e9e4.jpg and when i pasted that source URL in the "app image" field, the finish button enabled and i got my icon too!

Screenshot_20230427_120830

UPDATE: If the Finish button is still greyed out after adding the image url manually.

If that still didn't work, try selecting the exe again (for the game setup, not "setup first") but use the browse button to do it

rabidcopy commented 1 year ago

That's a bad example and still not a solution if you paid attention. The problem is for games that don't have images to pull from. Cult of the Lamb has an image. You got the Finish button not because you manually put an image, but because it found an image in the database to use and thus was no longer "Seaching" for an image and blocking the Finish button. Manually putting an image URL for a game that doesn't find an image automatically does not enable the Finish button. It will search until it times out or you cut internet.

ilixxx commented 1 year ago

Sorry, how to apply this fix?

imLinguin commented 1 year ago

If you are not a programmer, then wait for next release or get the build from GitHub actions if you are eager to try it out.

Phane7 commented 1 year ago

With the new release, Heroic can't find App Image for anything anymore.

flavioislima commented 1 year ago

With the new release, Heroic can't find App Image for anything anymore.

Yes, that's no heroic fault, the api stopped working. I will try to host another one in the future.