From ac211b2094b25240a2b75888575c6c0da36eb532 Mon Sep 17 00:00:00 2001 From: UnknownUniverse Date: Mon, 17 Aug 2026 14:20:14 +0100 Subject: [PATCH] Update README --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bccf2f..9c60dc7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,45 @@ -# Navidrome-Dashboard +# Simple Navidrome Dashboard +A lightweight, self-hosted multi-user dashboard for Navidrome. +**Aggregates play counts, filters duplicates, sorts your top tracks, and serves a clean, mobile-responsive HTML page via Nginx.** -A lightweight, self-hosted multi-user listening dashboard and top-tracks leaderboard for Navidrome. Queries the SQLite database directly, aggregates all-time play counts, and serves a mobile-responsive HTML page via Nginx. \ No newline at end of file +## Features +- 🕒 **All-Time Stats**: Aggregates total play counts and tracks the most recent timestamp for every song played. +- 👥 **Multi-User Support**: Automatically detects all registered Navidrome users and creates individual cards for each. +- 🧠 **Smart Sorting**: Ordered by total plays (descending), then last played date, then alphabetically by artist name. +- 📱 **Fully Responsive**: Adapts cleanly to wide desktop screens and stacks vertically on mobile devices. +- ⚡ **Zero Heavy Dependencies**: Runs entirely via standard Python libraries and a lightweight Nginx container. + +## Setup & Instructions + +### 1. Repository Structure +Ensure you have your project directory set up with your two files:
+ +your-dashboard-folder/
+├── dashboard.py
+└── docker-compose.yml + +And make sure you have an empty public directory for the generated HTML output: +`mkdir -p public` + +### 2. Generate the Dashboard HTML +You can run the Python script on-demand using a temporary Python container. + +Mount your project folder to /app and your Navidrome data directory to /nddata:
+ +`docker run --rm -v $(pwd):/app -v /path/to/your/navidrome/data:/nddata -e NAVIDROME_DB_PATH="/nddata/navidrome.db" -e OUTPUT_HTML_PATH="/app/public/index.html" python:3.11-slim python /app/dashboard.py` + +### 3. Start the Web Server +Spin up the Nginx container using Docker Compose: +`docker compose up -d` + +You can now view your dashboard in your browser at `http://:8081`. + +### Automation (Crontab) +To keep the dashboard updated automatically, you can add a cron job on your host machine to regenerate the HTML page once a day at midnight. + +Open your crontab editor: +`crontab -e` + +Add the following line (making sure to replace `/home/username/dashboard` with your absolute project path and `/path/to/your/navidrome/data` with your actual Navidrome data path): + +`0 0 * * * docker run --rm -v /home/username/dashboard:/app -v /path/to/your/navidrome/data:/nddata -e NAVIDROME_DB_PATH="/nddata/navidrome.db" -e OUTPUT_HTML_PATH="/app/public/index.html" python:3.11-slim python /app/dashboard.py` \ No newline at end of file