Giter Site home page Giter Site logo

Comments (3)

781flyingdutchman avatar 781flyingdutchman commented on August 11, 2024

Yes, I think I can add that along with pause/resume functionality that I'm working on. Until then:

   for (var task in tasks) {
     FileDownloader().download(task, 
          onStatus: (status) {...},
          onProgress: (progress) {...}
     );
   }

might do the trick for a list of tasks. Just don't await the download call and keep track of batch completion yourself (or store the Future you get from the download call in a list and after the for loop wait for that list of futures to complete.)

from background_downloader.

lyio avatar lyio commented on August 11, 2024

Thanks for the answer. I am calling enqueue in a loop at the moment. I need the central tracking so I'll stick to that for now.

from background_downloader.

781flyingdutchman avatar 781flyingdutchman commented on August 11, 2024

Implemented in version 5.0.0. You can now add a batchProgressCallback (the one that was there, but now it's a named parameter, which is why this is part of the breaking change to V5), and a task-specific taskStatusCallback and taskProgressCallback, which will be called for each task in the batch (just like a normal status or progress callback).

Pause/resume is now also available. Hope this helps!

from background_downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.