mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 19:31:39 +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,
|
||||
path: '/config/stats'
|
||||
})
|
||||
configRoutes.push({
|
||||
id: 'config-to-go',
|
||||
title: this.$strings.HeaderToGo,
|
||||
path: '/config/to-go'
|
||||
})
|
||||
if(this.currentLibraryMediaType === 'book')
|
||||
{
|
||||
configRoutes.push({
|
||||
id: 'config-to-go',
|
||||
title: this.$strings.HeaderToGo,
|
||||
path: '/config/to-go'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return configRoutes
|
||||
},
|
||||
currentLibraryMediaType() {
|
||||
return this.$store.getters['libraries/getCurrentLibraryMediaType']
|
||||
},
|
||||
wrapperClass() {
|
||||
var classes = []
|
||||
if (this.drawerOpen) classes.push('translate-x-0')
|
||||
|
|
|
|||
|
|
@ -116,8 +116,13 @@
|
|||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
<script>export default {
|
||||
asyncData({ redirect, store }) {
|
||||
if(store.getters['libraries/getCurrentLibraryMediaType'] !== 'book') {
|
||||
redirect(`/library/${store.state.libraries.currentLibraryId}`)
|
||||
}
|
||||
return {}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: null,
|
||||
|
|
@ -132,6 +137,9 @@ export default {
|
|||
if (newVal) {
|
||||
this.init()
|
||||
this.resetValues()
|
||||
if(this.getCurrentLibraryMediaType !== 'book') {
|
||||
this.$router.push(`/config`)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -148,6 +156,9 @@ export default {
|
|||
currentLibraryId() {
|
||||
return this.$store.state.libraries.currentLibraryId
|
||||
},
|
||||
getCurrentLibraryMediaType() {
|
||||
return this.$store.getters['libraries/getCurrentLibraryMediaType']
|
||||
},
|
||||
mediaProgress() {
|
||||
return [...this.user.mediaProgress].sort((a, b) => b.lastUpdate - a.lastUpdate);
|
||||
},
|
||||
|
|
@ -176,15 +187,6 @@ export default {
|
|||
}
|
||||
},
|
||||
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
|
||||
.map((mp) => {
|
||||
const item = this.items.find(item => item.id === mp.libraryItemId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue