mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 12:49:15 +02:00
Fix #637: greyed tracks in radio builder and detail page
This commit is contained in:
parent
657311c316
commit
b58f3e1440
5 changed files with 18 additions and 8 deletions
|
@ -120,7 +120,14 @@ export default {
|
|||
this.isLoading = true
|
||||
let getTracks = new Promise((resolve, reject) => {
|
||||
if (self.track) {
|
||||
resolve([self.track])
|
||||
if (!self.track.uploads || self.track.uploads.length === 0) {
|
||||
// fetch uploads from api
|
||||
axios.get(`tracks/${self.track.id}/`).then((response) => {
|
||||
resolve([response.data])
|
||||
})
|
||||
} else {
|
||||
resolve([self.track])
|
||||
}
|
||||
} else if (self.tracks) {
|
||||
resolve(self.tracks)
|
||||
} else if (self.playlist) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue