5bb46c162e928ec9632df1e4153af0d4922d2a2a
MediaHive
Media scanning, indexing, and Netflix-style web streaming for your torrent collection.
Project Structure
hivescan/ Indexing & previews (library + CLI)
indexer.py Media index generation
scanning.py File system scanning
parsing.py Torrent name parsing (PTN)
models.py Data models
images.py TMDb cover/backdrop downloading
showreel.py Video preview clip generation (ffmpeg)
tmdb_client.py TMDb API client with caching
utils.py Path, size, and timestamp helpers
mediahive/ FastAPI web server + Vue frontend
server.py FastAPI app (API + media serving)
__main__.py CLI entry point
frontend/ Vue 3 frontend source
src/
components/ Vue components (Netflix-style UI)
styles/ CSS styles
api.ts API calls to FastAPI backend
types.ts TypeScript interfaces
scripts/
devserver.py Development server (Vite + FastAPI)
rtorrent-manager.py Torrent scanning & rtorrent management
fastapi-vue/ Build utilities for frontend
rtorrent_client.py RTorrent XMLRPC/SCGI client
Quick Start
pip install -e .
1. Scan & Index Media
# Scan downloads, auto-detect common root, create .mediahive folder
hivescan /media/torrents/*
# Scan multiple locations
hivescan /mnt/disk1/* /mnt/disk2/*
# Override output directory
hivescan /media/torrents/* -o /srv/media/.mediahive
# Skip cover/showreel generation
hivescan /media/torrents/* --no-covers --no-showreels
2. Serve & Browse
# Start the web server
mediahive /path/to/your/media/folder
# Server starts at http://localhost:8420
The app expects <media-folder>/.mediahive/index.json generated by hivescan.
3. Development
cd frontend && npm install && cd ..
python scripts/devserver.py
Starts Vite dev server + FastAPI backend with auto-reload.
API Endpoints
GET /api/index— Load media indexPOST /api/play— Open media file with system playerPOST /api/open-folder— Open folder in file explorerGET /api/media/{path}— Serve media files (images, video)
RTorrent Manager
python scripts/rtorrent-manager.py /media/torrents*/.torrents/
Scans .torrent files, verifies downloads exist, loads into rtorrent.
Requirements
- Python ≥ 3.14
- Node.js 18+ (frontend development)
- ffmpeg (showreel generation)
Releases
10
MediaHive 0.6.1
Latest
Languages
Python
50.3%
Vue
33.1%
TypeScript
14.7%
CSS
1.7%
JavaScript
0.1%