mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Merge pull request #2877 from v3DJG6GL/v3DJG6GL-itunes-podcast-regions
add iTunes podcast regions for all ABS supported languages
This commit is contained in:
commit
00bc50c02d
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isPodcastLibrary" class="py-3">
|
||||
<ui-dropdown :label="$strings.LabelPodcastSearchRegion" v-model="podcastSearchRegion" :items="$podcastSearchRegionOptions" small class="max-w-52" @input="formUpdated" />
|
||||
<ui-dropdown :label="$strings.LabelPodcastSearchRegion" v-model="podcastSearchRegion" :items="$podcastSearchRegionOptions" small class="max-w-72" menu-max-height="200px" @input="formUpdated" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -13,7 +13,7 @@
|
||||
</button>
|
||||
|
||||
<transition name="menu">
|
||||
<ul v-show="showMenu" class="absolute z-10 -mt-px w-full bg-primary border border-black-200 shadow-lg max-h-56 rounded-md py-1 ring-1 ring-black ring-opacity-5 overflow-auto sm:text-sm" tabindex="-1" role="listbox">
|
||||
<ul v-show="showMenu" class="absolute z-10 -mt-px w-full bg-primary border border-black-200 shadow-lg rounded-md py-1 ring-1 ring-black ring-opacity-5 overflow-auto sm:text-sm" tabindex="-1" role="listbox" :style="{ maxHeight: menuMaxHeight }">
|
||||
<template v-for="item in itemsToShow">
|
||||
<li :key="item.value" class="text-gray-100 relative py-2 cursor-pointer hover:bg-black-400" :id="'listbox-option-' + item.value" role="option" tabindex="0" @keyup.enter="clickedOption(item.value)" @click="clickedOption(item.value)">
|
||||
<div class="flex items-center">
|
||||
@ -41,7 +41,11 @@ export default {
|
||||
default: () => []
|
||||
},
|
||||
disabled: Boolean,
|
||||
small: Boolean
|
||||
small: Boolean,
|
||||
menuMaxHeight: {
|
||||
type: String,
|
||||
default: '224px'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -38,7 +38,30 @@ Vue.prototype.$languageCodeOptions = Object.keys(languageCodeMap).map(code => {
|
||||
|
||||
// iTunes search API uses ISO 3166 country codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
const podcastSearchRegionMap = {
|
||||
'br': { label: 'Brasil' },
|
||||
'be': { label: 'België / Belgique / Belgien' },
|
||||
'cz': { label: 'Česko' },
|
||||
'dk': { label: 'Danmark' },
|
||||
'de': { label: 'Deutschland' },
|
||||
'ee': { label: 'Eesti' },
|
||||
'es': { label: 'España / Espanya / Espainia' },
|
||||
'fr': { label: 'France' },
|
||||
'hr': { label: 'Hrvatska' },
|
||||
'il': { label: 'ישראל / إسرائيل' },
|
||||
'it': { label: 'Italia' },
|
||||
'lu': { label: 'Luxembourg / Luxemburg / Lëtezebuerg' },
|
||||
'hu': { label: 'Magyarország' },
|
||||
'nl': { label: 'Nederland' },
|
||||
'no': { label: 'Norge' },
|
||||
'at': { label: 'Österreich' },
|
||||
'pl': { label: 'Polska' },
|
||||
'pt': { label: 'Portugal' },
|
||||
'ru': { label: 'Россия' },
|
||||
'ch': { label: 'Schweiz / Suisse / Svizzera' },
|
||||
'se': { label: 'Sverige' },
|
||||
'vn': { label: 'Việt Nam' },
|
||||
'ua': { label: 'Україна' },
|
||||
'gb': { label: 'United Kingdom' },
|
||||
'us': { label: 'United States' },
|
||||
'cn': { label: '中国' }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user