play_circle_filled
@@ -132,7 +132,10 @@ export default {
return this.userProgress ? !!this.userProgress.isRead : false
},
showError() {
- return this.hasMissingParts || this.hasInvalidParts
+ return this.hasMissingParts || this.hasInvalidParts || this.isMissing
+ },
+ isMissing() {
+ return this.audiobook.isMissing
},
hasMissingParts() {
return this.audiobook.hasMissingParts
@@ -141,6 +144,7 @@ export default {
return this.audiobook.hasInvalidParts
},
errorText() {
+ if (this.isMissing) return 'Audiobook directory is missing!'
var txt = ''
if (this.hasMissingParts) {
txt = `${this.hasMissingParts} missing parts.`
diff --git a/client/components/modals/EditModal.vue b/client/components/modals/EditModal.vue
index a4fbbc20..246f1a4f 100644
--- a/client/components/modals/EditModal.vue
+++ b/client/components/modals/EditModal.vue
@@ -109,6 +109,7 @@ export default {
availableTabs() {
if (!this.userCanUpdate && !this.userCanDownload) return []
return this.tabs.filter((tab) => {
+ if (tab.id === 'download' && this.isMissing) return false
if ((tab.id === 'download' || tab.id === 'tracks') && this.userCanDownload) return true
if (tab.id !== 'download' && tab.id !== 'tracks' && this.userCanUpdate) return true
return false
@@ -122,6 +123,9 @@ export default {
var _tab = this.tabs.find((t) => t.id === this.selectedTab)
return _tab ? _tab.component : ''
},
+ isMissing() {
+ return this.selectedAudiobook.isMissing
+ },
selectedAudiobook() {
return this.$store.state.selectedAudiobook || {}
},
diff --git a/client/components/modals/edit-tabs/Tracks.vue b/client/components/modals/edit-tabs/Tracks.vue
index 91066a1a..5f1df561 100644
--- a/client/components/modals/edit-tabs/Tracks.vue
+++ b/client/components/modals/edit-tabs/Tracks.vue
@@ -11,7 +11,7 @@
Filename |
Size |
Duration |
-
Download |
+
Download |
@@ -27,7 +27,7 @@
{{ $secondsToTimestamp(track.duration) }}
|
-
+ |
download
|
@@ -64,6 +64,12 @@ export default {
},
userCanDownload() {
return this.$store.getters['user/getUserCanDownload']
+ },
+ isMissing() {
+ return this.audiobook.isMissing
+ },
+ showDownload() {
+ return this.userCanDownload && !this.isMissing
}
},
methods: {
diff --git a/client/components/ui/IconBtn.vue b/client/components/ui/IconBtn.vue
index 0b4fee25..5efbe381 100644
--- a/client/components/ui/IconBtn.vue
+++ b/client/components/ui/IconBtn.vue
@@ -1,5 +1,5 @@
-
@@ -39,6 +39,9 @@ export default {