diff --git a/changes/changelog.d/637.bugfix b/changes/changelog.d/637.bugfix new file mode 100644 index 000000000..19764e419 --- /dev/null +++ b/changes/changelog.d/637.bugfix @@ -0,0 +1 @@ +Fixed greyed tracks in radio builder and detail page (#637) diff --git a/front/src/components/audio/PlayButton.vue b/front/src/components/audio/PlayButton.vue index 521a66f87..27a052269 100644 --- a/front/src/components/audio/PlayButton.vue +++ b/front/src/components/audio/PlayButton.vue @@ -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) { diff --git a/front/src/components/audio/track/Row.vue b/front/src/components/audio/track/Row.vue index fd8b2daaf..d3b7dc734 100644 --- a/front/src/components/audio/track/Row.vue +++ b/front/src/components/audio/track/Row.vue @@ -1,7 +1,7 @@