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

Downloading multiple files #26

Closed
gielcobben opened this issue Aug 25, 2017 · 3 comments
Closed

Downloading multiple files #26

gielcobben opened this issue Aug 25, 2017 · 3 comments

Comments

@gielcobben
Copy link

gielcobben commented Aug 25, 2017

Hello, I try to use this package for downloading multiple files. I send the ipc download-subtitle multiple times but electron downloads just 1 (of 4 files, for example).

Renderer:

ipcRenderer.send("download-subtitle", { file, subtitle });

Main:

  ipcMain.on("download-subtitle", async (event, args) => {
    const downloadLocation = path.dirname(args.file.path);
    const filename = args.file.name.replace(/\.[^/.]+$/, "");
    const options = {
      saveAs: false,
      directory: downloadLocation,
      filename: `${filename}.srt`
    };
    const dl = await download(mainWindow, args.subtitle.url, options);
    console.log(dl.getSavePath());
  });
@abmagil
Copy link

abmagil commented Dec 21, 2017

@gielcobben Did you find a solution or did it just start working?

@ribsies
Copy link

ribsies commented May 25, 2018

@gielcobben @abmagil Was there ever a solution for this? Running into this issue now. The multiple downloads all overwrite eachother and only keep the last filename.

@ryankashi
Copy link

Any updates on this? I am running into the same issue

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

4 participants