Fix #871: broken URL to artist and album on album and track pages
This commit is contained in:
parent
0524c6db97
commit
18f0ed46a7
|
@ -0,0 +1 @@
|
||||||
|
Fixed broken URL to artist and album on album and track pages (#871)
|
|
@ -192,7 +192,7 @@ export default {
|
||||||
subtitle () {
|
subtitle () {
|
||||||
let route = this.$router.resolve({name: 'library.artists.detail', params: {id: this.object.artist.id }})
|
let route = this.$router.resolve({name: 'library.artists.detail', params: {id: this.object.artist.id }})
|
||||||
let msg = this.$npgettext('Content/Album/Header.Title', 'Album containing %{ count } track, by <a class="internal" href="%{ artistUrl }">%{ artist }</a>', 'Album containing %{ count } tracks, by <a class="internal" href="%{ artistUrl }">%{ artist }</a>', this.object.tracks.length)
|
let msg = this.$npgettext('Content/Album/Header.Title', 'Album containing %{ count } track, by <a class="internal" href="%{ artistUrl }">%{ artist }</a>', 'Album containing %{ count } tracks, by <a class="internal" href="%{ artistUrl }">%{ artist }</a>', this.object.tracks.length)
|
||||||
return this.$gettextInterpolate(msg, {count: this.object.tracks.length, artist: this.object.artist.name, artistUrl: route.location.path})
|
return this.$gettextInterpolate(msg, {count: this.object.tracks.length, artist: this.object.artist.name, artistUrl: route.href})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -210,11 +210,11 @@ export default {
|
||||||
},
|
},
|
||||||
albumUrl () {
|
albumUrl () {
|
||||||
let route = this.$router.resolve({name: 'library.albums.detail', params: {id: this.track.album.id }})
|
let route = this.$router.resolve({name: 'library.albums.detail', params: {id: this.track.album.id }})
|
||||||
return route.location.path
|
return route.href
|
||||||
},
|
},
|
||||||
artistUrl () {
|
artistUrl () {
|
||||||
let route = this.$router.resolve({name: 'library.artists.detail', params: {id: this.track.artist.id }})
|
let route = this.$router.resolve({name: 'library.artists.detail', params: {id: this.track.artist.id }})
|
||||||
return route.location.path
|
return route.href
|
||||||
},
|
},
|
||||||
headerStyle() {
|
headerStyle() {
|
||||||
if (!this.cover) {
|
if (!this.cover) {
|
||||||
|
|
Loading…
Reference in New Issue