diff --git a/changes/changelog.d/422.bugfix b/changes/changelog.d/422.bugfix
new file mode 100644
index 000000000..c75b19c7f
--- /dev/null
+++ b/changes/changelog.d/422.bugfix
@@ -0,0 +1 @@
+Do not display "view on MusicBrainz" button if we miss the mbid (#422)
diff --git a/front/src/components/library/Album.vue b/front/src/components/library/Album.vue
index 8956d14cc..8ea983369 100644
--- a/front/src/components/library/Album.vue
+++ b/front/src/components/library/Album.vue
@@ -33,7 +33,7 @@
Search on Wikipedia
-
+
View on MusicBrainz
@@ -105,7 +105,9 @@ export default {
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.album.title + ' ' + this.album.artist.name)
},
musicbrainzUrl () {
- return 'https://musicbrainz.org/release/' + this.album.mbid
+ if (this.album.mbid) {
+ return 'https://musicbrainz.org/release/' + this.album.mbid
+ }
},
headerStyle () {
if (!this.album.cover.original) {
diff --git a/front/src/components/library/Artist.vue b/front/src/components/library/Artist.vue
index 387596be1..7a3c1f7c7 100644
--- a/front/src/components/library/Artist.vue
+++ b/front/src/components/library/Artist.vue
@@ -31,7 +31,7 @@
Search on Wikipedia
-
+
View on MusicBrainz
@@ -154,7 +154,9 @@ export default {
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.artist.name)
},
musicbrainzUrl () {
- return 'https://musicbrainz.org/artist/' + this.artist.mbid
+ if (this.artist.mbid) {
+ return 'https://musicbrainz.org/artist/' + this.artist.mbid
+ }
},
allTracks () {
let tracks = []
diff --git a/front/src/components/library/Track.vue b/front/src/components/library/Track.vue
index 040d3a466..483ff6673 100644
--- a/front/src/components/library/Track.vue
+++ b/front/src/components/library/Track.vue
@@ -40,7 +40,7 @@
Search on Wikipedia
-
+
View on MusicBrainz
@@ -199,7 +199,9 @@ export default {
return 'https://en.wikipedia.org/w/index.php?search=' + encodeURI(this.track.title + ' ' + this.track.artist.name)
},
musicbrainzUrl () {
- return 'https://musicbrainz.org/recording/' + this.track.mbid
+ if (this.track.mbid) {
+ return 'https://musicbrainz.org/recording/' + this.track.mbid
+ }
},
downloadUrl () {
let u = this.$store.getters['instance/absoluteUrl'](this.track.listen_url)