Open alecchen opened 1 year ago
I don't think this will work for non-Steam games.
I don't think this will work for non-Steam games.
I can maybe try to incorporate this code to try this explicitly for steam games. I appreciate the contribution. I will credit you if/when I make the change
@alecchen Hi As far as I'm aware this is the current active repo https://github.com/SDH-Stewardship/hltb-for-deck
First at all, I don't have any experience in web development/typescript/React. I did my best searching on Stackoverflow and google then modifying the source code based on the original hltb-for-deck, so please feel free to reject or modify my changes.
I found the non-english game title will become a empty string after applying normalize function, and it leads the result always points to "https://howlongtobeat.com/game/95647". So instead I using steam api "http://store.steampowered.com/api/appdetails?appids={APP_ID}" to get json information and parsing the english game title, and then pass it to useHtlb.
Tested languages: Traditional Chinese, Korean, Japanese, Spanish and Russian. All of them work as expected. Tested steam item: 'Hogwarts Legacy' 990080 , 'Paradise Killer' 1160220, 'Detention' 555220, 'Black Desert' 1258320
During the testing, found steam id 1258320 didn't get correct hltb record, which was due to the item is no longer available on steam and there's a '(retire)' after the game title. Modify the normalize function in src/utils.ts to remove '(retire)' string.
Hogwarts Legacy
Paradise Killer