mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-03 01:58:43 +00:00
fix for keys
This commit is contained in:
parent
9a4face265
commit
2eea341578
1 changed files with 12 additions and 1 deletions
|
|
@ -259,6 +259,17 @@ export class TMDBService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the resolved TMDB API key (custom user key if set, otherwise default).
|
||||
* Always awaits key loading so callers get the correct value.
|
||||
*/
|
||||
async getApiKey(): Promise<string> {
|
||||
if (!this.apiKeyLoaded) {
|
||||
await this.loadApiKey();
|
||||
}
|
||||
return this.apiKey;
|
||||
}
|
||||
|
||||
private async getHeaders() {
|
||||
// Ensure API key is loaded before returning headers
|
||||
if (!this.apiKeyLoaded) {
|
||||
|
|
@ -1658,4 +1669,4 @@ export class TMDBService {
|
|||
}
|
||||
|
||||
export const tmdbService = TMDBService.getInstance();
|
||||
export default tmdbService;
|
||||
export default tmdbService;
|
||||
|
|
|
|||
Loading…
Reference in a new issue