Files
sofarr/README.md

3.9 KiB

Media Download Dashboard

A dashboard for tracking SABnzbd downloads matched to Sonarr/Radarr activity by user, with user identification via Emby server sessions.

Features

  • User Identification: Automatically identifies the current user from active Emby server sessions
  • Download Tracking: Retrieves download details from SABnzbd
  • Service Integration: Matches downloads to activity in Sonarr and Radarr
  • User Tag Matching: Identifies requesting users from tags present against shows or movies
  • Personalized Dashboard: Presents details of downloading shows/movies for the current user

Prerequisites

  • Node.js (v14 or higher)
  • npm
  • SABnzbd instance
  • Sonarr instance
  • Radarr instance
  • Emby instance

Installation

  1. Clone the repository and navigate to the project directory

  2. Install dependencies:

npm install
cd client && npm install
cd ..
  1. Copy the example environment file and configure your services:
cp .env.example .env

Edit .env with your service URLs and API keys:

PORT=3001
SABNZBD_URL=http://localhost:8080
SABNZBD_API_KEY=your_sabnzbd_api_key
SONARR_URL=http://localhost:8989
SONARR_API_KEY=your_sonarr_api_key
RADARR_URL=http://localhost:7878
RADARR_API_KEY=your_radarr_api_key
EMBY_URL=http://localhost:8096
EMBY_API_KEY=your_emby_api_key

Tagging Your Media

To enable user-specific download tracking, tag your shows and movies in Sonarr/Radarr:

  1. In Sonarr/Radarr, go to your series/movie settings
  2. Add a tag with the format: user:username (e.g., user:john)
  3. Apply this tag to the series/movies you want to track for that user

The dashboard will match downloads to users based on these tags.

Usage

Start the development servers:

npm run dev

This will start:

  • Backend server on http://localhost:3001
  • Frontend development server on http://localhost:5173

Open your browser and navigate to http://localhost:5173

How It Works

  1. Session Detection: The dashboard connects to Emby to detect active user sessions
  2. User Identification: The current user is identified from their active Emby session
  3. Download Retrieval: SABnzbd queue and history are retrieved
  4. Activity Matching: Downloads are matched to Sonarr/Radarr queue and history
  5. Tag Matching: The user tag from the series/movie is extracted and matched to the current user
  6. Display: Only downloads matching the current user are displayed

API Endpoints

SABnzbd

  • GET /api/sabnzbd/queue - Get current queue
  • GET /api/sabnzbd/history - Get download history

Sonarr

  • GET /api/sonarr/queue - Get Sonarr queue
  • GET /api/sonarr/history - Get Sonarr history
  • GET /api/sonarr/series - Get all series with tags
  • GET /api/sonarr/series/:id - Get specific series details

Radarr

  • GET /api/radarr/queue - Get Radarr queue
  • GET /api/radarr/history - Get Radarr history
  • GET /api/radarr/movies - Get all movies with tags
  • GET /api/radarr/movies/:id - Get specific movie details

Emby

  • GET /api/emby/sessions - Get active sessions
  • GET /api/emby/users - Get all users
  • GET /api/emby/users/:id - Get specific user details
  • GET /api/emby/session/:sessionId/user - Get user from session

Dashboard

  • GET /api/dashboard/user-downloads/:sessionId - Get downloads for current user
  • GET /api/dashboard/user-summary - Get download summary for all users

Production Build

Build the frontend for production:

npm run client:build

Start the production server:

npm run server:start

The frontend will be served from the backend server.

Troubleshooting

  • "Failed to fetch Emby sessions": Ensure Emby is running and the API key is correct
  • "No downloads found": Ensure your media is tagged with user:username format
  • Download not showing: Check that the download name matches between SABnzbd and Sonarr/Radarr

License

MIT