TUI Torrent
A Terminal User Interface (TUI) application for searching and downloading torrents using multiple sources.
Features
- 🔍 Multi-source search: Searches YTS and PirateBay concurrently
- 🏴☠️ Real torrent results: Gets actual magnet links and torrent information
- 📊 Rich TUI interface: Beautiful terminal interface with colors and navigation
- ⚡ Fast and responsive: Concurrent searches with timeout handling
- 🔄 Aria2 integration: Downloads torrents using aria2 RPC (with automatic startup warnings and play/pause controls)
Supported Sources
- YTS: High-quality movie torrents
- PirateBay: General torrent search via API
Usage
Running the TUI
Controls
- s: Start a new search
- Enter:
- In search mode: Execute search
- In results mode: Download selected torrent
- p: Pause or resume the selected download task
- ↑/↓ or j/k: Navigate through results or downloads (vim-style)
- Esc: Go back/cancel current action
- q: Quit application
Requirements
- Rust 1.70+
- aria2 running on localhost:6800 (for downloads)
Installation
- Clone the repository
- Install dependencies:
cargo build - Run:
cargo run
Architecture
src/main.rs: Main application loopsrc/app.rs: Application state managementsrc/tui.rs: Terminal UI renderingsrc/api/: Torrent source integrationsyts.rs: YTS movie API clientpiratebay.rs: PirateBay API client
src/torrent_search.rs: Multi-source search enginesrc/aria2_client.rs: Aria2 RPC client for downloads
Demo
- Start the application:
cargo run - Press
sto search - Type a search term (e.g., "ubuntu" or "inception")
- Press Enter to search concurrent sources
- Use ↑/↓ to navigate results
- Press Enter to download a torrent
- Use
pto pause/resume download tasks - Press
qto quit
The application will show:
- Source attribution for each result
- Seeder/leecher counts
- File sizes
- Real-time search progress
- Download status and speed