Merge mediahive.
This commit is contained in:
@@ -1,27 +1,42 @@
|
||||
# Torrent Manager
|
||||
# MediaHive
|
||||
|
||||
Tools for managing a media torrent library: scanning, indexing, metadata fetching, and preview generation.
|
||||
Media scanning, indexing, and Netflix-style web streaming for your torrent collection.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
hivescan/ Indexing & previews (installable package)
|
||||
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
|
||||
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/
|
||||
rtorrent-manager.py Torrent scanning & rtorrent management
|
||||
rtorrent_client.py RTorrent XMLRPC/SCGI client
|
||||
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
|
||||
```
|
||||
|
||||
## Hivescan
|
||||
## Quick Start
|
||||
|
||||
Scans downloaded content, categorizes it (Movies, Series, Other), fetches metadata from TMDb, generates preview clips, and produces a JSON index.
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
### 1. Scan & Index Media
|
||||
|
||||
```bash
|
||||
# Scan downloads, auto-detect common root, create .mediahive folder
|
||||
@@ -37,39 +52,43 @@ hivescan /media/torrents/* -o /srv/media/.mediahive
|
||||
hivescan /media/torrents/* --no-covers --no-showreels
|
||||
```
|
||||
|
||||
## RTorrent Manager
|
||||
|
||||
Scans `.torrent` files, filters by tracker, verifies downloads exist on disk, loads verified torrents into rtorrent, and cleans up unregistered torrents.
|
||||
### 2. Serve & Browse
|
||||
|
||||
```bash
|
||||
# Scan .torrents directories and manage rtorrent
|
||||
python scripts/rtorrent-manager.py /media/torrents*/.torrents/
|
||||
# Start the web server
|
||||
mediahive /path/to/your/media/folder
|
||||
|
||||
# Multiple paths
|
||||
python scripts/rtorrent-manager.py /mnt/disk1/torrents/.torrents/ /mnt/disk2/torrents/.torrents/
|
||||
|
||||
# Filter by tracker, dry run
|
||||
python scripts/rtorrent-manager.py /media/torrents*/.torrents/ --tracker example.org --dry
|
||||
# Server starts at http://localhost:8420
|
||||
```
|
||||
|
||||
## Path Mapping
|
||||
The app expects `<media-folder>/.mediahive/index.json` generated by hivescan.
|
||||
|
||||
Hivescan auto-detects the common root of scanned paths and creates a `.mediahive` folder there. All paths in the index are stored relative to that root.
|
||||
### 3. Development
|
||||
|
||||
| Location | Example |
|
||||
|----------|---------|
|
||||
| Torrents | `/media/torrents*/` |
|
||||
| Index | `/media/.mediahive/index.json` |
|
||||
| Covers | `/media/.mediahive/movies/` |
|
||||
| Showreels | `/media/.mediahive/movies/<title>/reel1.webm` |
|
||||
```bash
|
||||
cd frontend && npm install && cd ..
|
||||
python scripts/devserver.py
|
||||
```
|
||||
|
||||
Use `-o` to override the output directory if the auto-detected root isn't suitable.
|
||||
Starts Vite dev server + FastAPI backend with auto-reload.
|
||||
|
||||
## API Endpoints
|
||||
|
||||
- `GET /api/index` — Load media index
|
||||
- `POST /api/play` — Open media file with system player
|
||||
- `POST /api/open-folder` — Open folder in file explorer
|
||||
- `GET /api/media/{path}` — Serve media files (images, video)
|
||||
|
||||
## RTorrent Manager
|
||||
|
||||
```bash
|
||||
python scripts/rtorrent-manager.py /media/torrents*/.torrents/
|
||||
```
|
||||
|
||||
Scans `.torrent` files, verifies downloads exist, loads into rtorrent.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python ≥ 3.14
|
||||
- ffmpeg (for showreel generation)
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
- Node.js 18+ (frontend development)
|
||||
- ffmpeg (showreel generation)
|
||||
|
||||
Reference in New Issue
Block a user