-
Notifications
You must be signed in to change notification settings - Fork 384
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
Error correction for adding repos to marketplace #229
base: main
Are you sure you want to change the base?
Conversation
Ooh I like this |
I'll review in the morning |
This is good in concept however some people won't be hosting repos on GitHub, this PR seems to assume any repo not starting with rawgithubusercontent is wrong which isn't necessarily true, a notable example being https://games.anura.pro/list.json. could you fix this to explicitly detect https://GitHub.com and then fix it instead of detecting the absence of rawgithubusercontent? |
Ah ok my bad. I'll fix it. |
Should be fixed, though I couldn't get https://games.anura.pro/ working though it's not a conflict arising from the error correction since it doesn't give any messages that it would give if it was the error correction. |
Why is it trying to load manifest.json? anura games is in the legacy format, it should only load list.json |
Also, consider utilizing the Url constructor instead of manual string manipulation, just a suggestion :D |
The addRepo code will automatically try to find a manifest.json for any repo that is entered, even if you add the list.json at the end of it. The good thing is the repo is already added before load which I think bypasses the whole checking for the manifest.json file. Two ways to fix this issue would either be to add backwards compatibilty in the addRepo code, or just update the games.anura.pro repo. |
Backwards compatibility is already implemented for anura repositories, see Marketplace | Anura Games @ https://anura.pro |
I meant that when you add repositories, the code always checks for a manifest.json. The backwards compatibility would be need added there. |
I added backward compatibility for older repos when adding them to the marketplace. |
Adding repos to the marketplace might be a bit confusing for the first time. Some people may try to add the repo directly like github.com/MercuryWorkshop/anura-repo/ instead of https://raw.githubusercontent.com/MercuryWorkshop/anura-repo/master/. This adds some error correction like adding https:// to the beginning if it doesn't have it, fixing the link if it is github.com to raw.githubusercontent.com and adding to the end of the link /master/. It also adds backward compatibility when adding older repos to the marketplace.