feat(google-books): add optional API key configuration (#2629)
This commit is contained in:
+10
@@ -65,6 +65,16 @@
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
<div class="config-field">
|
||||
<label class="config-label">API Key (Optional)</label>
|
||||
<p class="config-description">Providing a Google Books API key increases rate limits and improves reliability.</p>
|
||||
<input
|
||||
type="text"
|
||||
pInputText
|
||||
placeholder="Enter Google Books API key"
|
||||
[(ngModel)]="googleApiKey"
|
||||
class="config-input"/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
+3
@@ -95,6 +95,7 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
doubanEnabled: boolean = false;
|
||||
lubimyCzytacEnabled: boolean = false;
|
||||
ranobedbEnabled: boolean = false;
|
||||
googleApiKey: string = '';
|
||||
|
||||
private appSettingsService = inject(AppSettingsService);
|
||||
private messageService = inject(MessageService);
|
||||
@@ -116,6 +117,7 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
this.goodreadsEnabled = metadataProviderSettings?.goodReads?.enabled ?? false;
|
||||
this.googleEnabled = metadataProviderSettings?.google?.enabled ?? false;
|
||||
this.selectedGoogleLanguage = metadataProviderSettings?.google?.language ?? '';
|
||||
this.googleApiKey = metadataProviderSettings?.google?.apiKey ?? '';
|
||||
this.hardcoverToken = metadataProviderSettings?.hardcover?.apiKey ?? '';
|
||||
this.hardcoverEnabled = metadataProviderSettings?.hardcover?.enabled ?? false;
|
||||
this.comicvineEnabled = metadataProviderSettings?.comicvine?.enabled ?? false;
|
||||
@@ -157,6 +159,7 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
google: {
|
||||
enabled: this.googleEnabled,
|
||||
language: this.selectedGoogleLanguage,
|
||||
apiKey: this.googleApiKey.trim()
|
||||
},
|
||||
hardcover: {
|
||||
enabled: this.hardcoverEnabled,
|
||||
|
||||
@@ -66,6 +66,7 @@ export interface Amazon {
|
||||
export interface Google {
|
||||
enabled: boolean;
|
||||
language: string;
|
||||
apiKey: string;
|
||||
}
|
||||
|
||||
export interface Goodreads {
|
||||
|
||||
Reference in New Issue
Block a user