Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 13 additions & 57 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,72 +1,28 @@
# JellyJams Configuration Example
# Copy this file to .env and update the values for your setup

# Jellyfin Server Configuration
# General Settings
JELLYJAMS_LOG_LEVEL=INFO
JELLYJAMS_DATA_DIR_HOST=./jellyjams
ENABLE_WEB_UI=true
WEB_PORT=5000
WEBUI_BASIC_AUTH_ENABLED=false
WEBUI_BASIC_AUTH_USERNAME=admin
WEBUI_BASIC_AUTH_PASSWORD=admin

# Jellyfin Integration
JELLYFIN_URL=http://jellyfin:8096
JELLYFIN_API_KEY=
PLAYLIST_DIR_HOST=/host/path/to/jellyfin/config/data/playlists
MUSIC_DIR_HOST=/host/path/to/music
MUSIC_DIR_CONTAINER=/jellyfin/container/path/to/music

# Playlist Configuration
GENERATION_INTERVAL=24
MAX_TRACKS_PER_PLAYLIST=100
MIN_TRACKS_PER_PLAYLIST=5

# Playlist types to generate (comma-separated: Genre,Year,Artist,Personal)
PLAYLIST_TYPES=Genre,Year,Artist,Personal

# User configuration for personalized playlists
# Users to generate personal playlists for (comma-separated usernames, or 'all' for all users)
PERSONAL_PLAYLIST_USERS=all
# Default setting for new users (true/false)
PERSONAL_PLAYLIST_NEW_USERS_DEFAULT=true
# Minimum tracks required for a user to get personalized playlists
PERSONAL_PLAYLIST_MIN_USER_TRACKS=10

# Minimum number of different artists required for genre and year playlists
MIN_ARTIST_DIVERSITY=5

# Discovery playlist diversity controls
# Maximum songs per album in discovery playlists (default: 1)
DISCOVERY_MAX_SONGS_PER_ALBUM=1
# Maximum songs per artist in discovery playlists (default: 2)
DISCOVERY_MAX_SONGS_PER_ARTIST=2

# Minimum albums required per artist to create artist playlists (default: 2)
MIN_ALBUMS_PER_ARTIST=2

# Trigger Jellyfin media library scan after playlist creation (default: true)
TRIGGER_LIBRARY_SCAN=true

# Spotify API Configuration (optional - for artist playlist cover art)
# Get these from https://developer.spotify.com/dashboard
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here
# Enable/disable Spotify cover art downloads (true/false)
SPOTIFY_COVER_ART_ENABLED=false

# Genres to exclude from playlists (comma-separated)
EXCLUDED_GENRES=

# Track Shuffling (true/false)
SHUFFLE_TRACKS=true

# Web UI Configuration
ENABLE_WEB_UI=true
WEB_PORT=5000

# Web UI Security (Optional)
# Basic authentication for web interface - disabled by default
# Environment variables override web UI settings
WEBUI_BASIC_AUTH_ENABLED=false
WEBUI_BASIC_AUTH_USERNAME=admin
WEBUI_BASIC_AUTH_PASSWORD=admin
# Match Jellyfin's user and group ID
PUID=1000
PGID=1000

# Discord Notifications (Optional)
# Send summary notifications after playlist generation and cover art updates
DISCORD_WEBHOOK_ENABLED=false
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your_webhook_url_here

# Logging Configuration
LOG_LEVEL=INFO
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ FROM python:3.11-alpine
# Set working directory and copy app files
WORKDIR /app
COPY app /app
RUN chmod +x /app/start.sh
RUN chmod +x /app/*.sh

# Install required packages
RUN apk add --no-cache su-exec
RUN pip install --no-cache-dir -r /app/requirements.txt

# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV JELLYFIN_URL=http://jellyfin:8096
ENV LOG_LEVEL=INFO
ENV GENERATION_INTERVAL=24
ENV LOG_LEVEL=DEBUG
ENV ENABLE_WEB_UI=true
ENV WEB_PORT=5000

# Expose web UI port
EXPOSE 5000

# Run the startup script
CMD ["/app/start.sh"]
# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]
93 changes: 16 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ I'd love your feedback on:
- UI/UX suggestions


## ⚠️ Important Update (2025-09-08)
## ⚠️ Important Update (2025-09-09)

We changed how folders are bound into the container to simplify setup and improve compatibility.

- Update your `.env` to use these variables:
- `JELLYJAMS_DATA_DIR_HOST=/mnt/user/appdata/jelljams`
- `PLAYLIST_DIR_HOST=/mnt/user/appdata/jellyfin/data/playlists`
- `MUSIC_DIR_HOST=/path/to/your/music` (e.g., `/mnt/user/media/data/music`)
- `MUSIC_DIR_CONTAINER=/path/to/your/music` (must match the path that Jellyfin uses inside its container)
- The old `PLAYLIST_FOLDER` environment variable is no longer used. Please remove it if present.
- Most of the playlist settings have been moved to web UI only. Please reference `.env.example`.
- Compose volumes should look like this:
- Host app data → `/data`
- Jellyfin playlists → `/playlists`
Expand Down Expand Up @@ -115,8 +117,7 @@ JellyJams includes optional basic authentication to protect the web interface:

### Basic Authentication
- **Default**: Disabled for easy setup
- **Configuration**: Via environment variables or web UI settings
- **Override**: Environment variables take precedence over web UI settings
- **Configuration**: Via environment variables only

#### Environment Variables
```bash
Expand All @@ -125,14 +126,6 @@ WEBUI_BASIC_AUTH_USERNAME=your_username
WEBUI_BASIC_AUTH_PASSWORD=your_password
```

#### Web UI Configuration
1. Navigate to **Settings** → **Advanced Settings**
2. Enable "Basic Authentication"
3. Set username and password
4. Save settings

**Note**: Environment variables override web UI settings, allowing administrators to enforce authentication policies.

## 🎨 Cover Art System
- **Multi-Tier Cover Art System** - Comprehensive fallback system for all playlist types
- **Custom Generated Covers** - "This is [Artist]" text overlays on artist folder images
Expand Down Expand Up @@ -189,7 +182,7 @@ Fine-tune discovery playlists for better variety:
- Configurable via web UI settings

### 🔄 Automatic Library Refresh
JellyJams automatically triggers a Jellyfin media library scan after playlist creation to ensure playlists appear immediately in your Jellyfin interface.
JellyJams automatically triggers a Jellyfin media library scan after playlist creation to ensure playlists appear immediately in your Jellyfin interface. This can be disabled in .env.

## 📁 Generated Playlists

Expand Down Expand Up @@ -230,64 +223,16 @@ Playlists are saved in Jellyfin-compatible XML format:

### Docker Compose (Recommended)

```yaml
version: '3.8'

services:
jellyjams:
image: jonasmore/jellyjams:latest
container_name: jellyjams
environment:
# Default values are set here like ${VAR_NAME:-DEFAULT_VALUE}
# in case they aren't provided in the .env file. If you use the
# .env file, there is no need to change the default values.

# Essential container settings (not configurable via web UI)
- JELLYFIN_URL=${JELLYFIN_URL:-http://jellyfin:8096}
- JELLYFIN_API_KEY=${JELLYFIN_API_KEY}
- ENABLE_WEB_UI=${ENABLE_WEB_UI:-true}
- WEB_PORT=${WEB_PORT:-5000}
# Default fallback values (web UI settings will override these)
- LOG_LEVEL=${LOG_LEVEL:-DEBUG}
- GENERATION_INTERVAL=${GENERATION_INTERVAL}
- MAX_TRACKS_PER_PLAYLIST=${MAX_TRACKS_PER_PLAYLIST}
- MIN_TRACKS_PER_PLAYLIST=${MIN_TRACKS_PER_PLAYLIST}
- EXCLUDED_GENRES=${EXCLUDED_GENRES}
- SHUFFLE_TRACKS=${SHUFFLE_TRACKS}
- PLAYLIST_TYPES=${PLAYLIST_TYPES}
# Web UI Security (environment variables override web UI settings)
- WEBUI_BASIC_AUTH_ENABLED=${WEBUI_BASIC_AUTH_ENABLED}
- WEBUI_BASIC_AUTH_USERNAME=${WEBUI_BASIC_AUTH_USERNAME}
- WEBUI_BASIC_AUTH_PASSWORD=${WEBUI_BASIC_AUTH_PASSWORD}
# Discord Notifications
- DISCORD_WEBHOOK_ENABLED=${DISCORD_WEBHOOK_ENABLED}
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
volumes:
# JellyJams app data - bind to existing host directory
- ./jellyjams:/data
# Read-only access to music directory for cover art generation
- ${MUSIC_DIR_HOST}:${MUSIC_DIR_CONTAINER}:ro
# Jellyfin playlists directory for playlist and art management
- ${PLAYLIST_DIR_HOST}:/playlists
ports:
- "${WEB_PORT:-5000}:${WEB_PORT:-5000}"
restart: unless-stopped
```
1. Use the included [docker-compose.yml](docker-compose.yml)
2. Copy [.env.example](.env.example). to .env
3. Enter your settings in your .env file

### Unraid Deployment

For Unraid users, bind app data to `/mnt/user/appdata/jellyjams/` for persistent storage:

```yaml
volumes:
# JellyJams app data
- /mnt/user/appdata/jellyjams:/data
# Read-only access to music directory for cover art generation
- ${MUSIC_DIR_HOST}:${MUSIC_DIR_CONTAINER}:ro
# Jellyfin playlists directory for playlist and art management
- ${PLAYLIST_DIR_HOST}:/playlists
For Unraid users, bind app data to `/mnt/user/appdata/jellyjams/` for persistent storage. If you are using the included [docker-compose.yml](docker-compose.yml), set these values in your `.env` file.

# Set these vars in your .env
```bash
JELLYJAMS_DATA_DIR_HOST=/mnt/user/appdata/jellyjams
PLAYLIST_DIR_HOST=/mnt/user/appdata/jellyfin/data/playlists
MUSIC_DIR_HOST=/mnt/user/media/data/music
MUSIC_DIR_CONTAINER=/mnt/user/media/data/music
Expand Down Expand Up @@ -340,21 +285,15 @@ jellyjams/
├── Dockerfile # Container definition
├── docker-compose.yml # Docker Compose config
└── app/ # Container app files
├── entrypoint.sh # App entrypoint
├── start.sh # App startup script
├── requirements.txt # Python dependencies
├── vibecodeplugin.py # Main playlist generator
├── webapp.py # Flask web UI
├── start.sh # Container startup script
├── requirements.txt # Python dependencies
└── cover # Default playlist images
└── cover # Customizable playlist images
├── Playlist Name.jpg
└── static/ # WebUI assets
└── css/
├── app.css
└── static/ # WebUI resources
└── templates/ # HTML templates
├── base.html
├── index.html
├── settings.html
├── playlists.html
└── logs.html
```

## 🤝 Contributing
Expand Down
Loading
Loading