github thisal-d/pytube-downloader v6.3.0

3 months ago

⚡ PyTube Downloader — Release Notes v6.3.0


🚀 Highlights

This release is a significant quality and reliability update, driven largely by community contributions (huge thanks to @ZLostTK!). The focus areas are cross-platform compatibility, performance, developer tooling, and code quality.


✨ New Features & Improvements

🌍 Cross-Platform Compatibility

  • Replaced all hardcoded Windows-style backslash paths with pathlib.Path for correct behavior on Linux and macOS.
  • Replaced os.startfile() (Windows-only) with a cross-platform GuiUtils.open_file() helper.
  • Dynamically resolved the ffmpeg binary path at runtime instead of using a static location.
  • Patched CTkScrollableFrame for consistent behavior across platforms.
  • Windows-only dependencies (win11toast, hPyT) are now optional — the app runs cleanly on Linux and macOS without them.
  • Auto-detects the system Downloads folder and falls back gracefully.

⚡ Performance — Event-Driven Threading

  • Replaced all busy-poll while True / time.sleep() loops in manager threads with queue.Queue and threading.Event.wait().
    • Affected managers: download_manager, load_manager, video_convert_manager, theme_manager
  • Threads now wake immediately when work arrives instead of polling every second, reducing unnecessary CPU usage.

📝 Structured Logging

  • Removed all print() debug statements across the entire codebase.
  • Replaced with a proper rotating-file logger utility (utils/logger.py).
  • Makes debugging significantly easier without polluting the terminal.

🔧 CLI Entry Point

  • Added a pytube-downloader script entry point via pyproject.toml.
  • Install once with pip install -e ., then launch from anywhere with:
    pytube-downloader

🛠️ Developer Experience

✅ CI/CD — GitHub Actions

  • Added three new GitHub Actions workflows:
    • ci.yml — Runs ruff (lint + format), mypy (type-check), and pytest on every push and PR.
    • release.yml — Automates release builds.
    • dependabot.yml — Keeps dependencies up-to-date automatically.

🧪 Unit Tests

  • Added a tests/ suite with coverage for core utility modules:
    • test_date_time_utility.py
    • test_file_utility.py
    • test_json_utility.py
    • test_settings_validate_utility.py
    • test_value_convert_utility.py
  • Fixed circular imports that were blocking test execution.

🪝 Pre-commit Hooks

  • Added a .pre-commit-config.yaml to enforce ruff formatting and linting before every commit.

🔍 Type Safety

  • Resolved all mypy type errors in utils/ following type-hint improvements.
  • Cleaned up module exports and optimized formatting across widgets.

🐛 Bug Fixes

Fix Description
ZeroDivisionError during download Guarded division operations when download size is unknown/zero
Missing-attribute crash during download Added attribute-existence guards before accessing download state
Invalid Tkinter key binding Replaced Control-, with Control-grave (correct cross-platform binding)
Circular imports Resolved circular import chains that caused runtime and test failures
.gitignore stray backslash Removed malformed C:\ entry in .gitignore

📖 Documentation

  • Updated README.md with cross-platform support details, CI badge, dev tooling section, and keyboard shortcuts note.
  • Added new language contributor: @sergdryg — 🇷🇺 Russian (ru)
  • Added new contributor: @ZLostTK
  • Added FUNDING.yml for GitHub Sponsors support.

👥 Contributors

Special thanks to everyone who made this release possible:

Contributor Contribution
@ZLostTK Cross-platform fixes, performance improvements, CI/CD, testing, logging refactor
@sergdryg Russian language translation (ru.json)

📦 Installation

pip install -e .
pytube-downloader

Or run directly:

python main.py

❤️ Thank you to every contributor, tester, and star-gazer. Let's keep making PyTube Downloader better — together!

Download PyTube Downloader

Don't miss a new pytube-downloader release

NewReleases is sending notifications on new releases.