mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 04:11:43 +00:00
excluded podcasts for now
excluded podcasts for now as we cannot get all episodes of a library currently with few requests (afaik)
This commit is contained in:
parent
d4a5955cbc
commit
d55ed05672
2 changed files with 24 additions and 16 deletions
|
|
@ -123,15 +123,21 @@ export default {
|
||||||
title: this.$strings.HeaderYourStats,
|
title: this.$strings.HeaderYourStats,
|
||||||
path: '/config/stats'
|
path: '/config/stats'
|
||||||
})
|
})
|
||||||
|
if(this.currentLibraryMediaType === 'book')
|
||||||
|
{
|
||||||
configRoutes.push({
|
configRoutes.push({
|
||||||
id: 'config-to-go',
|
id: 'config-to-go',
|
||||||
title: this.$strings.HeaderToGo,
|
title: this.$strings.HeaderToGo,
|
||||||
path: '/config/to-go'
|
path: '/config/to-go'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return configRoutes
|
return configRoutes
|
||||||
},
|
},
|
||||||
|
currentLibraryMediaType() {
|
||||||
|
return this.$store.getters['libraries/getCurrentLibraryMediaType']
|
||||||
|
},
|
||||||
wrapperClass() {
|
wrapperClass() {
|
||||||
var classes = []
|
var classes = []
|
||||||
if (this.drawerOpen) classes.push('translate-x-0')
|
if (this.drawerOpen) classes.push('translate-x-0')
|
||||||
|
|
|
||||||
|
|
@ -116,8 +116,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>export default {
|
||||||
export default {
|
asyncData({ redirect, store }) {
|
||||||
|
if(store.getters['libraries/getCurrentLibraryMediaType'] !== 'book') {
|
||||||
|
redirect(`/library/${store.state.libraries.currentLibraryId}`)
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
items: null,
|
items: null,
|
||||||
|
|
@ -132,6 +137,9 @@ export default {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.init()
|
this.init()
|
||||||
this.resetValues()
|
this.resetValues()
|
||||||
|
if(this.getCurrentLibraryMediaType !== 'book') {
|
||||||
|
this.$router.push(`/config`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -148,6 +156,9 @@ export default {
|
||||||
currentLibraryId() {
|
currentLibraryId() {
|
||||||
return this.$store.state.libraries.currentLibraryId
|
return this.$store.state.libraries.currentLibraryId
|
||||||
},
|
},
|
||||||
|
getCurrentLibraryMediaType() {
|
||||||
|
return this.$store.getters['libraries/getCurrentLibraryMediaType']
|
||||||
|
},
|
||||||
mediaProgress() {
|
mediaProgress() {
|
||||||
return [...this.user.mediaProgress].sort((a, b) => b.lastUpdate - a.lastUpdate);
|
return [...this.user.mediaProgress].sort((a, b) => b.lastUpdate - a.lastUpdate);
|
||||||
},
|
},
|
||||||
|
|
@ -176,15 +187,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
unfinishedStartedItems() {
|
unfinishedStartedItems() {
|
||||||
console.log(
|
|
||||||
this.currentMediaProgress
|
|
||||||
.map((mp) => {
|
|
||||||
const item = this.items.find(item => item.id === mp.libraryItemId);
|
|
||||||
return { ...item, mediaProgress: mp };
|
|
||||||
})
|
|
||||||
.filter((item) => !item.mediaProgress.isFinished || item.mediaProgress.progress < 1)
|
|
||||||
.sort((a, b) => b.mediaProgress.progress - a.mediaProgress.progress)[0]
|
|
||||||
)
|
|
||||||
return this.currentMediaProgress
|
return this.currentMediaProgress
|
||||||
.map((mp) => {
|
.map((mp) => {
|
||||||
const item = this.items.find(item => item.id === mp.libraryItemId);
|
const item = this.items.find(item => item.id === mp.libraryItemId);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue