Fix #637: greyed tracks in radio builder and detail page

This commit is contained in:
Eliot Berriot 2019-01-02 15:57:54 +01:00
parent 657311c316
commit b58f3e1440
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
5 changed files with 18 additions and 8 deletions

View file

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