TUI Torrent
A Terminal User Interface (TUI) application for searching and downloading torrents using multiple sources.
Features
- 🔍 Multi-source search: Searches YTS, PirateBay, and 1337x simultaneously
- 🏴☠️ 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
Supported Sources
- YTS: High-quality movie torrents
- PirateBay: General torrent search via API
- 1337x: Popular torrent site (with fallback mock data due to anti-bot protection)
Usage
Running the TUI
Controls
- s: Start a new search
- Enter:
- In search mode: Execute search
- In results mode: Download selected torrent
- ↑/↓ 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 clientx1337.rs: 1337x scraper with fallbacks
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 multiple sources
- Use ↑/↓ to navigate results
- Press Enter to download a torrent
- Press
qto quit
The application will show:
- Source attribution for each result
- Seeder/leecher counts
- File sizes
- Real-time search progress
- Download status