Skip to content
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

Course downloads should use Protobuf format #88

Open
Tarnadas opened this issue Jan 12, 2018 · 3 comments
Open

Course downloads should use Protobuf format #88

Tarnadas opened this issue Jan 12, 2018 · 3 comments

Comments

@Tarnadas
Copy link

Tarnadas commented Jan 12, 2018

The zip download format is only meant as a fallback for browsers, because you cannot use the cemu-smm library on client side.

The protobuf requests will decrease server load by a HUGE amount.

cemu-smm has functions to easily handle the Protobuf format:

import { deserialize, loadSave } from 'cemu-smm';

(async () => {
  const requestedData = /* make your request here */
  const course = await deserialize(requestedData)
  const save = await loadSave(/* path to save */)
  await save.addCourse(course)
})()
@jonbarrow
Copy link
Owner

Thank you for bringing this to my attention! I will make these changes right away.

@Tarnadas
Copy link
Author

Ty!

I will implement a HTTP 429 error response on the backend, if the user will make too many requests for zip files. It is honestly rather a backend issue. I was just too lazy to edit the way zip downloads work

@Tarnadas
Copy link
Author

Please also keep in mind, that cemu-smm has been updated to 3.x

Some API calls have changed

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

No branches or pull requests

2 participants