mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
[web] Show stream playlists (rss, radio) only if config option "radio_playlists" is set to true
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
<p class="title is-4">
|
||||
{{ playlist.name }}
|
||||
</p>
|
||||
<p class="heading">{{ playlists.total }} playlists</p>
|
||||
<p class="heading">{{ playlists.count }} playlists</p>
|
||||
</template>
|
||||
<template #content>
|
||||
<list-playlists :playlists="playlists.items" />
|
||||
<list-playlists :playlists="playlists" />
|
||||
</template>
|
||||
</content-with-heading>
|
||||
</template>
|
||||
@@ -16,6 +16,7 @@
|
||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
||||
import ListPlaylists from '@/components/ListPlaylists.vue'
|
||||
import webapi from '@/webapi'
|
||||
import { GroupByList, noop } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
@@ -27,7 +28,7 @@ const dataObject = {
|
||||
|
||||
set: function (vm, response) {
|
||||
vm.playlist = response[0].data
|
||||
vm.playlists = response[1].data
|
||||
vm.playlists_list = new GroupByList(response[1].data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +52,25 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
playlist: {},
|
||||
playlists: {}
|
||||
playlists_list: new GroupByList()
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
radio_playlists() {
|
||||
return this.$store.state.config.radio_playlists
|
||||
},
|
||||
|
||||
playlists() {
|
||||
this.playlists_list.group(noop(), [
|
||||
(playlist) =>
|
||||
playlist.folder ||
|
||||
this.radio_playlists ||
|
||||
playlist.stream_count === 0 ||
|
||||
playlist.item_count > playlist.stream_count
|
||||
])
|
||||
|
||||
return this.playlists_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user