EmuDeck / Emuchievements

Plugin for viewing RetroAchievements progress. Part of the EmuDeck Project
GNU General Public License v3.0
29 stars 5 forks source link

Use RetroAchievements Api-lib directly #19

Closed jangerhard closed 5 months ago

jangerhard commented 10 months ago

Removes own implementation of objects, as well as removing a fateful, recursive retry-strategy I am assuming is the cause for infinite loads when a game does not exist on RetroAchievements.

I also took the liberty of refactoring the code slightly, but hopefully the PR itself is readable.

jangerhard commented 10 months ago

Just might have noticed a bug: I'm only displaying achievements that are earned.

I've been unable to test locally or on my deck, so I'm shooting in the dark.

KP2048 commented 10 months ago

Well, it looks great, but I'm going to hold off merging because the retroachievements api is down for maintenance so I can't test. As for the infinite loading, I had that recursive retry thing because the api was somewhat unreliable and would randomly return an error occasionally, so I don't think it's the cause of the infinite loading, that would be that the api is down.

jangerhard commented 10 months ago

Understood! Maybe we can add a timeout-handler, or a retry-function that returns an error after 3 failures 👍🏻

KP2048 commented 10 months ago

Yeah, that sounds good, but the retry thing definitely needs to stay

KP2048 commented 10 months ago

Everything else looks good, so I'll merge once that's back

mrosenbergtech commented 8 months ago

Is the API still down? Curious if this will fix the broken plugin...

KP2048 commented 8 months ago

Api is still down. Well, everything is up except for the endpoint I need lol.

Anahkiasen commented 6 months ago

@Witherking25 API is back up now

mrosenbergtech commented 6 months ago

@Witherking25 @jangerhard - have y'all been able to verify the API is up? Curious what we can do to get this working again!

wescopeland commented 6 months ago

Hi! I am the author/maintainer of @retroachievements/api. Is there anything I can do to assist?

mrosenbergtech commented 6 months ago

Hi! I am the author/maintainer of @retroachievements/api. Is there anything I can do to assist?

I would love to better understand the issues here as well. It seems the plugin gets hung on "FETCHING 0/141" on my end on the 2.0.2 version of the plugin. From your end @wescopeland can you see any issues with the way the API is used in this fork or @Witherking25's?

I have never built a plugin before but I'd be curious if I built this branch from source if it would work since this fork should be using the updated API.

KP2048 commented 6 months ago

I think it would work either way, but this needs to be rebased onto master for it to be merged

KP2048 commented 6 months ago

I recently fixed some issues that @wescopeland brought up over discord that won't be in this fork yet, so right now mine will be more perfomant

mrosenbergtech commented 6 months ago

Which branch of whose repo works currently? Anything on the decky store seems to land with the same FETCHING hang.

I'll try and build the plugin if I can figure this out.

KP2048 commented 5 months ago

I'm also pretty sure this won't work because of CORS, and it seems like you won't fix the merge conflicts so just gonna close it

KP2048 commented 5 months ago

I am going to switch over to the official types though. @wescopeland it would be pretty great if you added cors headers for requests from steamloopback.host, that way I can just use the js library because vanilla fetch will work just fine. Right now I have to do the requests from the python side, and as a result I can't use the functions provided by the official js library.