Skip to content

Commit 3e6e378

Browse files
author
Steven Seitz
committed
docs: update readmes with new dashboard features and instructions
1 parent a7a3a23 commit 3e6e378

2 files changed

Lines changed: 30 additions & 197 deletions

File tree

README.md

Lines changed: 13 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -12,125 +12,43 @@
1212
Instead of altering global metadata or manually checking when media expires, this script calculates the exact days remaining for each item in your Maintainerr collections. It then connects to your Plex server and seamlessly updates the collection's **custom sort order**. Items closest to their deletion date automatically rise to the top!
1313

1414
## ✨ Features
15+
* **Interactive Dashboard:** Manage all settings, design your overlays, and monitor logs via a modern web interface (Port 8501).
16+
* **Live WYSIWYG Preview:** Real-time simulation of your Kometa banners. Upload your own posters to test the design before applying.
1517
* **Safe Sorting:** Uses Plex's custom collection sorting. Your global library `titleSort` metadata remains completely untouched.
16-
* **Multi-Collection Support:** Sync as many Maintainerr collections as you want simultaneously.
17-
* **Smart Kometa Overlays:** Dynamically generates library-specific YAML files for [Kometa](https://kometa.wiki/). Includes native support for season-level overlays and smart grammar logic (e.g., "1 Tag" vs "2 Tage").
18-
* **Built-in Scheduler:** Run it instantly (`NOW`) or set up multiple daily schedules (e.g., `04:30`, `12:00`). The container stays alive and waits for its cue.
19-
* **Safety First:** Includes a `dry_run` mode to test your config, and an `undo` mode to revert a collection back to its default Plex sorting.
18+
* **Smart Kometa Overlays:** Dynamically generates library-specific YAML files for [Kometa](https://kometa.wiki/). Includes native support for season-level overlays and customizable banner designs (Colors, Offsets, Radius).
19+
* **Built-in Scheduler:** Set up multiple daily sync intervals directly in the UI. The background thread keeps everything in sync while you sleep.
2020
* **Lightweight:** Built on `python:3.9-slim` with minimal dependencies.
2121

2222
## 🚀 Installation (Docker Compose)
2323

2424
The easiest way to run this tool is via Docker.
2525

26-
1. Create a directory for the project and navigate into it.
27-
2. Create a `docker-compose.yml` file:
28-
2926
```yaml
3027
version: "3.8"
3128

3229
services:
3330
maintainerr-plex-sync:
34-
# You can use :latest for automatic updates, or pin a specific version like :1.1.8
3531
image: ghcr.io/00scooby/maintainerr-plex-sync:latest
3632
container_name: maintainerr_sync
3733
restart: unless-stopped
3834
ports:
39-
- "8501:8501"
35+
- "8501:8501" # Access the Dashboard here
4036
environment:
41-
- TZ=Europe/Zurich # Change to your timezone
42-
- PLEX_URL=[http://192.168.1.100:32400](http://192.168.1.100:32400)
37+
- TZ=Europe/Zurich
38+
- PLEX_URL=http://[YOUR-IP]:32400
4339
- PLEX_TOKEN=your_plex_token_here
44-
- MAINTAINERR_URL=[http://192.168.1.100:6246](http://192.168.1.100:6246)
40+
- MAINTAINERR_URL=http://[YOUR-IP]:6246
4541
volumes:
4642
- ./config.yml:/app/config.yml
47-
# OPTIONAL: Map this to access the exported YAML files during a 'dry_run'
48-
- ./:/dry_run/
4943
- ./logs:/logs
50-
# OPTIONAL: Map this if you want to use the Kometa Overlay feature
5144
- ./kometa/config:/app/kometa_export
5245
```
53-
3. Create your `config.yml` in the same directory (see Configuration below).
54-
55-
4. Run `docker compose up -d`.
56-
57-
## ⚙️ Configuration (`config.yml`)
58-
Map this file into your container at `/app/config.yml`.
59-
60-
```YAML
61-
# ==========================================
62-
# Maintainerr-to-Plex Sync Configuration
63-
# ==========================================
64-
65-
settings:
66-
# Modes: "run" (active), "dry_run" (testing), "undo" (revert Plex sorting)
67-
run_mode: "run"
68-
69-
# Log levels: DEBUG, INFO, WARNING, ERROR
70-
log_level: "INFO"
71-
72-
# "NOW" for a single immediate run (container exits afterwards)
73-
# OR a list of times for standby mode
74-
run_schedules:
75-
- "04:30"
76-
77-
# Exact names of the collections in Maintainerr to sync
78-
collection_names:
79-
- "Series unseen for 360 days"
80-
- "Movies unseen for 1 year"
81-
82-
# ==========================================
83-
# Kometa Overlay Integration (Optional)
84-
# ==========================================
85-
enable_kometa_overlays: false
86-
87-
# Only generate overlays for these Plex libraries
88-
kometa_allowed_libraries:
89-
- "Filme"
90-
- "Serien"
91-
92-
# Dynamic Color Thresholds
93-
kometa_threshold_days: 10
94-
kometa_color_urgent: "#E31E24" # Background color for <= threshold (e.g., Red)
95-
kometa_text_color_urgent: "#FFFFFF" # Text color for <= threshold (e.g., White)
96-
kometa_color_warning: "#F1C40F" # Background color for > threshold (e.g., Yellow)
97-
kometa_text_color_warning: "#141414" # Text color for > threshold (e.g., Dark Grey/Black for contrast)
98-
```
9946
10047
## 🛠️ How it works
101-
1. The script fetches the specified collections from your Maintainerr API.
102-
2. It calculates the days left before deletion for each item based on `addDate` and `deleteAfterDays`.
103-
3. It connects to Plex via the `plexapi` wrapper and updates the collection sorting.
104-
4. If enabled, it automatically generates library-specific YAML files (e.g., `maintainerr_Filme.yml`, `maintainerr_Serien.yml`) that Kometa can read to add visual expiration banners to your media.
48+
1. **Connect:** Access the Dashboard at `http://[YOUR-IP]:8501`.
49+
2. **Configure:** Select your Plex libraries and Maintainerr collections via dynamic dropdowns.
50+
3. **Design:** Use sliders to adjust your Kometa banners and check the live preview.
51+
4. **Automate:** Set your sync times and let the background worker handle the rest.
10552

106-
## 🎨 Kometa Setup
107-
To utilize the generated overlay files, simply include them in your Kometa configuration under the respective libraries. Since the script splits the exports by library name, you avoid soft fails in your Kometa logs!
108-
109-
```YAML
110-
libraries:
111-
Filme:
112-
overlay_path:
113-
- file: config/maintainerr_Filme.yml
114-
Serien:
115-
overlay_path:
116-
- file: config/maintainerr_Serien.yml
117-
```
11853
## 🚑 Troubleshooting
119-
120-
### ⚠️ Log: "Kollektion '[Name]' in Plex nicht gefunden!"
121-
**Cause:** The script found the collection in Maintainerr, but it doesn't exist in Plex under that exact name.
122-
**Solution:** Check the exact spelling in both Plex and Maintainerr. It must be a 100% match (including spaces and case sensitivity).
123-
124-
### ⚠️ Log: "DRY RUN MODUS AKTIV: Plex wird nicht verändert."
125-
**Cause:** The script is only reading data. It won't reorder anything in Plex and saves the generated Kometa files to a test folder.
126-
**Solution:** Change `run_mode: "dry_run"` to `run_mode: "run"` in your `config.yml` and restart the container to apply changes to Plex.
127-
128-
### ⚠️ No Kometa YAML files are being exported
129-
**Cause 1:** The Kometa feature is disabled in your configuration.
130-
**Solution 1:** Ensure `enable_kometa_overlays: true` is set in your `config.yml`.
131-
**Cause 2:** The library names don't match.
132-
**Solution 2:** Check the `kometa_allowed_libraries` block. The names (e.g., "Movies", "TV Shows") must exactly match the library names on your Plex server.
133-
134-
### ⚠️ Log: "Fehler bei der Verbindung zu Plex / Maintainerr"
135-
**Cause:** The script cannot reach the respective APIs, or authentication failed.
136-
**Solution:** Double-check your `docker-compose.yml` (or `.env` file) to ensure the `PLEX_URL`, `PLEX_TOKEN`, and `MAINTAINERR_URL` are correct and accessible from within the Docker container.
54+
Check the **Live Logs** section at the bottom of the Dashboard for real-time feedback on API connections and sync status.

README_DE.md

Lines changed: 17 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Maintainerr-to-Plex Sync 🚀
2-
32
[🇩🇪 Deutsch](README_DE.md) | [🇬🇧 English](README.md)
43

54
[![Docker Build](https://github.com/00Scooby/maintainerr-plex-sync/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/00Scooby/maintainerr-plex-sync/actions/workflows/docker-publish.yml)
@@ -10,128 +9,44 @@
109

1110
**Maintainerr-to-Plex Sync** ist ein vollautomatisierter Python-Microservice, der die Lücke zwischen den Löschplänen von [Maintainerr](https://github.com/jorenn92/Maintainerr) und deiner Plex-Oberfläche schliesst.
1211

13-
Anstatt globale Metadaten zu ändern oder manuell zu prüfen, wann Medien ablaufen, berechnet dieses Skript die exakten verbleibenden Tage für jedes Item in deinen Maintainerr-Kollektionen. Anschliessend verbindet es sich mit deinem Plex-Server und aktualisiert nahtlos die **benutzerdefinierte Sortierung** der Kollektion. Items, die kurz vor der Löschung stehen, wandern automatisch nach oben!
12+
Anstatt globale Metadaten zu ändern, berechnet dieses Skript die exakten verbleibenden Tage für jedes Item in deinen Maintainerr-Kollektionen und aktualisiert nahtlos die **benutzerdefinierte Sortierung** in Plex. Medien, die kurz vor der Löschung stehen, wandern automatisch nach oben!
1413

1514
## ✨ Features
16-
* **Sicheres Sortieren:** Nutzt die benutzerdefinierte Kollektionssortierung von Plex. Deine globalen `titleSort`-Metadaten der Mediathek bleiben komplett unangetastet.
17-
* **Multi-Collection Support:** Synchronisiere so viele Maintainerr-Kollektionen gleichzeitig, wie du möchtest.
18-
* **Smarte Kometa-Overlays:** Generiert dynamisch bibliotheksspezifische YAML-Dateien für [Kometa](https://kometa.wiki/). Enthält native Unterstützung für Overlays auf Staffel-Ebene und eine intelligente Grammatik-Logik (z. B. "1 Tag" vs. "2 Tage").
19-
* **Integrierter Scheduler:** Führe das Skript sofort aus (`NOW`) oder richte mehrere tägliche Zeitpläne ein (z. B. `04:30`, `12:00`). Der Container bleibt aktiv und wartet auf seinen Einsatz.
20-
* **Safety First:** Beinhaltet einen `dry_run`-Modus, um deine Konfiguration zu testen, sowie einen `undo`-Modus, um eine Kollektion auf die Standard-Plex-Sortierung zurückzusetzen.
21-
* **Leichtgewicht:** Basiert auf `python:3.9-slim` mit minimalen Abhängigkeiten.
15+
* **Interaktives Dashboard:** Verwalte alle Einstellungen, gestalte deine Overlays und überwache Logs über eine moderne Web-Oberfläche (Port 8501).
16+
* **Live WYSIWYG Vorschau:** Echtzeit-Simulation deiner Kometa-Banner. Lade eigene Poster hoch, um das Design vorab zu prüfen.
17+
* **Sicheres Sortieren:** Nutzt die benutzerdefinierte Kollektionssortierung von Plex. Deine globalen Mediathek-Metadaten bleiben unangetastet.
18+
* **Smarte Kometa-Overlays:** Generiert dynamisch Dateien für [Kometa](https://kometa.wiki/) mit anpassbaren Farben, Offsets und Radien.
19+
* **Integrierter Scheduler:** Richte mehrere tägliche Zeitpläne direkt in der UI ein. Der Hintergrund-Thread hält alles synchron.
20+
* **Leichtgewicht:** Basiert auf `python:3.9-slim` mit minimalem Ressourcenverbrauch.
2221

2322
## 🚀 Installation (Docker Compose)
2423

25-
Der einfachste Weg, dieses Tool auszuführen, ist über Docker.
26-
27-
1. Erstelle ein Verzeichnis für das Projekt und wechsle dorthin.
28-
2. Erstelle eine `docker-compose.yml`-Datei:
29-
3024
```yaml
3125
version: "3.8"
3226

3327
services:
3428
maintainerr-plex-sync:
35-
# Du kannst :latest für automatische Updates nutzen oder eine Version pinnen, z.B. :1.1.10
3629
image: ghcr.io/00scooby/maintainerr-plex-sync:latest
3730
container_name: maintainerr_sync
3831
restart: unless-stopped
3932
ports:
40-
- "8501:8501"
33+
- "8501:8501" # Dashboard-Zugriff
4134
environment:
42-
- TZ=Europe/Zurich # Zeitzone anpassen
43-
- PLEX_URL=[http://192.168.1.100:32400](http://192.168.1.100:32400)
35+
- TZ=Europe/Zurich
36+
- PLEX_URL=http://[DEINE-IP]:32400
4437
- PLEX_TOKEN=dein_plex_token_hier
45-
- MAINTAINERR_URL=[http://192.168.1.100:6246](http://192.168.1.100:6246)
38+
- MAINTAINERR_URL=http://[DEINE-IP]:6246
4639
volumes:
4740
- ./config.yml:/app/config.yml
48-
# OPTIONAL: Mappe dies, um während eines 'dry_run' auf die exportierten YAML-Dateien zuzugreifen
49-
- ./:/dry_run/
5041
- ./logs:/logs
51-
# OPTIONAL: Mappe dies, wenn du das Kometa-Overlay-Feature nutzen möchtest
5242
- ./kometa/config:/app/kometa_export
5343
```
54-
3. Erstelle deine `config.yml` im selben Verzeichnis (siehe Konfiguration unten).
55-
4. Führe `docker compose up -d` aus.
56-
57-
## ⚙️ Konfiguration (`config.yml`)
58-
Mappe diese Datei in deinen Container unter `/app/config.yml`.
59-
60-
```YAML
61-
# ==========================================
62-
# Maintainerr-to-Plex Sync Configuration
63-
# ==========================================
64-
65-
settings:
66-
# Modi: "run" (aktiv), "dry_run" (testen), "undo" (Plex-Sortierung zurücksetzen)
67-
run_mode: "run"
68-
69-
# Log-Level: DEBUG, INFO, WARNING, ERROR
70-
log_level: "INFO"
71-
72-
# "NOW" für einen sofortigen, einmaligen Start (Container beendet sich danach)
73-
# ODER eine Liste von Uhrzeiten für den Standby-Modus
74-
run_schedules:
75-
- "04:30"
76-
77-
# Exakte Namen der Maintainerr-Kollektionen, die synchronisiert werden sollen
78-
collection_names:
79-
- "Series unseen for 360 days"
80-
- "Movies unseen for 1 year"
81-
82-
# ==========================================
83-
# Kometa Overlay Integration (Optional)
84-
# ==========================================
85-
enable_kometa_overlays: false
86-
87-
# Generiere Overlays nur für diese Plex-Mediatheken
88-
kometa_allowed_libraries:
89-
- "Filme"
90-
- "Serien"
91-
92-
# Dynamische Farb-Schwellenwerte
93-
kometa_threshold_days: 10
94-
kometa_color_urgent: "#E31E24" # Hintergrundfarbe für <= Schwelle (z. B. Rot)
95-
kometa_text_color_urgent: "#FFFFFF" # Textfarbe für <= Schwelle (z. B. Weiss)
96-
kometa_color_warning: "#F1C40F" # Hintergrundfarbe für > Schwelle (z. B. Gelb)
97-
kometa_text_color_warning: "#141414" # Textfarbe für > Schwelle (z. B. Dunkelgrau/Schwarz für Kontrast)
98-
```
9944
100-
## 🛠️ Wie es funktioniert
101-
1. Das Skript ruft die angegebenen Kollektionen über deine Maintainerr-API ab.
102-
2. Es berechnet die verbleibenden Tage bis zur Löschung für jedes Item basierend auf `addDate` und `deleteAfterDays`.
103-
3. Es verbindet sich via `plexapi`-Wrapper mit Plex und aktualisiert die benutzerdefinierte Sortierung der Kollektion.
104-
4. Falls aktiviert, generiert es automatisch bibliotheksspezifische YAML-Dateien (z. B. `maintainerr_Filme.yml`, `maintainerr_Serien.yml`), die Kometa lesen kann, um visuelle Ablauf-Banner zu deinen Medien hinzuzufügen.
105-
106-
## 🎨 Kometa Setup
107-
Um die generierten Overlay-Dateien zu nutzen, füge sie einfach unter den jeweiligen Mediatheken in deine Kometa-Konfiguration ein. Da das Skript die Exporte nach Mediatheken-Namen aufteilt, vermeidest du Soft Fails in deinen Kometa-Logs!
108-
109-
```YAML
110-
libraries:
111-
Filme:
112-
overlay_path:
113-
- file: config/maintainerr_Filme.yml
114-
Serien:
115-
overlay_path:
116-
- file: config/maintainerr_Serien.yml
117-
```
45+
## 🛠️ Funktionsweise
46+
1. **Dashboard:** Öffne `http://[DEINE-IP]:8501`.
47+
2. **Konfiguration:** Wähle Mediatheken und Kollektionen bequem über Dropdowns aus.
48+
3. **Design:** Nutze die Schieberegler für das Banner-Design und kontrolliere das Ergebnis in der Live-Vorschau.
49+
4. **Automatisierung:** Speichere deine Sync-Uhrzeiten und lass den Hintergrund-Ninja die Arbeit erledigen.
11850

11951
## 🚑 Troubleshooting
120-
121-
### ⚠️ Log: "Kollektion '[Name]' in Plex nicht gefunden!"
122-
**Ursache:** Das Skript hat die Kollektion zwar in Maintainerr gefunden, aber in Plex existiert sie unter diesem exakten Namen nicht.
123-
**Lösung:** Prüfe die genaue Schreibweise in Plex und Maintainerr. Sie muss zu 100 % identisch sein (inklusive Leerzeichen und Gross-/Kleinschreibung).
124-
125-
### ⚠️ Log: "DRY RUN MODUS AKTIV: Plex wird nicht verändert."
126-
**Ursache:** Das Skript liest nur Daten. Es sortiert nichts in Plex um und schreibt die generierten Kometa-Dateien in einen Testordner.
127-
**Lösung:** Ändere in deiner `config.yml` den Wert `run_mode: "dry_run"` zu `run_mode: "run"` und starte den Container neu, um die Änderungen auf Plex anzuwenden.
128-
129-
### ⚠️ Es werden keine Kometa YAML-Dateien exportiert
130-
**Ursache 1:** Die Kometa-Funktion ist in deiner Konfiguration deaktiviert.
131-
**Lösung 1:** Stelle sicher, dass `enable_kometa_overlays: true` in der `config.yml` gesetzt ist.
132-
**Ursache 2:** Die Mediatheken-Namen stimmen nicht überein.
133-
**Lösung 2:** Prüfe den Block `kometa_allowed_libraries`. Die Namen (z. B. "Filme", "Serien") müssen exakt so heissen wie die Mediatheken auf deinem Plex-Server.
134-
135-
### ⚠️ Log: "Fehler bei der Verbindung zu Plex / Maintainerr"
136-
**Ursache:** Das Skript kann die jeweiligen APIs nicht erreichen oder die Authentifizierung schlägt fehl.
137-
**Lösung:** Kontrolliere in deiner `docker-compose.yml` (oder `.env` Datei), ob die `PLEX_URL`, der `PLEX_TOKEN` und die `MAINTAINERR_URL` absolut korrekt und aus dem Docker-Container heraus erreichbar sind.
52+
Nutze den Bereich **Live-Logs** am Ende des Dashboards für Echtzeit-Feedback zu API-Verbindungen und dem Synchronisationsstatus.

0 commit comments

Comments
 (0)