From 18f0ed46a772e707d585ec6ae6dccb5babe94043 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 28 Jun 2019 11:57:32 +0200 Subject: [PATCH] Fix #871: broken URL to artist and album on album and track pages --- changes/changelog.d/871.bugfix | 1 + front/src/components/library/AlbumBase.vue | 2 +- front/src/components/library/TrackBase.vue | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changes/changelog.d/871.bugfix diff --git a/changes/changelog.d/871.bugfix b/changes/changelog.d/871.bugfix new file mode 100644 index 000000000..153b45bfc --- /dev/null +++ b/changes/changelog.d/871.bugfix @@ -0,0 +1 @@ +Fixed broken URL to artist and album on album and track pages (#871) diff --git a/front/src/components/library/AlbumBase.vue b/front/src/components/library/AlbumBase.vue index 2b3c978bc..016be2c37 100644 --- a/front/src/components/library/AlbumBase.vue +++ b/front/src/components/library/AlbumBase.vue @@ -192,7 +192,7 @@ export default { subtitle () { 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 %{ artist }', 'Album containing %{ count } tracks, by %{ artist }', 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: { diff --git a/front/src/components/library/TrackBase.vue b/front/src/components/library/TrackBase.vue index 4edd00c5d..2f3cc51a9 100644 --- a/front/src/components/library/TrackBase.vue +++ b/front/src/components/library/TrackBase.vue @@ -210,11 +210,11 @@ export default { }, albumUrl () { let route = this.$router.resolve({name: 'library.albums.detail', params: {id: this.track.album.id }}) - return route.location.path + return route.href }, artistUrl () { let route = this.$router.resolve({name: 'library.artists.detail', params: {id: this.track.artist.id }}) - return route.location.path + return route.href }, headerStyle() { if (!this.cover) {