255 lines
11 KiB
Bash
255 lines
11 KiB
Bash
# =============================================================================
|
|
# Radio station configuration
|
|
# ---------------------------------------------------------------------------
|
|
# Copy this file to ".env" and edit the values. Every station only needs to
|
|
# touch this file — no PHP changes required.
|
|
#
|
|
# cp .env.example .env
|
|
#
|
|
# Booleans accept: true/false, 1/0, yes/no, on/off.
|
|
# Lines starting with # are comments. Quote values that contain spaces or #.
|
|
# =============================================================================
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Branding & metadata
|
|
# -----------------------------------------------------------------------------
|
|
SITE_NAME="My Radio"
|
|
# Short name used for og:site_name (defaults to SITE_NAME).
|
|
SITE_SHORT_NAME="My Radio"
|
|
SITE_TAGLINE="Streaming 24/7"
|
|
SITE_DESCRIPTION="Listen to my internet radio station 24/7 with all the music you can handle!"
|
|
SITE_KEYWORDS="radio, internet radio, music, live stream"
|
|
# Public URL of this site, with trailing slash. Used for canonical/OpenGraph tags.
|
|
SITE_URL="https://radio.example.com/"
|
|
SITE_LOCALE="en_US"
|
|
SITE_LANG="en"
|
|
SITE_AUTHOR=""
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# SEO / icons
|
|
# -----------------------------------------------------------------------------
|
|
# OpenGraph / share image. Absolute URL recommended (falls back to album art
|
|
# at runtime once a track is playing).
|
|
OG_IMAGE="https://radio.example.com/assets/icons/og.png"
|
|
OG_IMAGE_WIDTH=""
|
|
OG_IMAGE_HEIGHT=""
|
|
# Render the favicon / touch-icon links. The repo ships a default set in
|
|
# ICONS_DIR (favicon-96x96.png, favicon.svg, favicon.ico, apple-touch-icon.png,
|
|
# site.webmanifest, web-app-manifest-*.png) — replace them with your own.
|
|
SHOW_ICONS=true
|
|
ICONS_DIR="assets/icons"
|
|
# Browser UI colors.
|
|
THEME_COLOR="#e21d31"
|
|
TILE_COLOR="#5e656e"
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Stream (the audio the browser plays)
|
|
# -----------------------------------------------------------------------------
|
|
# Public URL of your stream mount (what nginx proxies to Icecast).
|
|
STREAM_URL="https://radio.example.com/stream"
|
|
STREAM_TYPE="audio/mpeg"
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Offline fallback (used when now-playing reports the stream is offline)
|
|
# -----------------------------------------------------------------------------
|
|
# Optional local/hosted audio to play when the live stream is down (looped like
|
|
# a "we'll be right back" bed). Leave blank to just show the offline art.
|
|
OFFLINE_STREAM_URL=""
|
|
# e.g. OFFLINE_STREAM_URL="assets/audio/offline.mp3"
|
|
OFFLINE_STREAM_TYPE="audio/mpeg"
|
|
OFFLINE_LOOP=true
|
|
# A distinct placeholder image shown while offline.
|
|
OFFLINE_ART="assets/img/offline.svg"
|
|
# Text shown in place of the track name / artist while offline.
|
|
OFFLINE_NAME="Off air"
|
|
OFFLINE_MESSAGE="We'll be right back"
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Now playing (metadata the SERVER fetches, then normalizes for the browser)
|
|
# -----------------------------------------------------------------------------
|
|
# provider: icecast | azuracast | shoutcast | custom
|
|
NOWPLAYING_PROVIDER="icecast"
|
|
|
|
# The status endpoint your PHP server fetches. This may be an internal address
|
|
# (e.g. http://127.0.0.1:8000/...) since only the server hits it.
|
|
# icecast -> http://127.0.0.1:8000/status-json.xsl
|
|
# azuracast -> https://azura.example.com/api/nowplaying/your_station_shortcode
|
|
# shoutcast -> http://127.0.0.1:8000/stats?json=1
|
|
# custom -> any URL returning JSON
|
|
NOWPLAYING_URL="http://127.0.0.1:8000/status-json.xsl"
|
|
|
|
# Icecast only: if you run multiple mounts, name the one to read (e.g. /stream).
|
|
ICECAST_MOUNT=""
|
|
|
|
# How to split a combined "Artist<delim>Title" string (Icecast/Shoutcast).
|
|
# The original dou.bet station uses " <-|-> ". Most setups use " - ".
|
|
TITLE_DELIMITER=" - "
|
|
|
|
# Polling / timeouts (seconds).
|
|
NOWPLAYING_POLL_SECONDS=10
|
|
NOWPLAYING_TIMEOUT=5
|
|
|
|
# Clean junk out of titles. Separate entries with "||". With CLEANUP_IS_REGEX
|
|
# each entry is a case-insensitive regex (no delimiters), otherwise it is a
|
|
# literal string removed wherever it appears.
|
|
# literal example:
|
|
# TITLE_CLEANUP=".mp3|| [Explicit]|| (Radio Edit)|| (Remastered)|| (Live)|| (Demo)"
|
|
# regex example (strips any "(... Remaster ...)" or "(... Mix)"):
|
|
# TITLE_CLEANUP="\s*\([^)]*remaster[^)]*\)|\s*\([^)]*mix\)"
|
|
# CLEANUP_IS_REGEX=true
|
|
TITLE_CLEANUP=""
|
|
CLEANUP_IS_REGEX=false
|
|
|
|
# --- custom provider only: JSON field paths (dot notation, arrays ok: a.b.0.c)
|
|
CUSTOM_ARTIST_PATH=""
|
|
CUSTOM_TITLE_PATH=""
|
|
CUSTOM_ALBUM_PATH=""
|
|
CUSTOM_ART_PATH=""
|
|
CUSTOM_LISTENERS_PATH=""
|
|
# If your feed only has a single combined field, set this instead of
|
|
# CUSTOM_ARTIST_PATH/CUSTOM_TITLE_PATH; it is split on TITLE_DELIMITER.
|
|
CUSTOM_TITLE_COMBINED_PATH=""
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Artwork & lyrics (Genius is optional)
|
|
# -----------------------------------------------------------------------------
|
|
# source: auto | provider | genius | none
|
|
# auto = use provider art if present, else Genius (if configured), else fallback
|
|
# provider = only use art the stream provider itself supplies (e.g. AzuraCast)
|
|
# genius = always look art up on Genius
|
|
# none = always use the fallback image
|
|
ARTWORK_SOURCE="auto"
|
|
FALLBACK_ART="assets/img/placeholder.svg"
|
|
|
|
# Optional Last.fm fallback used when Genius has no cover art.
|
|
# Get a key at https://www.last.fm/api/account/create
|
|
LASTFM_API_KEY=""
|
|
|
|
# Show a "Show lyrics" button. Lyrics are looked up on LRCLIB (free, no key)
|
|
# first, falling back to Genius below only if LRCLIB has nothing.
|
|
LYRICS_ENABLED=true
|
|
# Prefer the first English-language match on Genius (costs a few extra API
|
|
# calls per song). Useful if your library has many non-English duplicates.
|
|
# Only applies to the Genius fallback.
|
|
LYRICS_PREFER_ENGLISH=false
|
|
|
|
# Genius API token — optional, only used as a lyrics fallback when LRCLIB has
|
|
# nothing (still used as the primary/only source for album art lookups).
|
|
# Ignored when USE_DUMB is on below. Get one at https://genius.com/api-clients
|
|
# (Client Access Token). Provide EITHER the plain token...
|
|
GENIUS_TOKEN=""
|
|
# ...OR a base64-encoded token (kept for compatibility with the original project).
|
|
GENIUS_API_BASE64=""
|
|
|
|
# dumb (https://github.com/rramiachraf/dumb): a lightweight Genius frontend/
|
|
# proxy. When on, it replaces the official Genius API as the lyrics/artwork
|
|
# source above — no GENIUS_TOKEN needed. Point it at a public instance (see
|
|
# https://github.com/rramiachraf/dumb#public-instances, e.g.
|
|
# https://dumb.ducks.party) or your own self-hosted one.
|
|
USE_DUMB=false
|
|
DUMB_URL=""
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Theme & colors (also drives CSS variables — restyle without editing CSS)
|
|
# -----------------------------------------------------------------------------
|
|
THEME_BG="#000000"
|
|
THEME_BG_MOBILE="#262626"
|
|
THEME_SURFACE="#1a1a1a"
|
|
THEME_TEXT="#ffffff"
|
|
THEME_MUTED="#bfbfbf"
|
|
THEME_ACCENT="#e21d31"
|
|
THEME_ACCENT_HOVER="#cf1b2d"
|
|
THEME_ACCENT_TEXT="#000000"
|
|
THEME_RADIUS="15px"
|
|
THEME_FONT="Helvetica, Calibri, Tahoma, Verdana, Arial, sans-serif"
|
|
# Recolor the page background to match the current album art (auto light/dark
|
|
# text). Needs CORS-accessible art to sample; falls back gracefully otherwise.
|
|
THEME_DYNAMIC_BG=true
|
|
# "Liquid Glass" refraction effect on the menu/lyrics/mute/playpause buttons,
|
|
# replacing their flat THEME_ACCENT fill with a frosted, distorted glass look
|
|
# (technique from https://github.com/nikdelvin/liquid-glass). Falls back to a
|
|
# plain blur on browsers without backdrop-filter SVG-filter support.
|
|
THEME_LIQUID_GLASS=false
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Player
|
|
# -----------------------------------------------------------------------------
|
|
# rich = custom play/pause button, seek + volume sliders, elapsed time, LIVE badge
|
|
# simple = plain native <audio controls>
|
|
PLAYER_STYLE="rich"
|
|
PLAYER_AUTOPLAY=false
|
|
# Expose track info to OS / lock-screen media controls (MediaSession API).
|
|
MEDIASESSION=true
|
|
# Swap the OpenGraph share image and the browser favicon to the current
|
|
# album art as tracks change.
|
|
DYNAMIC_META=true
|
|
|
|
# Real-time scrolling waveform (Web Audio), shown after the listener presses
|
|
# play. It routes playback through Web Audio, so if your STREAM_URL is on a
|
|
# DIFFERENT origin than the site it must send an Access-Control-Allow-Origin
|
|
# header — set WAVEFORM_STREAM_CORS=true once it does, or the waveform is
|
|
# auto-disabled to avoid silencing the audio. Same-origin streams need nothing.
|
|
WAVEFORM_ENABLED=false
|
|
WAVEFORM_HEIGHT=72
|
|
# Bar color; blank uses your THEME_ACCENT.
|
|
WAVEFORM_COLOR=""
|
|
# Seconds of history shown across the width before peaks scroll off.
|
|
WAVEFORM_WINDOW_SECONDS=30
|
|
# Set true only if a cross-origin stream sends CORS headers.
|
|
WAVEFORM_STREAM_CORS=false
|
|
|
|
# Which visualizer styles are exposed to visitors, comma-separated, from:
|
|
# bars | line | vu | spectrum | spectrum-mirror | blob | circular | glow
|
|
# The first six render below the art and are mutually exclusive — visitors
|
|
# pick one. circular (ring around the art) and glow (art pulses) are
|
|
# independent toggles that can combine with a below-art style and with each
|
|
# other. A picker appears automatically whenever more than one style is
|
|
# listed here; with just one (or unset), it's hidden and that style is
|
|
# simply always on, same as before this setting existed.
|
|
# Example enabling the picker with a ring + glow option:
|
|
# WAVEFORM_TYPES="bars,spectrum,circular,glow"
|
|
WAVEFORM_TYPES="bars"
|
|
# Which of the exposed styles above are active by default, comma-separated,
|
|
# before a visitor picks anything (their choice is then remembered in their
|
|
# browser). Blank defaults to "bars" if exposed, else the first exposed
|
|
# below-art style.
|
|
WAVEFORM_DEFAULT=""
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Listeners / history
|
|
# -----------------------------------------------------------------------------
|
|
SHOW_LISTENERS=true
|
|
# Optional: wrap the listener count in a link (e.g. a directory listing).
|
|
LISTENERS_LINK=""
|
|
# Show the slide-out "recently played" history table.
|
|
SHOW_HISTORY=true
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Analytics (optional — leave blank to disable)
|
|
# -----------------------------------------------------------------------------
|
|
MATOMO_URL=""
|
|
MATOMO_SITE_ID=""
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Runtime
|
|
# -----------------------------------------------------------------------------
|
|
TIMEZONE="UTC"
|
|
DEBUG=false
|
|
SHOW_ERRORS=false
|
|
|
|
# User-Agent sent with every outbound request this server makes (Genius,
|
|
# Last.fm, LRCLIB, custom now-playing feeds). Override this per deployment if
|
|
# you run more than one station and want each to identify itself distinctly.
|
|
OUTBOUND_USER_AGENT="radio/2026.07 (+https://git.dou.bet/iamdoubz/radio)"
|