Skip to content

botagas/janitorr_gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Janitorr GUI

A simple Flask-based GUI for Janitorr to view scheduled media deletions and manage configuration. Currently only supports Jellyfin.

Features

  • View scheduled media deletions from Janitorr in a user-friendly dashboard
  • Edit Janitorr configuration directly from the web interface (YAML editor and tabbed forms)
  • Comparison tool for difference preview on value change
  • LDAP and legacy authentication
  • Auto-refresh dashboard for up-to-date status
  • Made to work as a systemd service

Requirements

  • Python 3.8+
  • Janitorr instance
  • Access to Janitorr's config and log files

Quick Start

  1. Create a virtual environment and activate it:
    python3 -m venv venv
    source venv/bin/activate
  2. Install dependencies:
    pip install -r requirements.txt
  3. Copy .env.example to .env and edit as needed:
    cp .env.example .env
  4. Run the app:
    flask run --port 5000

The app will be available at http://localhost:5000

Note

An example systemd service is provided in janitorr-gui.service file. The service example assumes that Janitorr is running as a janitorr.service systemd service.

Warning

This application is not designed, tested, or hardened for exposure to the public internet.
If you choose to make it accessible from the internet, you do so at your own risk.

Environment Variables

Variable Required Default Description
SECRET_KEY Yes dev Flask session secret key
JANITORR_CONFIG_PATH Yes /var/www/janitorr/application.yml Path to Janitorr's application.yml
JANITORR_LOG_PATH Yes /var/log/janitorr/janitorr.log Path to Janitorr's log file
JANITORR_WORKING_DIR No /var/www/janitorr Janitorr working directory
GUI_AUTO_REFRESH No 60 Dashboard auto-refresh interval (seconds)
GUI_LEGACY_AUTH_ENABLED No true Enable legacy (username/password) auth
GUI_LDAP_ENABLED No false Enable LDAP authentication

Note

More variables can be configured, for more info please refer to the .env.example file.

Authentication

Enable authentication by setting the relevant variables in your .env file:

  • GUI_LEGACY_AUTH_ENABLED=true enables username/password auth
  • GUI_LDAP_ENABLED=true enables LDAP auth

Deployment

For production, use a WSGI server (e.g., gunicorn) and a reverse proxy (e.g., nginx). Set environment variables in your systemd service or environment, or in .env.

Screenshots

Login Page

Login Page Login is available via LDAP or legacy authentication

Dashboard

Dashboard Sample entries are provided in the screenshot for demonstration purposes only

Config Tabs

Config Tabs Configuration is possible via separate tabs or YAML editor right in the dashboard

To-Do

Jellyseerr integration:

  • Add configuration tab for Jellyseerr (API key, base URL, etc.)
  • Fetch users from Jellyseerr and display users with missing Discord IDs
  • Allow admin to enter and update Discord IDs for users, saving via Jellyseerr API

Jellyfin integration:

  • Fetch tags for leaving soon media to identify requesters
  • Use tags to determine which user requested each media item

Notification system:

  • Send Discord notifications (via webhook or bot) to users with expiring media
  • Allow users to request extensions or contact admin

Project Structure

janitorr_gui/
├── app/
│   ├── __init__.py
│   ├── config.py
│   ├── jellyfin_client.py
│   ├── routes/
│   │   ├── __init__.py
│   │   └── main.py
│   ├── static/
│   │   ├── css/
│   │   │   ├── auth.css
│   │   │   ├── dashboard.css
│   │   │   ├── navigation.css
│   │   │   └── style.css
│   │   └── js/
│   │       └── main.js
│   ├── templates/
│   │   ├── base.html
│   │   ├── config_tabs.html
│   │   ├── index.html
│   │   └── login.html
│   └── utils/
│       ├── config_parser.py
│       ├── gui_config.py
│       ├── ldap_auth.py
│       ├── log_parser.py
│       ├── logs.py
│       ├── service.py
│       └── status_checker.py
├── conf/
│   └── janitorr-gui.service
├── requirements.txt
├── run.py
└── screenshots/
    ├── config.png
    ├── dashboard.png
    └── login.png

About

Simple Flask GUI for Janitorr

Resources

License

Stars

Watchers

Forks

Packages

No packages published