mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-07 11:12:45 +02:00
Update jsdocs for search podcasts
This commit is contained in:
@@ -87,7 +87,7 @@ export default {
|
||||
streamLibraryItem() {
|
||||
return this.$store.state.streamLibraryItem
|
||||
},
|
||||
librarySetting() {
|
||||
librarySettings() {
|
||||
return this.$store.getters['libraries/getCurrentLibrarySettings']
|
||||
}
|
||||
},
|
||||
@@ -154,7 +154,12 @@ export default {
|
||||
async submitSearch(term) {
|
||||
this.processing = true
|
||||
this.termSearched = ''
|
||||
let results = await this.$axios.$get(`/api/search/podcast?term=${encodeURIComponent(term)}&country=${encodeURIComponent(this.librarySetting?.podcastSearchRegion)}`).catch((error) => {
|
||||
|
||||
const searchParams = new URLSearchParams({
|
||||
term,
|
||||
country: this.librarySettings?.podcastSearchRegion || 'us'
|
||||
})
|
||||
let results = await this.$axios.$get(`/api/search/podcast?${searchParams.toString()}`).catch((error) => {
|
||||
console.error('Search request failed', error)
|
||||
return []
|
||||
})
|
||||
|
||||
@@ -28,9 +28,11 @@ Vue.prototype.$languageCodeOptions = Object.keys(languageCodeMap).map(code => {
|
||||
value: code
|
||||
}
|
||||
})
|
||||
|
||||
// iTunes search API uses ISO 3166 country codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
const podcastSearchRegionMap = {
|
||||
'us': { label: 'United States' },
|
||||
'cn': { label: '中国' },
|
||||
'cn': { label: '中国' }
|
||||
}
|
||||
Vue.prototype.$podcastSearchRegionOptions = Object.keys(podcastSearchRegionMap).map(code => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user