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