Files
media-episode-viewer/README.md
T
2026-03-01 10:16:21 +08:00

60 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Media Episodes Viewer — One Piece Progress Reporter
A minimal single-container web app that generates a weekly One Piece progress report by querying Jellyfin and Sonarr.
## Setup
### 1. Configure environment
```bash
cp .env.example .env
```
Edit `.env` and fill in your values:
| Variable | Description |
|---|---|
| `JELLYFIN_HOST` | Base URL of your Jellyfin server (e.g. `http://192.168.1.10:8096`) |
| `JELLYFIN_API_KEY` | Jellyfin API key (Dashboard → Advanced → API Keys) |
| `JELLYFIN_USER_ID` | Your Jellyfin user ID (visible in Dashboard → Users → click your user) |
| `SONARR_HOST` | Base URL of your Sonarr server (e.g. `http://192.168.1.10:8989`) |
| `SONARR_API_KEY` | Sonarr API key (Settings → General → Security) |
| `SONARR_SERIES_ID` | Sonarr internal series ID for One Piece (from the URL when viewing the series) |
### 2. Build and run
```bash
docker compose build --no-cache
docker compose up
```
Open [http://localhost:5000](http://localhost:5000) in your browser.
### Building a macOS .app (Standalone)
A convenience build script is provided to create a standalone macOS application bundle that includes a Python runtime and the app. Note: the build must be run on macOS and requires internet access to install dependencies.
Run the following on your Mac:
```bash
chmod +x build_mac.sh
./build_mac.sh
```
The built .app will appear in dist/ (example: `dist/mac_launcher.app`). Double-click the `.app` to launch; it will start a local web server and open your default browser to the UI.
## Usage
1. The date range defaults to the previous week (Mon–Sat).
2. Click **Fetch Episodes** to retrieve episode numbers from Jellyfin/Sonarr without generating the report yet.
3. Click **Generate Report** to fetch data and produce the formatted text.
4. Click **Copy to Clipboard** to copy the report.
Example output:
```
ONE PIECE PROGRESS!!! (Feb 8-14)
Episode 928/1155
Around 10 episodes watched this week!
```