kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Merge branch '1080-volume' into 'develop'
Fix #1080: broken artist and album pages Closes #1080 See merge request funkwhale/funkwhale!1162environments/review-docs-devel-1399dq/deployments/6607
commit
90f3c67b01
|
@ -107,10 +107,12 @@ export default {
|
|||
return this.track.uploads && this.track.uploads.length > 0
|
||||
} else if (this.artist && this.artist.tracks_count) {
|
||||
return this.artist.tracks_count > 0
|
||||
} else if (this.artist && this.artist.albums) {
|
||||
} else if (this.artist && this.artist.albums) {
|
||||
return this.artist.albums.filter((a) => {
|
||||
return a.is_playable === true
|
||||
}).length > 0
|
||||
} else if (this.album) {
|
||||
return this.album.is_playable
|
||||
} else if (this.tracks) {
|
||||
return this.tracks.filter((t) => {
|
||||
return t.uploads && t.uploads.length > 0
|
||||
|
@ -229,6 +231,7 @@ export default {
|
|||
jQuery(self.$el).find('.ui.dropdown').dropdown('hide')
|
||||
},
|
||||
addNext (next) {
|
||||
console.log('CLICKED')
|
||||
let self = this
|
||||
let wasEmpty = this.$store.state.queue.tracks.length === 0
|
||||
this.getPlayableTracks().then((tracks) => {
|
||||
|
@ -253,7 +256,6 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
clicked () {
|
||||
|
||||
let self = this
|
||||
this.$nextTick(() => {
|
||||
jQuery(this.$el).find('.ui.dropdown').dropdown({
|
||||
|
|
|
@ -169,13 +169,16 @@ export default {
|
|||
methods: {
|
||||
async fetchData() {
|
||||
this.isLoading = true
|
||||
let tracksResponse = axios.get(`tracks/`, {params: {ordering: 'disc_number,position', album: this.id, page_size: 100}})
|
||||
let albumResponse = await axios.get(`albums/${this.id}/`, {params: {refresh: 'true'}})
|
||||
let artistResponse = await axios.get(`artists/${albumResponse.data.artist.id}/`)
|
||||
this.artist = artistResponse.data
|
||||
if (this.artist.channel) {
|
||||
this.artist.channel.artist = this.artist
|
||||
}
|
||||
this.object = backend.Album.clean(albumResponse.data)
|
||||
tracksResponse = await tracksResponse
|
||||
this.object = albumResponse.data
|
||||
this.object.tracks = tracksResponse.data.results
|
||||
this.discs = this.object.tracks.reduce(groupByDisc, [])
|
||||
this.isLoading = false
|
||||
|
||||
|
|
|
@ -195,9 +195,7 @@ export default {
|
|||
self.nextAlbumsUrl = response.data.next
|
||||
self.totalAlbums = response.data.count
|
||||
let parsed = JSON.parse(JSON.stringify(response.data.results))
|
||||
self.albums = parsed.map(album => {
|
||||
return backend.Album.clean(album)
|
||||
})
|
||||
self.albums = parsed
|
||||
|
||||
})
|
||||
await trackPromise
|
||||
|
|
Ładowanie…
Reference in New Issue