-
+
+
-
@@ -68,11 +71,22 @@ export default {
return {
name: '',
provider: 'google',
- mediaCategory: '',
+ icon: '',
folders: [],
showDirectoryPicker: false,
disableWatcher: false,
- newFolderPath: ''
+ newFolderPath: '',
+ mediaType: null,
+ mediaTypes: [
+ {
+ value: 'book',
+ text: 'Books'
+ },
+ {
+ value: 'podcast',
+ text: 'Podcasts'
+ }
+ ]
}
},
computed: {
@@ -90,9 +104,10 @@ export default {
var newfolderpaths = this.folderPaths.join(',')
var origfolderpaths = this.library.folders.map((f) => f.fullPath).join(',')
- return newfolderpaths === origfolderpaths && this.name === this.library.name && this.provider === this.library.provider && this.disableWatcher === this.library.disableWatcher && this.mediaCategory === this.library.mediaCategory && !this.newFolderPath
+ return newfolderpaths === origfolderpaths && this.name === this.library.name && this.provider === this.library.provider && this.disableWatcher === this.library.disableWatcher && this.icon === this.library.icon && !this.newFolderPath
},
providers() {
+ if (this.mediaType === 'podcast') return this.$store.state.scanners.podcastProviders
return this.$store.state.scanners.providers
},
globalWatcherDisabled() {
@@ -100,6 +115,9 @@ export default {
}
},
methods: {
+ changedMediaType() {
+ this.provider = this.providers[0].value
+ },
removeFolder(folder) {
this.folders = this.folders.filter((f) => f.fullPath !== folder.fullPath)
},
@@ -113,7 +131,8 @@ export default {
this.provider = this.library ? this.library.provider : 'google'
this.folders = this.library ? this.library.folders.map((p) => ({ ...p })) : []
this.disableWatcher = this.library ? !!this.library.disableWatcher : false
- this.mediaCategory = this.library ? this.library.mediaCategory : 'default'
+ this.icon = this.library ? this.library.icon : 'default'
+ this.mediaType = this.library ? this.library.mediaType : 'book'
this.showDirectoryPicker = false
},
selectFolder(fullPath) {
@@ -144,8 +163,7 @@ export default {
name: this.name,
provider: this.provider,
folders: this.folders,
- mediaCategory: this.mediaCategory,
- icon: this.mediaCategory,
+ icon: this.icon,
disableWatcher: this.disableWatcher
}
@@ -180,8 +198,8 @@ export default {
name: this.name,
provider: this.provider,
folders: this.folders,
- mediaCategory: this.mediaCategory,
- icon: this.mediaCategory,
+ icon: this.icon,
+ mediaType: this.mediaType,
disableWatcher: this.disableWatcher
}
diff --git a/client/components/ui/Dropdown.vue b/client/components/ui/Dropdown.vue
index e15d16b5..c351ab42 100644
--- a/client/components/ui/Dropdown.vue
+++ b/client/components/ui/Dropdown.vue
@@ -1,12 +1,12 @@
-
{{ label }}
-