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:
Vito0912 2024-08-25 17:50:47 +02:00
parent d4a5955cbc
commit d55ed05672
No known key found for this signature in database
GPG key ID: 29A3D509FE70B237
2 changed files with 24 additions and 16 deletions

View file

@ -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')

View file

@ -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);