mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 10:39:34 +02:00
Fix #747: Support embedding full artist discographies
This commit is contained in:
parent
1d787904f4
commit
8ae00b0698
9 changed files with 157 additions and 6 deletions
|
@ -139,7 +139,7 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
time,
|
||||
supportedTypes: ['track', 'album'],
|
||||
supportedTypes: ['track', 'album', 'artist'],
|
||||
baseUrl: '',
|
||||
error: null,
|
||||
type: null,
|
||||
|
@ -158,6 +158,7 @@ export default {
|
|||
},
|
||||
created () {
|
||||
let params = getURLParams()
|
||||
this.baseUrl = params.b || ''
|
||||
this.type = params.type
|
||||
if (this.supportedTypes.indexOf(this.type) === -1) {
|
||||
this.error = 'invalid_type'
|
||||
|
@ -229,7 +230,10 @@ export default {
|
|||
this.fetchTrack(id)
|
||||
}
|
||||
if (type === 'album') {
|
||||
this.fetchTracks({album: id, playable: true})
|
||||
this.fetchTracks({album: id, playable: true, ordering: ",disc_number,position"})
|
||||
}
|
||||
if (type === 'artist') {
|
||||
this.fetchTracks({artist: id, playable: true, ordering: "-release_date,disc_number,position"})
|
||||
}
|
||||
},
|
||||
play (index) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue