diff --git a/.env.example b/.env.example index 44d2d43..5f1d41a 100644 --- a/.env.example +++ b/.env.example @@ -68,3 +68,12 @@ TRANSCRIPTS_HOST_DIR=/mnt/nfs/transcripts # MODELS_HOST_DIR=./models # MEILI_DATA_HOST_DIR=./data/meili # REDIS_DATA_HOST_DIR=./data/redis + +# RSS / Podcast downloads +# Where to save downloaded podcast audio (inside the container mount) +PODCASTS_ROOT=/library +# Organize under per-show subfolders (true/false) +PODCASTS_PER_SHOW=true +# Scan interval (minutes) for rss_ingest; set RSS_ONCE=1 for one-shot +# RSS_SCAN_MINUTES=120 +# RSS_ONCE=0 diff --git a/README.md b/README.md index 52ba494..64f60ad 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,15 @@ By default we build from `python:3.11-slim`. You can override the base image at - `MEDIA_NORMALIZE_KEEP_ORIGINAL` (default `0`): Preserve the source file alongside the normalised copy (appends `.orig*`). - `VIDEO_NORMALIZE_*`: Fine-tune video conversion (`VIDEO_NORMALIZE_CODEC`, `VIDEO_NORMALIZE_EXTENSION`, `VIDEO_NORMALIZE_CRF`, `VIDEO_NORMALIZE_PRESET`, `VIDEO_NORMALIZE_AUDIO_CODEC`, `VIDEO_NORMALIZE_AUDIO_BITRATE`). - `AUDIO_NORMALIZE_*`: Control audio conversion (`AUDIO_NORMALIZE_CODEC`, `AUDIO_NORMALIZE_EXTENSION`, `AUDIO_NORMALIZE_BITRATE`, `AUDIO_NORMALIZE_CHANNELS`). +- `PODCASTS_ROOT` (default `/library`): Target directory inside the container where RSS podcast audio is saved. +- `PODCASTS_PER_SHOW` (default `true`): Organize episodes into per-show subfolders under `PODCASTS_ROOT`. ## RSS Ingestion PodX supports automated podcast ingestion via RSS feeds: - Add your podcast RSS feed URLs to a `feeds.txt` file, one URL per line. -- The `rss_ingest` component reads this list periodically, downloads new episodes, and places them into the `library/podcasts` folder. +- The `rss_ingest` component reads this list periodically, downloads new episodes, and places them into `PODCASTS_ROOT` (default `/library`), optionally into per-show subfolders if `PODCASTS_PER_SHOW=true`. - Downloaded podcasts are then processed by the scanner and worker to generate transcripts, metadata, and thumbnails. ## Refresh Mechanism diff --git a/app/rss_ingest.py b/app/rss_ingest.py index decfcfd..6d1b338 100644 --- a/app/rss_ingest.py +++ b/app/rss_ingest.py @@ -24,7 +24,8 @@ MEDIA_EXTS = {".mp3", ".m4a", ".flac", ".wav", ".ogg", ".opus", ".mp4", ".m4v", TITLE_MATCH_THRESHOLD = float(os.getenv("RSS_TITLE_MATCH_THRESHOLD", "0.60")) # Download podcast audio (enclosures) to a local library -PODCASTS_ROOT = Path(os.getenv("PODCASTS_ROOT", str(LIB / "Podcasts"))) +# Default to saving directly under LIB (no extra "Podcasts" subfolder) +PODCASTS_ROOT = Path(os.getenv("PODCASTS_ROOT", str(LIB))) PODCASTS_PER_SHOW = os.getenv("PODCASTS_PER_SHOW", "true").lower() in {"1","true","yes","y"} DOWNLOAD_AUDIO = os.getenv("RSS_DOWNLOAD_AUDIO", "true").lower() in {"1","true","yes","y"} @@ -457,4 +458,4 @@ if __name__ == "__main__": print(f"[rss] build error: {e}", flush=True) if RSS_ONCE: break - time.sleep(max(1, RSS_SCAN_MINUTES) * 60) \ No newline at end of file + time.sleep(max(1, RSS_SCAN_MINUTES) * 60) diff --git a/docker-compose.yml b/docker-compose.yml index 9444779..81c6876 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -306,6 +306,8 @@ services: REDIS_URL: redis://redis:6379/0 LIBRARY_ROOT: /library TRANSCRIPT_ROOT: /library + PODCASTS_ROOT: /library + PODCASTS_PER_SHOW: ${PODCASTS_PER_SHOW:-true} FEEDS_FILE: /library/feeds.txt RSS_STATE_FILE: /library/.rss_state.json RSS_SCAN_MINUTES: ${RSS_SCAN_MINUTES:-120}