{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "_comment": "0.0.0.0 binds to every network interface so LAN users can reach the app at http://<host-IP>:5050. Change to localhost:5050 to lock down to the host machine only.",
        "Url": "http://0.0.0.0:5050"
      }
    },
    "Limits": {
      "MaxRequestBodySize": 524288000
    }
  },
  "LanAccess": {
    "_comment": "DEFAULTS ONLY. Runtime state (enabled flag, username, password hash, public-tabs list) is persisted to data/lanaccess.json on first run and any UI change. Edit the JSON or delete it to re-seed from these defaults. Loopback (127.0.0.1/::1) is always admin regardless of any setting here.",
    "Enabled": true,
    "Username": "admin",
    "Password": "audioboxx-admin",
    "PublicTabs": [ "report", "results", "about" ],
    "AdvertiseAddresses": []
  },
  "Monitor": {
    "_comment": "SimpleMode=true (default): classic smooth loop — capture live URL → identify → log, one interval at a time. Set SimpleMode=false for recording-slice backlog + grid catch-up. IntervalSeconds = CaptureSeconds (e.g. 20/20).",
    "SimpleMode": true,
    "IdentifyTimeoutSeconds": 120,
    "CaptureGraceSeconds": 25,
    "MaxParallelIdentificationsPerStream": 2,
    "MaxGlobalParallelIdentifications": 8,
    "DefaultThresholdVotes": 3.5,
    "MaxPendingPerStream": 6,
    "MinIntervalHeadroomSeconds": 0,
    "IdentifyQueueWriteSeconds": 120,
    "DefaultIntervalSeconds": 20,
    "DefaultCaptureSeconds": 20,
    "PreferRecordingCapture": true,
    "_comment_ytdlp": "YouTube watch/live URLs need yt-dlp. On startup the server auto-downloads yt-dlp.exe to tools/yt-dlp/ next to the app (same as ffmpeg) when YtDlpAutoDownload is true. Set YtDlpAutoDownload to false to disable.",
    "YtDlpPath": "",
    "YtDlpAutoDownload": true,
    "YoutubeFetchUrlCacheSeconds": 300
  },
  "Identify": {
    "_comment": "FfmpegDecodeConcurrency = max parallel MP4/ffmpeg → WAV conversions (default: min(16, 2× CPU cores), max 32). MP4 decodes to 5512 Hz mono.",
    "FfmpegDecodeConcurrency": ""
  },
  "Storage": {
    "DataDirectory": "data",
    "UploadsDirectory": "uploads",
    "DatabaseFile": "data/fingerprints.db",
    "LiveStreamDatabaseFile": "data/livestream.db",
    "ReportsDatabaseFile": "data/reports.db",
    "OfflineResultsDatabaseFile": "data/offline_results.db",
    "Backend": "rocksdb",
    "RocksDb": {
      "_comment": "Block cache size for the fingerprint DB. Leave blank for the built-in 2GB default. Bumping this is the highest-impact tuning knob for slow Identify() lookups on large libraries. Examples: 4GB, 8GB, 12GB. Should fit comfortably in RAM alongside .NET, ffmpeg, OS.",
      "BlockCacheBytes": "8GB",
      "_comment2": "QueryParallelism = hash lookups per query (default: 3× cores, max 64). MaxParallelIdentifyQueries = simultaneous queries (default: 3× cores, max 64). Raise on fast NVMe + RAM.",
      "QueryParallelism": "",
      "MaxParallelIdentifyQueries": ""
    }
  },
  "Recording": {
    "_comment": "Default folder for all streams that do not set a Recording folder on the Streams tab. Use a full path for another drive, e.g. D:\\AUDIOBoxx\\recordings. Can also be changed in the Recording tab (saved under data/recording-settings.json).",
    "Directory": ""
  },
  "Watchdog": {
    "_comment": "IntervalSeconds is how often the background watchdog runs. TempCleanupMaxAgeSeconds deletes monitor capture WAVs under the temp monitor folder after identify finishes (files stay in-flight until then). In-flight paths are never deleted.",
    "IntervalSeconds": 30,
    "JioTvWatchdogEnabled": true,
    "TempCleanupMaxAgeSeconds": 120
  },
  "Http": {
    "_comment": "Browser-like headers for ffmpeg/HLS when the fetch URL is a CDN (not 127.0.0.1). JioTvReferer is used when the saved stream is a local JioTV proxy URL but segments resolve to Akamai/CDN. Embed per-stream headers in the URL: https://host/play.m3u8|Referer=https://site/&User-Agent=Chrome",
    "JioTvReferer": "https://www.jiotv.com/",
    "UserAgent": "",
    "Referer": "",
    "Cookie": "",
    "ExtraHeaders": ""
  },
  "JioTv": {
    "Port": 5001,
    "AutoReservePort": true,
    "ExePath": ""
  },
  "License": {
    "ServerUrl": "https://worklabgroup.com/blackboxx/audioboxx_license.php",
    "HeartbeatSeconds": 45
  },
  "AllowedHosts": "*"
}