-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
376 lines (361 loc) · 22.9 KB
/
Copy path.env.example
File metadata and controls
376 lines (361 loc) · 22.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# IPTV Tunerr — provider credentials and settings
# Copy this file to .env and fill in your values. Never commit .env.
# cp .env.example .env
#
# Most users should start with the much smaller .env.minimal.example instead:
# cp .env.minimal.example .env
# iptv-tunerr setup-doctor
# --------------- Provider credentials ---------------
# Username and password from your Xtream-compatible provider.
# Optional: read from a subscription file (e.g. ~/Documents/iptv.subscription.txt) if user/pass unset.
# IPTV_TUNERR_SUBSCRIPTION_FILE=$HOME/Documents/iptv.subscription.txt
IPTV_TUNERR_PROVIDER_USER=your_username
IPTV_TUNERR_PROVIDER_PASS=your_password
# Provider host/URL: one base URL, or comma-separated list to probe (first HTTP 200 used).
# Cloudflare is flagged only when Server: cloudflare or a challenge page is returned;
# add all known hosts so a valid one can be chosen.
IPTV_TUNERR_PROVIDER_URL=http://your-provider-host.example.com
# IPTV_TUNERR_PROVIDER_URLS=http://host1.com,http://host2.com,http://backup.com
# --------------- Optional: full M3U URL ---------------
# If you prefer to paste the full SmartTV/M3U URL instead of host+user+pass, set it here.
# Otherwise the app builds: PROVIDER_URL/get.php?username=USER&password=PASS&type=m3u_plus&output=ts
# IPTV_TUNERR_M3U_URL=http://host/get.php?username=USER&password=PASS&type=m3u_plus&output=ts
# --------------- Paths (optional) ---------------
# IPTV_TUNERR_CATALOG=./catalog.json
# IPTV_TUNERR_MOUNT=/mnt/vodfs
# IPTV_TUNERR_CACHE=/var/cache/iptvtunerr
# --------------- Tuner identity (optional) ---------------
# IPTV_TUNERR_TUNER_COUNT=2
# Max channels in lineup. Plex DVR fails to save a lineup above ~480; capped at 480 by default.
# Set to 0 to use the default. Set to a higher number only with the injection path (no wizard limit).
# IPTV_TUNERR_LINEUP_MAX_CHANNELS=480
# Stable device identifier and display name shown in the media server's tuner list.
# IPTV_TUNERR_DEVICE_ID=iptvtunerr01
# IPTV_TUNERR_FRIENDLY_NAME=IPTV Tunerr
# Optional lineup split helpers. Example: set the primary DVR to exclude sports_na,
# and run a second DVR with IPTV_TUNERR_LINEUP_RECIPE=sports_na.
# IPTV_TUNERR_LINEUP_RECIPE=locals_first
# IPTV_TUNERR_LINEUP_EXCLUDE_RECIPE=sports_na
# IPTV_TUNERR_LINEUP_EXCLUDE_CHANNEL_IDS=123,456,tvg.example
# Base URL the media server (Plex/Emby/Jellyfin) will use to reach this tuner. Required.
# IPTV_TUNERR_BASE_URL=http://192.168.1.10:5004
# --------------- Operator web UI (optional) ---------------
# Dedicated dashboard listener. Default port 48879 = 0xBEEF.
# IPTV_TUNERR_WEBUI_DISABLED=false
# IPTV_TUNERR_WEBUI_PORT=48879
# IPTV_TUNERR_WEBUI_ALLOW_LAN=false
# IPTV_TUNERR_WEBUI_STATE_FILE=/var/lib/iptvtunerr/webui-state.json
# IPTV_TUNERR_WEBUI_USER=admin
# IPTV_TUNERR_WEBUI_PASS=change-me
# Legacy lightweight /ui/ pages remain on the main tuner port.
# IPTV_TUNERR_UI_DISABLED=false
# IPTV_TUNERR_UI_ALLOW_LAN=false
# --------------- HDHomeRun network mode (optional) ---------------
# Enable native HDHomeRun protocol (UDP 65001 + TCP 65001) for LAN broadcast discovery.
# IPTV_TUNERR_HDHR_NETWORK_MODE=false
# IPTV_TUNERR_HDHR_DEVICE_ID=12345678
# IPTV_TUNERR_HDHR_TUNER_COUNT=2
# --------------- Streaming (optional) ---------------
# Buffer: default auto (adaptive when transcoding). 0 = off. Fixed bytes e.g. 2097152 = 2 MiB.
# IPTV_TUNERR_STREAM_BUFFER_BYTES=auto
# Transcode: off = remux only; on = always; auto = ffprobe per tune, transcode only if not Plex-friendly (HEVC/VP9).
# auto_cached = remux-first using ONLY IPTV_TUNERR_TRANSCODE_OVERRIDES_FILE (no ffprobe; unlisted channels remux).
# IPTV_TUNERR_STREAM_TRANSCODE=off
# Per-channel transcode JSON (keys: channel_id, guide_number, or tvg_id). Merges on top of off/on/auto; overrides global mode for listed channels.
# With auto_cached, the file is the sole source (still keyed the same way).
# IPTV_TUNERR_TRANSCODE_OVERRIDES_FILE=
# Per-channel ffmpeg profile JSON (same key order). See docs/reference/transcode-profiles.md.
# IPTV_TUNERR_PROFILE_OVERRIDES_FILE=
# Optional: JSON map of custom ?profile= names → { "base_profile", "transcode"?, "output_mux"?, "description"? }.
# IPTV_TUNERR_STREAM_PROFILES_FILE=
# Optional: when a named profile prefers output_mux="hls", Tunerr starts a short-lived ffmpeg HLS packager.
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_DIR=/var/tmp/iptvtunerr-hls
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_STARTUP_TIMEOUT_MS=8000
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_FILE_WAIT_TIMEOUT_MS=4000
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_IDLE_SEC=45
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_MAX_AGE_SEC=300
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_LIST_SIZE=6
# IPTV_TUNERR_FFMPEG_HLS_PACKAGER_SEGMENT_SECONDS=2
# Optional: absolute base for ?mux=hls playlist lines (same host as IPTV_TUNERR_BASE_URL if clients need absolute URLs).
# IPTV_TUNERR_STREAM_PUBLIC_BASE_URL=http://192.168.1.10:5004
# Optional: CORS for ?mux=hls (playlist + seg) and OPTIONS preflight (browser/devtools). Default off.
# IPTV_TUNERR_HLS_MUX_CORS=false
# Retry and retry-backoff for upstream responses that look like provider limit/concurrency pressure.
# IPTV_TUNERR_UPSTREAM_RETRY_LIMIT=2
# IPTV_TUNERR_UPSTREAM_RETRY_BACKOFF_MS=1000
# Optional: cap concurrent ?mux=hls&seg= proxy requests (default = effective tuner limit × IPTV_TUNERR_HLS_MUX_SEG_SLOTS_PER_TUNER, default 8).
# IPTV_TUNERR_HLS_MUX_MAX_CONCURRENT=
# IPTV_TUNERR_HLS_MUX_SEG_SLOTS_PER_TUNER=8
# Temporary bonus seg slots from recent 503 limit hits (ignored if HLS_MUX_MAX_CONCURRENT is set).
# IPTV_TUNERR_HLS_MUX_SEG_SLOTS_AUTO=false
# IPTV_TUNERR_HLS_MUX_SEG_AUTO_WINDOW_SEC=60
# IPTV_TUNERR_HLS_MUX_SEG_AUTO_BONUS_PER_HIT=4
# IPTV_TUNERR_HLS_MUX_SEG_AUTO_BONUS_CAP=64
# Append JSON lines (redacted URL) for each successful seg= completion.
# IPTV_TUNERR_HLS_MUX_ACCESS_LOG=
# Extra seg= slots from Autopilot memory (best Hits per dna_id); disabled when HLS_MUX_MAX_CONCURRENT set.
# IPTV_TUNERR_HLS_MUX_SEG_AUTOPILOT_BONUS=false
# IPTV_TUNERR_HLS_MUX_SEG_AUTOPILOT_MIN_HITS=3
# IPTV_TUNERR_HLS_MUX_SEG_AUTOPILOT_BONUS_PER_STEP=4
# IPTV_TUNERR_HLS_MUX_SEG_AUTOPILOT_BONUS_CAP=32
# Optional: max URL-decoded length of seg= (default 262144 bytes).
# IPTV_TUNERR_HLS_MUX_MAX_SEG_PARAM_BYTES=
# Reject seg= URLs whose host is a literal private/loopback/link-local IP (default true; hostnames not resolved).
# IPTV_TUNERR_HLS_MUX_DENY_LITERAL_PRIVATE_UPSTREAM=true
# Optional: max bytes of upstream error body for seg= HTTP error pass-through (default 8192).
# IPTV_TUNERR_HLS_MUX_UPSTREAM_ERR_BODY_MAX=
# Resolve seg= hostname and block if any A/AAAA is private/link-local (DNS errors -> allow + log).
# IPTV_TUNERR_HLS_MUX_DENY_RESOLVED_PRIVATE_UPSTREAM=false
# Per-client-IP token bucket max seg= requests/sec (0 = unlimited).
# IPTV_TUNERR_HLS_MUX_SEG_RPS_PER_IP=
# Serve /debug/hls-mux-demo.html (hls.js sample) behind the operator localhost/LAN gate. Still set HLS_MUX_CORS for cross-origin.
# IPTV_TUNERR_HLS_MUX_WEB_DEMO=false
# Reject Xtream VOD/movie/series upstream URLs whose host is a literal private/loopback/link-local IP (default true; hostnames not resolved).
# IPTV_TUNERR_XTREAM_VOD_DENY_LITERAL_PRIVATE_UPSTREAM=true
# Reject virtual-channel movie/episode upstream URLs whose host is a literal private/loopback/link-local IP (default true; hostnames not resolved).
# IPTV_TUNERR_VIRTUAL_CHANNEL_DENY_LITERAL_PRIVATE_UPSTREAM=true
# Prometheus: GET /metrics + mux counters + iptv_tunerr_mux_seg_request_duration_seconds histogram
# IPTV_TUNERR_METRICS_ENABLE=false
# Add channel_id label to mux metrics (HIGH cardinality — use only when you understand Prometheus cost).
# IPTV_TUNERR_METRICS_MUX_CHANNEL_LABELS=false
# DASH: expand uniform SegmentTemplate (duration/timescale + $Number$) to SegmentList before MPD rewrite (default off; can be large).
# IPTV_TUNERR_HLS_MUX_DASH_EXPAND_SEGMENT_TEMPLATE=false
# Cap segments per expanded template (default 10000, hard max 500000).
# IPTV_TUNERR_HLS_MUX_DASH_EXPAND_MAX_SEGMENTS=
# Accept-Encoding: br and decompress brotli responses (shared HTTP client + mux fetches).
# IPTV_TUNERR_HTTP_ACCEPT_BROTLI=false
# Shared HTTP client MaxIdleConnsPerHost (default 16).
# IPTV_TUNERR_HTTP_MAX_IDLE_CONNS_PER_HOST=
# Shared HTTP client MaxIdleConns across all hosts (default 100).
# IPTV_TUNERR_HTTP_MAX_IDLE_CONNS=
# Idle connection lifetime in seconds (default 90). See docs/reference/plex-livetv-http-tuning.md.
# IPTV_TUNERR_HTTP_IDLE_CONN_TIMEOUT_SEC=
# Override ffmpeg binary path (useful if system ffmpeg is broken on HLS inputs).
# IPTV_TUNERR_FFMPEG_PATH=/opt/ffmpeg-static/current/ffmpeg
# Disable DNS resolution for FFmpeg input URL (keep hostname instead of rewriting to IP).
# Useful when CDN validates Host header matches URL hostname.
# IPTV_TUNERR_FFMPEG_NO_DNS_RESOLVE=1
# Disable FFmpeg entirely - use Go relay for HLS segments (slower but passes correct headers/cookies).
# IPTV_TUNERR_FFMPEG_DISABLED=1
# Enable HLS reconnect options in ffmpeg (retry on segment/playlist errors).
# IPTV_TUNERR_FFMPEG_HLS_RECONNECT=true
# Conservative provider-aware runtime tuning (default true). Currently used to auto-arm
# ffmpeg HLS reconnect after Tunerr has observed HLS instability and only when the reconnect
# env was not explicitly set by the operator.
# IPTV_TUNERR_PROVIDER_AUTOTUNE=true
# Optional: skip repeatedly failing upstream hosts during live walk when backups exist (requires autotune).
# IPTV_TUNERR_PROVIDER_AUTOTUNE_HOST_QUARANTINE=false
# IPTV_TUNERR_PROVIDER_AUTOTUNE_HOST_QUARANTINE_AFTER=3
# IPTV_TUNERR_PROVIDER_AUTOTUNE_HOST_QUARANTINE_SEC=900
# Client adaptation: detect Plex Web/browser client and apply websafe (transcode + MP3 audio) automatically.
# IPTV_TUNERR_CLIENT_ADAPT=false
# Sticky WebSafe fallback when a non-browser adaptation path fails (all_upstreams_failed / concurrency_limited).
# IPTV_TUNERR_CLIENT_ADAPT_STICKY_FALLBACK=true
# IPTV_TUNERR_CLIENT_ADAPT_STICKY_TTL_SEC=14400
# IPTV_TUNERR_CLIENT_ADAPT_STICKY_LOG=0
# Extra HTTP headers to send on all upstream requests (playlists and segments).
# Useful for CDNs that require specific Referer, Origin, or other headers.
# Format: "Header-Name: value,Another-Header: value"
# Example: IPTV_TUNERR_UPSTREAM_HEADERS=Referer: http://provider.example.com/get.php?username=USER&password=PASS&type=m3u_plus&output=ts
# IPTV_TUNERR_UPSTREAM_HEADERS=Referer: http://provider.example.com,Origin: http://provider.example.com
# Optional browser-style fetch metadata headers for providers that expect them.
# IPTV_TUNERR_UPSTREAM_ADD_SEC_FETCH=true
# Override User-Agent sent to upstream (useful if provider blocks default "IptvTunerr/1.0").
# IPTV_TUNERR_UPSTREAM_USER_AGENT=Mozilla/5.0 (compatible; iptvtunerr)
# Persist cookies to disk for Cloudflare clearance tokens that survive restarts.
# IPTV_TUNERR_COOKIE_JAR_FILE=/var/lib/iptvtunerr/cookies.json
# Optional: allow CF auto-boot to open your real desktop browser if headless Chromium fails.
# Default is disabled; leave unset for headless-only behavior.
# IPTV_TUNERR_CF_REAL_BROWSER_FALLBACK=false
# Optional JSON file for remembered dna_id + client-class playback decisions,
# including the last known-good upstream URL/host for that channel/client pair.
# IPTV_TUNERR_AUTOPILOT_STATE_FILE=/var/lib/iptvtunerr/autopilot.json
# Optional: prefer upstream hostnames that multiple other dna_id rows already agree on (see docs/reference/cli-and-env-reference.md).
# IPTV_TUNERR_AUTOPILOT_CONSENSUS_HOST=false
# IPTV_TUNERR_AUTOPILOT_CONSENSUS_MIN_DNA=3
# IPTV_TUNERR_AUTOPILOT_CONSENSUS_MIN_HIT_SUM=15
# Optional: comma-separated hostnames to prefer across all channels (after per-DNA memory, before consensus).
# IPTV_TUNERR_AUTOPILOT_GLOBAL_PREFERRED_HOSTS=cdn.trusted.example,edge.other.net
# Stop reusing a remembered Autopilot decision after this many consecutive failures.
# IPTV_TUNERR_AUTOPILOT_MAX_FAILURE_STREAK=2
# Hot-start favorites: let favorite or high-hit channels use a more aggressive startup profile.
# IPTV_TUNERR_HOT_START_ENABLED=true
# IPTV_TUNERR_HOT_START_CHANNELS=1001,dna:fox,101,FOX News
# Optional: hot-start whole categories by substring match on M3U group-title (e.g. Sports, News).
# IPTV_TUNERR_HOT_START_GROUP_TITLES=Sports,News
# IPTV_TUNERR_HOT_START_MIN_HITS=3
# IPTV_TUNERR_HOT_START_MIN_BYTES=24576
# IPTV_TUNERR_HOT_START_TIMEOUT_MS=15000
# IPTV_TUNERR_HOT_START_BOOTSTRAP_SECONDS=2.0
# IPTV_TUNERR_HOT_START_PROGRAM_KEEPALIVE=true
# Optional guide-quality policy for runtime lineup pruning.
# healthy = keep channels with real programme blocks
# strict = keep only channels with real programme blocks and non-empty TVGID
# IPTV_TUNERR_GUIDE_POLICY=healthy
# Optional duplicate-variant policy keyed by dna_id.
# prefer_best = keep the strongest duplicate by combined score
# prefer_resilient = keep the most backup-stream-resilient duplicate
# IPTV_TUNERR_DNA_POLICY=prefer_best
# Optional preferred provider/CDN authorities for duplicate DNA winners.
# IPTV_TUNERR_DNA_PREFERRED_HOSTS=preferred.example,backup.example:8080
# Optional media-server registration recipe for Plex/Emby/Jellyfin sync order/filtering.
# off = catalog order; balanced/high_confidence/guide_first/resilient = score-based ordering
# healthy = score-based ordering plus drops poor-tier channels before registration
# sports_now / kids_safe / locals_first = same intent presets as runtime lineup recipes
# IPTV_TUNERR_REGISTER_RECIPE=healthy
# Force websafe on all clients regardless of client detection.
# IPTV_TUNERR_FORCE_WEBSAFE=false
# Strip stream URLs from these hostnames at catalog build time (e.g. Cloudflare CDNs that block server-side requests).
# Channels with only stripped hosts are dropped from the catalog.
# IPTV_TUNERR_STRIP_STREAM_HOSTS=cf.like-cdn.com,like-cdn.com
# Merge catalog rows that share the same tvg-id (default true). Set false only for debugging.
# IPTV_TUNERR_DEDUPE_BY_TVG_ID=true
# --------------- Live TV startup race hardening (websafe bootstrap) ---------------
# Use when Plex opens a session but the consumer never starts (dash_init_404 / "Failed to find consumer").
# Bootstrap: send a short burst of TS bytes immediately on stream open to give Plex's packager a head start.
# IPTV_TUNERR_WEBSAFE_BOOTSTRAP=true
# IPTV_TUNERR_WEBSAFE_BOOTSTRAP_ALL=false
# IPTV_TUNERR_WEBSAFE_BOOTSTRAP_SECONDS=0.35
# Startup gate: buffer initial bytes until a minimum threshold is met before passing to Plex.
# IPTV_TUNERR_WEBSAFE_STARTUP_MIN_BYTES=65536
# IPTV_TUNERR_WEBSAFE_STARTUP_MAX_BYTES=786432
# IPTV_TUNERR_WEBSAFE_STARTUP_TIMEOUT_MS=60000
# IPTV_TUNERR_WEBSAFE_REQUIRE_GOOD_START=true
# Legacy: release at max bytes without H.264 IDR+AAC (default off; HR-001 sliding window when false).
# IPTV_TUNERR_WEBSAFE_STARTUP_MAX_FALLBACK_WITHOUT_IDR=false
# Null TS keepalive: send null TS packets (PID 0x1FFF) while the startup gate waits.
# Keeps the TCP connection alive but carries no program structure.
# IPTV_TUNERR_WEBSAFE_NULL_TS_KEEPALIVE=false
# IPTV_TUNERR_WEBSAFE_NULL_TS_KEEPALIVE_MS=100
# IPTV_TUNERR_WEBSAFE_NULL_TS_KEEPALIVE_PACKETS=1
# PAT+PMT keepalive: send real MPEG-TS program-structure packets while the startup gate waits.
# Stronger than null TS: delivers program map (video+audio PIDs) so Plex's DASH packager
# can instantiate its consumer before the first IDR frame arrives.
# PIDs match ffmpeg mpegts defaults: PMT=0x1000, video H.264=0x0100, audio AAC=0x0101.
# Try this when null TS keepalive alone does not prevent dash_init_404.
# IPTV_TUNERR_WEBSAFE_PROGRAM_KEEPALIVE=false
# IPTV_TUNERR_WEBSAFE_PROGRAM_KEEPALIVE_MS=500
# --------------- Guide / XMLTV (optional) ---------------
# Only include channels that have a tvg-id in the catalog.
# IPTV_TUNERR_LIVE_EPG_ONLY=false
# Prune unlinked channels from guide.xml and M3U export (reduces guide noise).
# IPTV_TUNERR_EPG_PRUNE_UNLINKED=false
# Keep every lineup row represented in guide.xml even when prune-unlinked is enabled,
# using placeholder guide entries for unmatched channels so Plex can still map them.
# IPTV_TUNERR_EPG_FORCE_LINEUP_MATCH=true
# --------------- Free public sources (optional) ---------------
# Optional shell convenience preset for a known public feed. Tunerr does not read
# this variable directly; use it to populate IPTV_TUNERR_FREE_SOURCES in your shell/.env.
# IPTV_TUNERR_FREE_SOURCE_CUSTOM_URL=https://example.invalid/free-source.m3u
# Numbered free-source slots are also supported directly from env.
# Example: add a second public source without rewriting the CSV variable.
# IPTV_TUNERR_FREE_SOURCE_2=https://example.invalid/free-source-2.m3u
# Example:
# IPTV_TUNERR_FREE_SOURCES=$IPTV_TUNERR_FREE_SOURCE_PRIGOANA_URL
# Optional durable EPG store (SQLite); see docs/adr/0003-epg-sqlite-vs-postgres.md
# IPTV_TUNERR_EPG_SQLITE_PATH=/var/lib/iptvtunerr/epg.sqlite
# IPTV_TUNERR_EPG_SQLITE_RETAIN_PAST_HOURS=168
# After retain-past prune, run SQLite VACUUM to reclaim disk (optional; can be slow on huge DBs).
# IPTV_TUNERR_EPG_SQLITE_VACUUM=false
# Cap SQLite file size after sync (bytes or use MAX_MB). 0 = disabled.
# IPTV_TUNERR_EPG_SQLITE_MAX_MB=400
# IPTV_TUNERR_HDHR_LINEUP_URL=http://192.168.1.50/lineup.json
# IPTV_TUNERR_HDHR_LINEUP_ID_PREFIX=hdhr
# IPTV_TUNERR_PROVIDER_EPG_URL_SUFFIX=
# Optional: render suffix window tokens from current store horizon when available.
# Tokens: {from_unix} {to_unix} {from_ymd} {to_ymd}
# IPTV_TUNERR_PROVIDER_EPG_INCREMENTAL=false
# IPTV_TUNERR_PROVIDER_EPG_LOOKAHEAD_HOURS=72
# IPTV_TUNERR_PROVIDER_EPG_BACKFILL_HOURS=6
# Optional on-disk copy of provider xmltv.php + HTTP conditional GET (ETag/Last-Modified); sidecar: path.meta.json
# IPTV_TUNERR_PROVIDER_EPG_DISK_CACHE=/var/cache/iptvtunerr/provider-xmltv.xml
# Optional provider short-EPG gap fill for sparse provider XMLTV rows.
# IPTV_TUNERR_PROVIDER_SHORT_EPG_FALLBACK=false
# IPTV_TUNERR_PROVIDER_SHORT_EPG_MIN_PROGRAMMES=2
# IPTV_TUNERR_PROVIDER_SHORT_EPG_LIMIT=6
# Use overlap-window upsert in SQLite sync (does not truncate full table each refresh).
# IPTV_TUNERR_EPG_SQLITE_INCREMENTAL_UPSERT=false
# Optional physical HDHomeRun device guide.xml (merged after provider + external; tvg-id must match).
# See docs/adr/0004-hdhr-guide-epg-merge.md
# IPTV_TUNERR_HDHR_GUIDE_URL=http://192.168.1.50/guide.xml
# IPTV_TUNERR_HDHR_GUIDE_TIMEOUT=90s
# Optional: comma-separated literal UDP targets for hdhr-scan / DiscoverLAN (IPv4 subnet broadcast or host:65001; IPv6 e.g. [fe80::1%eth0]:65001) when 255.255.255.255 is filtered
# IPTV_TUNERR_HDHR_DISCOVER_BROADCASTS=192.168.1.255,10.0.0.255
# External XMLTV source: iptv-tunerr fetches it, filters to live catalog channels,
# remaps programme channel IDs to local guide numbers, and serves it as /guide.xml.
# IPTV_TUNERR_XMLTV_URL=http://127.0.0.1:8080/xmltv.xml
# Security hardening: private/loopback http(s) refs are blocked by default for guide/alias fetches.
# Set only when you intentionally load XMLTV or alias JSON from localhost/LAN instead of a public host or file path.
# IPTV_TUNERR_REFIO_ALLOW_PRIVATE_HTTP=false
# Security hardening: remote guide/alias fetches must match URLs already declared in provider/XMLTV/HDHR envs,
# or URLs listed here explicitly.
# IPTV_TUNERR_GUIDE_INPUT_ALLOWED_URLS=https://xmltv.example.com/guide.xml,https://xmltv.example.com/aliases.json
# Optional: comma-separated safe root directories for local XMLTV / alias files.
# Relative refs are resolved under the current working directory by default; absolute paths outside these roots are rejected.
# IPTV_TUNERR_GUIDE_INPUT_ROOTS=./examples,/var/lib/iptvtunerr
# Optional alias override file/URL for deterministic EPG repairs during catalog build.
# JSON shape: { "name_to_xmltv_id": { "Fox News Channel US": "foxnews.us" } }
# IPTV_TUNERR_XMLTV_ALIASES=./examples/xmltv-aliases.example.json
# Optional guide-quality policy for catch-up preview/publish output.
# Uses the same values as IPTV_TUNERR_GUIDE_POLICY: off|healthy|strict
# IPTV_TUNERR_CATCHUP_GUIDE_POLICY=healthy
# Optional source-backed replay URL template for catch-up capsules/publishing.
# Useful when your provider supports timeshift/catch-up URLs and you want real replay launchers.
# Common tokens: {channel_id} {guide_number} {duration_mins} {start_xtream} {start_unix} {title_query}
# IPTV_TUNERR_CATCHUP_REPLAY_URL_TEMPLATE=http://provider.example/timeshift/{channel_id}/{duration_mins}/{start_xtream}
# Repair or assign TVGIDs from provider/external XMLTV channel metadata before LIVE_EPG_ONLY filtering.
# IPTV_TUNERR_XMLTV_MATCH_ENABLE=true
# IPTV_TUNERR_XMLTV_TIMEOUT=45s
# Cache the remapped XMLTV response to avoid hammering the upstream on every guide refresh.
# IPTV_TUNERR_XMLTV_CACHE_TTL=10m
# Language normalization: prefer these languages when XMLTV has multiple <title>/<desc> lang= variants.
# IPTV_TUNERR_XMLTV_PREFER_LANGS=en,eng
# Prefer Latin-script variant when multiple exist and no preferred lang= matches.
# IPTV_TUNERR_XMLTV_PREFER_LATIN=false
# Replace non-Latin programme titles with the channel name (description remains source text).
# IPTV_TUNERR_XMLTV_NON_LATIN_TITLE_FALLBACK=channel
# --------------- Smoketest / channel validation (optional) ---------------
# Probe each channel's primary stream URL at index time; drop channels that fail.
# IPTV_TUNERR_SMOKETEST_ENABLED=false
# IPTV_TUNERR_SMOKETEST_TIMEOUT=8s
# IPTV_TUNERR_SMOKETEST_CONCURRENCY=10
# Persist probe results across runs to avoid re-probing recently-tested channels.
# IPTV_TUNERR_SMOKETEST_CACHE_FILE=/var/cache/iptvtunerr/smoketest.json
# IPTV_TUNERR_SMOKETEST_CACHE_TTL=4h
# Probe the final exposed lineup at runtime before lineup.json/guide.xml are served.
# This prunes failing feed URLs from each channel and drops channels with no valid feeds.
# IPTV_TUNERR_LINEUP_PROBE_ENABLED=false
# IPTV_TUNERR_LINEUP_PROBE_TIMEOUT=3s
# IPTV_TUNERR_LINEUP_PROBE_CONCURRENCY=2
# IPTV_TUNERR_LINEUP_PROBE_MAX_DURATION=2m
# IPTV_TUNERR_LINEUP_PROBE_CACHE_FILE=/var/cache/iptvtunerr/lineup-probe.json
# IPTV_TUNERR_LINEUP_PROBE_CACHE_TTL=10m
# Optional ffmpeg visual black-frame probe. Use "event" for high-risk event feeds
# or "all" for every exposed feed; keep concurrency low to limit provider load.
# IPTV_TUNERR_LINEUP_VISUAL_PROBE=off
# IPTV_TUNERR_LINEUP_VISUAL_PROBE_SAMPLE=4s
# IPTV_TUNERR_LINEUP_VISUAL_PROBE_TIMEOUT=9s
# IPTV_TUNERR_LINEUP_VISUAL_PROBE_CONCURRENCY=1
# IPTV_TUNERR_LINEUP_VISUAL_PROBE_MAX_FEEDS=12
# IPTV_TUNERR_LINEUP_VISUAL_PROBE_MAX_DURATION=90s
# IPTV_TUNERR_LINEUP_VISUAL_PROBE_CACHE_TTL=30m
# --------------- Indexing (optional) ---------------
# Only fetch live channels from the provider API; skip VOD and series (faster).
# IPTV_TUNERR_LIVE_ONLY=false
# Reject provider URLs that appear to be Cloudflare-proxied.
# IPTV_TUNERR_BLOCK_CF_PROVIDERS=false
# --------------- Plex session reaper (optional) ---------------
# Built-in background worker that prunes stale Live TV sessions (e.g. after tab close, app exit).
# IPTV_TUNERR_PMS_URL=http://127.0.0.1:32400
# IPTV_TUNERR_PMS_TOKEN=your_plex_token
# IPTV_TUNERR_PLEX_SESSION_REAPER=false
# IPTV_TUNERR_PLEX_SESSION_REAPER_IDLE_S=15
# IPTV_TUNERR_PLEX_SESSION_REAPER_RENEW_LEASE_S=20
# IPTV_TUNERR_PLEX_SESSION_REAPER_HARD_LEASE_S=1800
# IPTV_TUNERR_PLEX_SESSION_REAPER_POLL_S=5
# IPTV_TUNERR_PLEX_SESSION_REAPER_SSE=true
# --------------- Emby / Jellyfin (optional) ---------------
# IPTV_TUNERR_EMBY_HOST=http://emby:8096
# IPTV_TUNERR_EMBY_TOKEN=your_emby_token
# IPTV_TUNERR_JELLYFIN_HOST=http://jellyfin:8096
# IPTV_TUNERR_JELLYFIN_TOKEN=your_jellyfin_token