Skip to content

Fix issues with fetching updates of Unity versions by using the new Api #167

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

Merged
merged 6 commits into from
Oct 16, 2024

Conversation

Legi428
Copy link
Contributor

@Legi428 Legi428 commented Sep 30, 2024

Hey! :)

This is my first pull request so I'm not sure if I did everything correctly. I'd be happy to adjust any comments you might have.

So this pull request changes a few things. I'll try to summarize them here:

  • Rewrite GetUnityUpdates to use the new Api.
  • The rewrite respects the usage limit (10 requests per second)
  • I added model classes for the big api fetch to make the system a bit more robust
  • This change introduced the usage of System.Text.Json though
  • I included a cached version of the current full list
  • This cached version is updated whenever the program fetches a version not yet seen
  • I added a new filter for Tech releases (There's an enum in the Api fetch for Tech, LTS, Alpha, Beta so I figured I just add that)
  • The radio buttons are now a StackPanel which makes it easier for them to be spaced evenly as well as position anywhere

I removed a bunch of code that has gotten redundand or wasn't used anymore.

@unitycoder
Copy link
Owner

thanks! i'll have a look

@unitycoder
Copy link
Owner

unitycoder commented Oct 4, 2024

Testing it for few days, just to get a feel for it : )

One modification could be nice:
for downloads, can still grab the assistant (even though its not listed on unity releases API)
https://download.unity3d.com/download_unity/4dae1bb8668d/UnityDownloadAssistant-2022.3.49f1.exe

That makes installing easier, while it still works (as they are planning to remove it).
So when user clicks download buttons,
it would try to download assistant, if not available, then have to download that editor installer:
https://download.unity3d.com/download_unity/4dae1bb8668d/Windows64EditorInstaller/UnitySetup64-2022.3.49f1.exe

notes:

  • Download and install button hangs (probably since its downloading that bigger installer)

@Legi428
Copy link
Contributor Author

Legi428 commented Oct 5, 2024

Testing it for few days, just to get a feel for it : )

One modification could be nice: for downloads, can still grab the assistant (even though its not listed on unity releases API) https://download.unity3d.com/download_unity/4dae1bb8668d/UnityDownloadAssistant-2022.3.49f1.exe

That makes installing easier, while it still works (as they are planning to remove it). So when user clicks download buttons, it would try to download assistant, if not available, then have to download that editor installer: https://download.unity3d.com/download_unity/4dae1bb8668d/Windows64EditorInstaller/UnitySetup64-2022.3.49f1.exe

notes:

* Download and install button hangs (probably since its downloading that bigger installer)

Thank you for your quick reply and looking at it! :)
I have added a progress window that also allows the user to cancel any downloads that take too long and it also doesn't make the program appear frozen.
I've attached a screenshot of what it looks like. I tried to make it use the styling that is already present.
I also made it so that the download assistant is downloaded by default and the big download is only a fallback.

@unitycoder
Copy link
Owner

thanks for the updates, ill keep using it for a while again!

@unitycoder
Copy link
Owner

Looks good to me, i'll merge it soon!

@Legi428
Copy link
Contributor Author

Legi428 commented Oct 12, 2024

That's great, thank you for the suggestions. They made it really nice to use. I'm glad you like my changes. Cheers!

@unitycoder unitycoder merged commit 11c9ffc into unitycoder:master Oct 16, 2024
1 check passed
@unitycoder
Copy link
Owner

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants