Add:iTunes search api metadata provider #381

This commit is contained in:
advplyr 2022-03-06 17:26:35 -06:00
parent 43f48b65f8
commit a907c88f66
5 changed files with 54 additions and 24 deletions

View file

@ -47,9 +47,9 @@
<ui-dropdown v-model="provider" :items="providers" label="Provider" small />
</div>
<div class="w-72 px-1">
<ui-text-input-with-label v-model="searchTitle" :label="provider == 'audible' ? 'Search Title or ASIN' : 'Search Title'" placeholder="Search" />
<ui-text-input-with-label v-model="searchTitle" :label="searchTitleLabel" placeholder="Search" />
</div>
<div class="w-72 px-1">
<div v-show="provider != 'itunes'" class="w-72 px-1">
<ui-text-input-with-label v-model="searchAuthor" label="Author" />
</div>
<ui-btn class="mt-5 ml-1" type="submit">Search</ui-btn>
@ -98,20 +98,6 @@ export default {
showLocalCovers: false,
previewUpload: null,
selectedFile: null,
providers: [
{
text: 'Google Books',
value: 'google'
},
{
text: 'Open Library',
value: 'openlibrary'
},
{
text: 'Audible',
value: 'audible'
}
],
provider: 'google'
}
},
@ -134,6 +120,14 @@ export default {
this.$emit('update:processing', val)
}
},
providers() {
return this.$store.state.scanners.providers
},
searchTitleLabel() {
if (this.provider == 'audible') return 'Search Title or ASIN'
else if (this.provider == 'itunes') return 'Search Term'
return 'Search Title'
},
coverAspectRatio() {
return this.$store.getters['getServerSetting']('coverAspectRatio')
},