Git Product home page Git Product logo

tinydlm's Introduction

tinyDLM - A C++ download manager

tinyDLM

Small multi-threaded download manager built around cURLpp / ncurses

I've never encountered a simple yet efficient download manager that would be free AND still maintained.

So I decided to build my own and figured out it would be a great way to learn more about C++, multithreading, sockets and desktop applications and I did learn a lot along the way !

I could have used multiple non blocking sockets instead of threads and therefore only use one thread for the download manager part, but I really wanted to learn more about multithreading and its pitfalls.

The main window is actually made of 2 subwindows: the downloads list displayed as a curses menu and a 'downloads status' window sitting next to it and updated in its own thread. Using different threads for windows was also a challenge since curses (actually ncurses) is not multi-thread safe, but using C++ mutexes I managed to make it work smoothly.

I plan on adding some other useful features like limiting the number of simultaneous transfers or adding more than one link at the same time.

NOTE: install.sh doesn't work on Big Sur. I have to make a few changes in CMakeLists.txt. In the meantime use the command in compileMacOs.txt to compile.

Features:

- Works on macOS (>= 10.14) and Linux Debian based distributions
- Supports Direct Download Links
- Supports simultaneous transfers (tested up to 32)
- Transfers can be paused / resumed / killed
- Inactive transfers can be cleared from the list
- Displays current download speed and progress for each transfer
- Displays current transfer status
- Signals user input and URL / HTTP errors
- Very low CPU / memory consumption
- Partially supports adding multiple links at the same time

Installation

Works on Linux Debian based distributions and macOS (>= 10.14)

  1. Make sure you have the following dependencies installed:
    cmake
  1. Clone this repo
    git clone https://github.com/guimauveb/tinyDLM.git
  1. Run install.sh

Tested on:

  • macOS Big Sur (>= 11.0)
  • macOS Mojave (10.14.6)
  • Linux Ubuntu (20.04 LTS)
  • Kali Linux (20.03)

Notes

On macOS Big Sur, since an unkown change the linker is unable to find some libraries. Unfortunately I don't have time to investigate. It still works fine on Linux and previous macOS versions.

Details about the code

The code uses the following style convention:

- ProperCase class and struct names.
- camelCase functions (lower case initial letter).
- snake_case variables.

NOTE: I'm still working on improving the code and code style.

Missing features that I certainly won't implement

- [X] Duplicate filename checker 
- [X] Create a "settings" window
- [X] Set download directory (transfers are stored by default in ~/Downloads/tinyDownloads/) 
- [X] Set the default number of simultaneous transfers to the number of CPU cores / threads
- [ ] Set the number of max simultaneous transfers  
- [ ] Set maximum download speed
- [ ] Add multiple links at the same time 
- [ ] Use a database to store downloads state
- [ ] Limit download speed in DownloaderCore 
- [ ] Schedule download start  
- [ ] Compute / Display ETA  

tinydlm's People

Contributors

guimauveb avatar

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.