feat: add language restriction option for google parser and improve search metadata by title/author query (#1502)
* feat: add language restriction option for google parser and improve search metadata by title/author query * Fix syntax error.
This commit is contained in:
+13
@@ -65,6 +65,19 @@
|
||||
<label class="provider-label">Google</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="provider-config">
|
||||
<div class="config-field">
|
||||
<label class="config-label">Language restriction</label>
|
||||
<p-select
|
||||
[options]="googleLanguages"
|
||||
[(ngModel)]="selectedGoogleLanguage"
|
||||
[showClear]="!!selectedGoogleLanguage"
|
||||
placeholder="Select Language"
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="provider-item">
|
||||
|
||||
+20
-1
@@ -52,6 +52,21 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
|
||||
selectedAmazonDomain = 'com';
|
||||
|
||||
googleLanguages = [
|
||||
{label: 'Dutch', value: 'nl'},
|
||||
{label: 'English', value: 'en'},
|
||||
{label: 'French', value: 'fr'},
|
||||
{label: 'German', value: 'de'},
|
||||
{label: 'Italian', value: 'it'},
|
||||
{label: 'Japanese', value: 'ja'},
|
||||
{label: 'Polish', value: 'pl'},
|
||||
{label: 'Portuguese', value: 'pt'},
|
||||
{label: 'Spanish', value: 'es'},
|
||||
{label: 'Swedish', value: 'sv'}
|
||||
];
|
||||
|
||||
selectedGoogleLanguage = '';
|
||||
|
||||
hardcoverToken: string = '';
|
||||
amazonCookie: string = '';
|
||||
hardcoverEnabled: boolean = false;
|
||||
@@ -80,6 +95,7 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
this.selectedAmazonDomain = metadataProviderSettings?.amazon?.domain ?? 'com';
|
||||
this.goodreadsEnabled = metadataProviderSettings?.goodReads?.enabled ?? false;
|
||||
this.googleEnabled = metadataProviderSettings?.google?.enabled ?? false;
|
||||
this.selectedGoogleLanguage = metadataProviderSettings?.google?.language ?? '';
|
||||
this.hardcoverToken = metadataProviderSettings?.hardcover?.apiKey ?? '';
|
||||
this.hardcoverEnabled = metadataProviderSettings?.hardcover?.enabled ?? false;
|
||||
this.comicvineEnabled = metadataProviderSettings?.comicvine?.enabled ?? false;
|
||||
@@ -119,7 +135,10 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
},
|
||||
|
||||
goodReads: {enabled: this.goodreadsEnabled},
|
||||
google: {enabled: this.googleEnabled},
|
||||
google: {
|
||||
enabled: this.googleEnabled,
|
||||
language: this.selectedGoogleLanguage,
|
||||
},
|
||||
hardcover: {
|
||||
enabled: this.hardcoverEnabled,
|
||||
apiKey: this.hardcoverToken.trim()
|
||||
|
||||
Reference in New Issue
Block a user