diff --git a/.env.example b/.env.example index 8980e7c..1b5ab6a 100644 --- a/.env.example +++ b/.env.example @@ -13,3 +13,7 @@ AWS_S3_PUBLIC_BUCKET=your-public-bucket-name # proxy), pin the callback explicitly: # OAUTH_REDIRECT_URI=http://localhost:8000/api/auth/google/callback # FRONTEND_URL=http://localhost:5175 + +# Local dev: show the full pipeline logs (yt-dlp/ffmpeg/debug) in the UI even +# when running in paid mode (BILLING_ENABLED). Cloud/prod leaves this unset. +# DEBUG_LOGS=true diff --git a/app.py b/app.py index 18ba070..32dd885 100644 --- a/app.py +++ b/app.py @@ -42,6 +42,8 @@ DISABLE_YOUTUBE_URL = os.environ.get("DISABLE_YOUTUBE_URL", "false").lower() in # when BILLING_ENABLED is set. With the flag off, the app behaves exactly as the # self-hosted BYOK app does today (no extra dependencies required). BILLING_ENABLED = os.environ.get("BILLING_ENABLED", "").lower() in ("1", "true", "yes") +# Force full pipeline logs to the client even under billing (local debugging). +DEBUG_LOGS = os.environ.get("DEBUG_LOGS", "").lower() in ("1", "true", "yes") if BILLING_ENABLED: import cloud @@ -539,8 +541,11 @@ def _visible_logs(logs): their own instance can debug. Cloud shows only the pipeline's own friendly progress lines (emoji-prefixed, plus the worker's start/finish markers) and hides the raw yt-dlp / ffmpeg / debug spew from paying users. + + DEBUG_LOGS=true forces the full output even under billing — for local dev + where you run in paid mode but still want the raw logs. """ - if not BILLING_ENABLED: + if not BILLING_ENABLED or DEBUG_LOGS: return logs visible = [] for ln in logs: