hulkrelax / hltb-for-deck

A plugin to show you game lengths according to How Long To Beat
MIT License
48 stars 15 forks source link

Titles with special characters not matching #9

Open seanhoyt opened 1 year ago

seanhoyt commented 1 year ago

It may be my imagination, but titles with special characters like ® (reg) and possibly other special characters won't match in HLTB. I'm seeing this with Titan Fall 2 and Tetris Effect: Connected.

hulkrelax commented 1 year ago

Yeah it's a bit of a mixed bag. I have to normalize the data on the steam side and sometimes that can cause issues. I try to remove special characters as part of the normalization process but there could be some issues. HLTB unfortunately doesn't have the best API (considering it's not obligated to) so I'm limited in my options. I'll try to look into it this weekend if I have some time.

seanhoyt commented 1 year ago

Does the HLTB API not support using the Steam App ID?

hulkrelax commented 1 year ago

The steam app id is in the api results but the search endpoint doesn't support searching by steam app id. I use the steam app id to do exact matches when found in the search results, but to initiate a search I have to use the game name You know how in HLTB you search for a game? I'm using the same endpoint that uses because it's the only endpoint available that I could find when I developed this plugin.

hulkrelax commented 1 year ago

HLTB isn't an open platform so they don't really have an endpoint designed for third parties. They aren't obligated to do that for anyone.

woj-tek commented 1 year ago

Was just playing with hltb-for-deck and noticed that LEGO games are not working... and it's the same issue due to ® in the name :-)

elkinjosetm commented 1 year ago

I'm having this issue with Star Wars Jedi Fallen order, but on top of having an special character, I use my steam deck in Spanish, and for this particular game the "displayName" is slightly different due to the translation, so I wonder if this issue could actually be fixed by requesting the game info using the steamId with steam api, and then when you have the "original name" to use that text to try to match with the HLTB search endpoint you use.

elkinjosetm commented 1 year ago

Another alternative is to allow users try to manually match the game by implementing a search UI for HLTB, and letting users select from the result the game.

Similar to what SteamGridDB does, where they allow you to search/filter games and choose the image you want to use.

hulkrelax commented 1 year ago

I think I have fixed this for the most part. Special characters should get properly normalized now. I've tested this with games like Fallen Order as well as the Lego games (which has the reserve mark) and they stats show up now. Be on the lookout for 1.2.3 soonish

anatolevuc commented 1 year ago

Still no match for Total War: Rome II. And Arkham Origins: Blackgate.

They are named differently in steam. Total War: Rome II: Emperor Edition and Arkham Origins: Blackgate deluxe

elkinjosetm commented 1 year ago

Same here for Star Wars: Jedi Fallen Order in Spanish

hulkrelax commented 1 year ago

The "editions" are not surprising. Steam stores the game name as that so when searching by the name, HLTB returns no results. This bug fix addressed special characters, not where the game is "Special Edition" or "Ultimate Edition" or whatever. That is an issue I don't have a solution for at the moment because steam stores the game name as such and not just "Crysis 2" for example, it's stored as "Crysis 2 Maximum Edition" or whatever it is.

hulkrelax commented 1 year ago

Same here for Star Wars: Jedi Fallen Order in Spanish

Could you elaborate here? There is a Spanish version of the game?

elkinjosetm commented 1 year ago

Yes, since I use my Steam Deck (and Steam account) in Spanish, some games does have a different name, essentially the translation to whatever language.

Worth mentioning that not all games are the same, and in fact, personally I would like to have the original name instead, Steam doesn't let me choose/change the name.

That's why I suggested before if it was possible to implement a search to manually match the games, kinda like the SteamGridDB plugin does, where it let you search/filter by name and let you choose the asset you want to use, but for this plugin it would be more to fix the matching issue. That would even "fix" the issue with special characters you might find on some game names.

anatolevuc commented 1 year ago

Yes, since I use my Steam Deck (and Steam account) in Spanish, some games does have a different name, essentially the translation to whatever language.

Worth mentioning that not all games are the same, and in fact, personally I would like to have the original name instead, Steam doesn't let me choose/change the name.

That's why I suggested before if it was possible to implement a search to manually match the games, kinda like the SteamGridDB plugin does, where it let you search/filter by name and let you choose the asset you want to use, but for this plugin it would be more to fix the matching issue. That would even "fix" the issue with special characters you might find on some game names.

Same for russian. For example Hogwarts Legacy called "Хогвартс. Наследие". Therefore no match

alecchen commented 1 year ago

Yes, since I use my Steam Deck (and Steam account) in Spanish, some games does have a different name, essentially the translation to whatever language. Worth mentioning that not all games are the same, and in fact, personally I would like to have the original name instead, Steam doesn't let me choose/change the name. That's why I suggested before if it was possible to implement a search to manually match the games, kinda like the SteamGridDB plugin does, where it let you search/filter by name and let you choose the asset you want to use, but for this plugin it would be more to fix the matching issue. That would even "fix" the issue with special characters you might find on some game names.

Same for russian. For example Hogwarts Legacy called "Хогвартс. Наследие". Therefore no match

I did some changes in #20 and it seems fixed the issue for non-english game title.

Seraphli commented 1 year ago

I have this problem with the game "Beyond: Two Souls"