{
  "metadata": {
    "id": "nexstream-scraper-v3",
    "name": "NexStream Scraper",
    "version": "3.0.0",
    "description": "Self-hosted multi-provider scraper with RTN ranking, external addon aggregation, 11 formatter styles, and quality ranking"
  },
  "scrapers": {
    "torrentio": {
      "enabled": true,
      "baseUrl": "https://torrentio.strem.fun",
      "timeout": 10000,
      "maxResults": 200,
      "priority": 10
    },
    "comet": {
      "enabled": true,
      "baseUrl": "https://comet.elfhosted.com",
      "timeout": 10000,
      "maxResults": 200,
      "priority": 20
    },
    "mediafusion": {
      "enabled": true,
      "baseUrl": "https://mediafusion.elfhosted.com",
      "timeout": 10000,
      "maxResults": 200,
      "priority": 30
    },
    "jackett": {
      "enabled": false,
      "baseUrl": "",
      "apiKey": "",
      "timeout": 15000,
      "maxResults": 200,
      "priority": 40
    },
    "zilean": {
      "enabled": false,
      "baseUrl": "",
      "timeout": 10000,
      "maxResults": 200,
      "priority": 50
    }
  },
  "externalAddons": {
    "enabled": false,
    "addons": [
      {
        "name": "Peerflix",
        "enabled": false,
        "baseUrl": "https://peerflix.strem.fun",
        "timeout": 8000,
        "priority": 60
      },
      {
        "name": "PirateBay+",
        "enabled": false,
        "baseUrl": "https://piratesbay.strem.fun",
        "timeout": 8000,
        "priority": 70
      }
    ]
  },
  "debrid": {
    "realdebrid": { "enabled": false, "apiKey": "", "rateLimit": 60 },
    "alldebrid": { "enabled": false, "apiKey": "", "rateLimit": 60 },
    "premiumize": { "enabled": false, "apiKey": "", "rateLimit": 60 },
    "torbox": { "enabled": false, "apiKey": "", "rateLimit": 60 }
  },
  "caching": {
    "l1Ttl": 1800,
    "l2Ttl": 86400,
    "dbPath": "src/data/cache.db"
  },
  "filtering": {
    "mode": "smart",
    "minResolution": "480p",
    "excludeQualities": ["CAM", "TS", "TC", "TeleSync", "Telecine", "HDTS", "HC"],
    "excludeVisualTags": ["3D", "SBS", "Half-OU"],
    "excludeSamples": true,
    "excludeStreamTypes": [],
    "includedResolutions": [],
    "excludedResolutions": [],
    "requiredResolutions": [],
    "excludedLanguages": [],
    "includedLanguages": ["eng"],
    "excludedRegexPatterns": [],
    "includedRegexPatterns": [],
    "requiredRegexPatterns": [],
    "syncedExcludedRegexUrls": [],
    "syncedIncludedRegexUrls": []
  },
  "ranking": {
    "resolutionWeights": {
      "2160p": 100,
      "1440p": 70,
      "1080p": 50,
      "720p": 25,
      "480p": 10,
      "unknown": 0
    },
    "qualityBonuses": {
      "REMUX": 40,
      "HDR": 15,
      "DV": 20,
      "HDR10+": 18,
      "Atmos": 10,
      "TrueHD": 8,
      "DTS-HD": 6,
      "HEVC": 5,
      "x265": 5,
      "AV1": 10
    },
    "qualityPenalties": {
      "CAM": -200,
      "TS": -150,
      "HC": -100,
      "SAMPLE": -999
    },
    "cachedBonus": 50,
    "seedersWeight": 0.1,
    "sizeWeight": 0.0,
    "rtn": {
      "enabled": true,
      "properBonus": 5,
      "repackBonus": 3,
      "internalBonus": 2,
      "recency": {
        "enabled": true,
        "maxAge": 10,
        "bonus": 5
      }
    }
  },
  "limits": {
    "maxTotalStreams": 500,
    "maxPerScraper": 200,
    "adaptiveMinResults": 50,
    "cachedOnly": false,
    "uncachedMode": "keep",
    "perResolutionCaps": {
      "2160p": 10,
      "1440p": 5,
      "1080p": 15,
      "720p": 8,
      "480p": 5
    }
  },
  "presets": {
    "torrentio-replacement": {
      "description": "Matches Torrentio's default provider lineup and behavior",
      "config": { "scrapers": { "torrentio": { "enabled": true }, "comet": { "enabled": false }, "mediafusion": { "enabled": false }, "jackett": { "enabled": false }, "zilean": { "enabled": false } }, "limits": { "maxTotalStreams": 100, "perResolutionCaps": { "2160p": 8, "1080p": 12, "720p": 5 } } }
    },
    "4k-enthusiast": {
      "description": "Prioritize 4K + REMUX, minimal lower resolutions",
      "config": { "filtering": { "minResolution": "1080p" }, "limits": { "perResolutionCaps": { "2160p": 15, "1080p": 6, "720p": 2 } }, "ranking": { "resolutionWeights": { "2160p": 150, "1440p": 80, "1080p": 40, "720p": 10 }, "qualityBonuses": { "REMUX": 50, "DV": 25, "HDR": 20, "Atmos": 15 } } }
    },
    "speed-demon": {
      "description": "Fast results, minimal results, high seeders only",
      "config": { "performance": { "scraperTimeout": 5000 }, "limits": { "maxTotalStreams": 20, "maxPerScraper": 30 } }
    },
    "quality-over-quantity": {
      "description": "Only highest quality releases from trusted sources",
      "config": { "filtering": { "excludeQualities": ["CAM","TS","TC","TeleSync","Telecine","HDTS","HC","WEBRip","HDTV"] }, "limits": { "perResolutionCaps": { "2160p": 5, "1080p": 5, "720p": 0 } } }
    },
    "maximum-coverage": {
      "description": "Every scraper, full results",
      "config": { "limits": { "maxTotalStreams": 500, "maxPerScraper": 200, "adaptiveMinResults": 100, "perResolutionCaps": {} }, "performance": { "scraperTimeout": 15000 } }
    },
    "mobile": {
      "description": "Optimized for mobile bandwidth — no 4K, compact results",
      "config": { "filtering": { "minResolution": "480p" }, "limits": { "maxTotalStreams": 15, "perResolutionCaps": { "2160p": 0, "1080p": 5, "720p": 5, "480p": 5 } } }
    },
    "anime": {
      "description": "Optimized for anime content",
      "config": { "limits": { "maxTotalStreams": 100, "perResolutionCaps": { "2160p": 5, "1080p": 15, "720p": 8 } } }
    }
  },
  "activePreset": null,
  "format": {
    "defaultStyle": "standard",
    "styles": {
      "torrentio": { "showEmoji": false, "showScore": true, "showSource": true, "showQuality": true, "showSize": true, "showGroup": false, "showCached": false, "compactTitle": false, "showSeeders": true },
      "minimal": { "showEmoji": false, "showScore": false, "showSource": false, "showQuality": true, "showSize": false, "showGroup": false, "showCached": false, "compactTitle": true, "showSeeders": false, "descriptionOnly": false },
      "standard": { "showEmoji": true, "showScore": true, "showSource": true, "showQuality": true, "showSize": false, "showGroup": false, "showCached": true, "compactTitle": false, "showSeeders": false },
      "detailed": { "showEmoji": true, "showScore": true, "showSource": true, "showQuality": true, "showSize": true, "showGroup": true, "showCached": true, "compactTitle": false, "showSeeders": true, "showLanguages": true, "showYear": true, "showCodec": true },
      "compact": { "showEmoji": false, "showScore": false, "showSource": false, "showQuality": true, "showSize": false, "showGroup": false, "showCached": false, "compactTitle": true, "showSeeders": false, "descriptionOnly": true },
      "netflix": { "showEmoji": false, "showScore": false, "showSource": false, "showQuality": true, "showSize": false, "showGroup": false, "showCached": false, "compactTitle": false, "showSeeders": false, "style": "cinematic" },
      "debrid": { "showEmoji": true, "showScore": false, "showSource": false, "showQuality": true, "showSize": false, "showGroup": false, "showCached": true, "compactTitle": false, "showSeeders": false, "focusCached": true },
      "info": { "showEmoji": false, "showScore": true, "showSource": true, "showQuality": true, "showSize": true, "showGroup": true, "showCached": false, "compactTitle": false, "showSeeders": true, "showIndex": true },
      "groups": { "showEmoji": false, "showScore": false, "showSource": false, "showQuality": true, "showSize": false, "showGroup": true, "showCached": false, "compactTitle": false, "showSeeders": false, "showTier": true },
      "simple": { "showEmoji": false, "showScore": false, "showSource": false, "showQuality": true, "showSize": false, "showGroup": false, "showCached": false, "compactTitle": true, "showSeeders": false },
      "noEmoji": { "showEmoji": false, "showScore": true, "showSource": true, "showQuality": true, "showSize": false, "showGroup": false, "showCached": true, "compactTitle": false, "showSeeders": false }
    }
  },
  "performance": {
    "parallelDebridCheck": true,
    "scraperTimeout": 10000,
    "totalTimeout": 15000,
    "progressiveGraceMs": 500,
    "minGraceMs": 250,
    "maxGraceMs": 2000,
    "streamResults": true,
    "enableCircuitBreaker": true,
    "circuitBreakerThreshold": 3,
    "circuitBreakerResetMs": 300000
  }
}
