Skip to content

JoshuaMaoJH/Flash-Download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Flash Download

A fast, multi-threaded file downloader with a dark-themed GUI and built-in breakpoint resume.

Python GUI Platform


Features

  • Multi-threaded chunked downloading — splits files into up to 32 parallel chunks, each on its own HTTP range request, to saturate your bandwidth
  • Breakpoint resume — cancelled or interrupted downloads save a .flashdl sidecar file; pick up exactly where you left off next launch
  • Live stats — real-time speed, progress percentage, downloaded / total size, and ETA
  • Auto-fallback — if the server doesn't support Accept-Ranges, falls back to a single-stream download automatically
  • Smart filename detection — reads Content-Disposition header first, falls back to the URL path
  • Duplicate guard — never overwrites an existing file; appends (1), (2), … instead
  • Dark UI — built with CustomTkinter

Getting Started

Run from source

Requirements: Python 3.12+

pip install -r requirements.txt
python flash_download.py

Run the pre-built executable (Windows)

Download Flash Download.exe from the dist/ folder — no Python or installation required.


Usage

  1. Paste a direct download URL into the Download URL field
  2. Choose a Save Location (defaults to your Downloads folder)
  3. Drag the Threads slider (1 – 32, default 16)
  4. Click ⚡ Download Now

Pausing & resuming

  • Click ⏸ Pause at any time — the partial file and progress are saved automatically
  • Next time you enter the same URL, a resume dialog appears showing the saved progress
  • Choose ↩ Resume to continue, or ↺ Start Fresh to re-download from scratch

How the speed works

When a server supports byte-range requests (Accept-Ranges: bytes), Flash Download:

  1. Reads the total file size from the Content-Length header
  2. Splits the file into N equal byte ranges (one per thread)
  3. Sends N simultaneous GET requests with Range: bytes=X-Y headers
  4. Each thread writes directly to its pre-allocated region in the output file

This means a 16-thread download can open 16 parallel TCP connections, each receiving a different part of the file at the same time — multiplying effective throughput on high-bandwidth links.


Resume file format

While a download is in progress, two sidecar files sit next to the output:

File Purpose
filename.part In-progress data (pre-allocated to full size)
filename.flashdl JSON metadata — URL, total size, per-chunk byte offsets

The .flashdl is updated every ~120 ms. On successful completion both files are cleaned up and the .part file is renamed to the final filename.

Example .flashdl (chunked mode):

{
  "url": "https://example.com/file.zip",
  "filename": "file.zip",
  "total_size": 1073741824,
  "mode": "chunked",
  "chunks": [
    { "start": 0,         "end": 67108863,  "written": 67108864 },
    { "start": 67108864,  "end": 134217727, "written": 41943040 }
  ]
}

Building the executable yourself

pip install pyinstaller
python -m PyInstaller --noconfirm --onefile --windowed \
    --name "Flash Download" \
    --collect-data customtkinter \
    --collect-data darkdetect \
    flash_download.py

Output: dist/Flash Download.exe

Note: Always use python -m PyInstaller to ensure PyInstaller runs under the same Python environment where customtkinter is installed.


Dependencies

Package Purpose
customtkinter Dark-themed GUI widgets
requests HTTP downloads and HEAD requests

License

MIT — free to use, modify, and distribute.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages