Download utils/tmdbKey.js from hfflix/ok: direct link, hf CLI and curl.
- Browser
- Download file 389 Bytes
-
https://huggingface.co/spaces/hfflix/ok/resolve/main/utils/tmdbKey.js
- Command line
-
hf download hf://spaces/hfflix/ok/utils/tmdbKey.js
-
curl -L -o tmdbKey.js https://huggingface.co/spaces/hfflix/ok/resolve/main/utils/tmdbKey.js
389 Bytes
| const { config } = require('./config'); | |
| function getTmdbApiKey() { | |
| if (config.tmdbApiKeys && config.tmdbApiKeys.length) { | |
| const idx = Math.floor(Math.random() * config.tmdbApiKeys.length); | |
| return config.tmdbApiKeys[idx]; | |
| } | |
| // Fallback legacy single value (config or env) | |
| return config.tmdbApiKey || process.env.TMDB_API_KEY || null; | |
| } | |
| module.exports = { getTmdbApiKey }; | |