Skip to content

Add Pause and Resume Support #2

@ishanjain28

Description

@ishanjain28

This feature has to be added in the CLI application.

If an error occurs or user chooses to cancel the active download, It'll create a file with some extension(You can choose any extension you like provided it's short and isn't used by some other huge program) which will have information about,

  1. Number of parts that were active at the time.
  2. URL
  3. The range of bytes that each worker was originally assigned.
  4. The range of bytes that have been downloaded.
  5. The range of bytes that have to be downloaded when program restarts.

When the program is started again, It'll see if there is a file named <file name>.<whatever extension you chose. If such a file exists, It'll read that file and start downloading the bytes which have not been downloaded yet.
And if there is no such file, It should take the given settings as input and start working normally like it does now.

You can use go-bindata to store current state of download or just use a plain JSON.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions