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

Size length, resuming download, Range header support #7

Merged
merged 8 commits into from
May 16, 2021

Conversation

ysfchn
Copy link
Owner

@ysfchn ysfchn commented May 11, 2021

This PR adds some notable changes.

End-user

  • File size support
    When downloading the firmware, SamFetch now sends the max file size, so when downloading the firmware with download clients or with browser, it will now display a progress bar and a percent.

    Old New
    image image
  • Resuming download
    Now pausing and resuming download won't re-download the same file again from zero.

Internal

  • The Keyholder class has replaced with new Session class along with read-only properties for values that should not be changed.

  • CSC list is now served in a Python file instead of a separate JSON file.

  • All endpoints are marked as asynchronous.

  • Reading the incoming data from Kies servers has moved into a KiesData class, now it is more easy to get a value from data.
    Instead of writing like this: data["FUSMsg"]["FUSBody"]["Put"]["DEVICE_MODEL_DISPLAYNAME"]["Data"]
    It can be typed as: KiesData.body["DEVICE_MODEL_DISPLAYNAME"]

  • /api/binary endpoint now handles Range headers (both start-end) and returns Content-Range header.


Closes #5 and #4

@ysfchn ysfchn self-assigned this May 11, 2021
@ysfchn ysfchn added the enhancement New feature or request label May 11, 2021
@ysfchn ysfchn linked an issue May 11, 2021 that may be closed by this pull request
@ysfchn ysfchn changed the title Size length, resuming download, replace Keyholder with Session Size length, resuming download, Range header support May 15, 2021
@ysfchn ysfchn temporarily deployed to samfetchgithub May 15, 2021 14:15 Inactive
@ysfchn ysfchn marked this pull request as ready for review May 16, 2021 13:24
@ysfchn ysfchn merged commit 24e276f into main May 16, 2021
@ysfchn ysfchn deleted the feature/eta-resume branch May 16, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add file size support [Feature Request] Add resume support
1 participant