mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 08:15:02 -05:00
#1473 Fix the listing of files
This commit is contained in:
parent
c6b4f565a5
commit
41d80c4f1a
@ -22,16 +22,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #content>
|
||||
<list-directories :directories="files.directories" />
|
||||
<list-playlists :playlists="playlists_list" />
|
||||
<list-directories :directories="dirs" />
|
||||
<list-playlists :playlists="playlists" />
|
||||
<list-tracks
|
||||
:tracks="files.tracks.items"
|
||||
:tracks="tracks"
|
||||
:expression="play_expression"
|
||||
:show_icon="true"
|
||||
/>
|
||||
<modal-dialog-directory
|
||||
:show="show_details_modal"
|
||||
:directory="{ path: current_directory }"
|
||||
:directory="current_directory"
|
||||
@close="show_details_modal = false"
|
||||
/>
|
||||
</template>
|
||||
@ -58,16 +58,15 @@ const dataObject = {
|
||||
|
||||
set: function (vm, response) {
|
||||
if (response) {
|
||||
vm.files = response.data
|
||||
vm.playlists_list = new GroupByList(response.data.playlists)
|
||||
vm.dirs = response.data.directories
|
||||
vm.playlists = new GroupByList(response.data.playlists)
|
||||
vm.tracks = new GroupByList(response.data.tracks)
|
||||
} else {
|
||||
vm.files = {
|
||||
directories: vm.$store.state.config.directories.map((dir) => {
|
||||
vm.dirs = vm.$store.state.config.directories.map((dir) => {
|
||||
return { path: dir }
|
||||
}),
|
||||
tracks: { items: [] },
|
||||
playlists: { items: [] }
|
||||
}
|
||||
})
|
||||
vm.playlists = new GroupByList()
|
||||
vm.tracks = new GroupByList()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -97,12 +96,9 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
files: {
|
||||
directories: [],
|
||||
tracks: { items: [] },
|
||||
playlists: { items: [] }
|
||||
},
|
||||
playlists_list: new GroupByList(),
|
||||
dirs: [],
|
||||
playlists: new GroupByList(),
|
||||
tracks: new GroupByList(),
|
||||
show_details_modal: false
|
||||
}
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
||||
import ListTracks from '@/components/ListTracks.vue'
|
||||
import webapi from '@/webapi'
|
||||
import { GroupByList } from '../lib/GroupByList'
|
||||
import { GroupByList } from '@/lib/GroupByList'
|
||||
|
||||
const dataObject = {
|
||||
load: function (to) {
|
||||
|
Loading…
Reference in New Issue
Block a user