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

Implement download queueing #657

Open
nukeop opened this issue Feb 21, 2020 · 17 comments
Open

Implement download queueing #657

nukeop opened this issue Feb 21, 2020 · 17 comments

Comments

@nukeop
Copy link
Owner

@nukeop nukeop commented Feb 21, 2020

Currently, every track added to downloads immediately starts downloading. Downloads are therefore behaving inconsistently, are not saved over program restarts, and can fail randomly without properly notifying the user. The following improvements are proposed:

  • Store the list of downloads in db/on disk somewhere. The main process will manage this list.
  • Allow the renderer process to query the main process for the list of downloads and their status.
  • Download tracks one at a time (potentially configurable). Indicate errors. Allow retries, just like any modern browser. Retry interrupted downloads over program restarts.
  • (optional) Add convenience features - popup with a list of recently added downloads and their statuses, button to open downloads folder, button to clear downloads list. Display an error toast when a download fails.
@mahendraHegde
Copy link
Contributor

@mahendraHegde mahendraHegde commented Feb 22, 2020

@nukeop I'd like to work on it.

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Feb 22, 2020

Ok, as this is a big feature, pick one of the things on the list first and let's iterate on it together.

@mahendraHegde
Copy link
Contributor

@mahendraHegde mahendraHegde commented Feb 22, 2020

I'll start with Store the list of downloads in db/on disk somewhere. The main process will manage this list. I'm new to nuclear code base so can you guide me from where should I start.

@mahendraHegde
Copy link
Contributor

@mahendraHegde mahendraHegde commented Feb 22, 2020

I'm planning to store downloads as Plain array of download items in store and modify as per actions . and load to downloads state on app load.

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Feb 22, 2020

Ok, you can use electron-store and create a separate file for the download queue.

@mahendraHegde
Copy link
Contributor

@mahendraHegde mahendraHegde commented Feb 23, 2020

Retry interrupted downloads over program restarts

it seems not possible to resume downloads over app restart, since DownloadItem returned by the downloader onStart callback is an eventEmmiter and cannot be stored(restart download facility can be provided).

we can also add pause and resume downloads feature which will resume downloads if possible or restarts(over app restarts)

I've started here #658
please provide your reviews.
@nukeop

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Feb 23, 2020

it seems not possible to resume downloads over app restart, since DownloadItem returned by the downloader onStart callback is an eventEmmiter and cannot be stored(restart download facility can be provided).

What we can do is store the status (completed/incomplete/error), and start over on restart, deleting the incomplete download first.

@mahendraHegde
Copy link
Contributor

@mahendraHegde mahendraHegde commented Feb 24, 2020

should we auto start those downloads(Error/incomplete) or should we provide a resume retry icon so that user can retry them whenever he wants.

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Feb 24, 2020

Browsers wait for manual restart, so I think we should also follow that pattern.

@mahendraHegde
Copy link
Contributor

@mahendraHegde mahendraHegde commented Mar 4, 2020

@nukeop I'm working on this
Download tracks one at a time (potentially configurable). Indicate errors. Allow retries, just like any modern browser. Retry interrupted downloads over program restarts.

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Mar 4, 2020

Great, this will be a very useful next step.

@alizeh12
Copy link

@alizeh12 alizeh12 commented Apr 3, 2020

Hi, I would like to work on this with my partner @nfeygin if possible

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Apr 4, 2020

Ok, let me review this and I'll tell you what parts of this haven't been worked on yet.

@alizeh12
Copy link

@alizeh12 alizeh12 commented Apr 6, 2020

sure

@alizeh12
Copy link

@alizeh12 alizeh12 commented Apr 21, 2020

Hi nukeop, were you able to review the code? can you let me know asap so I can try working on this

@alizeh12
Copy link

@alizeh12 alizeh12 commented Apr 21, 2020

@nukeop can you also let me know how to open the app in developer mode

@nukeop
Copy link
Owner Author

@nukeop nukeop commented Apr 21, 2020

Sorry, I forgot about this.
The next most useful thing to implement would be the last step in the original post in this thread. All of the features in it can be implemented separately, one at a time, or all at once.

The development process is explained here: https://github.com/nukeop/nuclear#development-process

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.