From a28acb8353fee596dcd26a5b162c61a17e2bdc68 Mon Sep 17 00:00:00 2001 From: Ciaran Ainsworth Date: Sun, 16 Jun 2019 16:23:12 +0100 Subject: [PATCH] Added buttons to search for objects on Discogs --- changes/changelog.d/368.enhancement | 1 + front/src/components/library/AlbumBase.vue | 13 ++++++++++++- front/src/components/library/ArtistBase.vue | 10 ++++++++++ front/src/components/library/TrackBase.vue | 12 ++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/368.enhancement diff --git a/changes/changelog.d/368.enhancement b/changes/changelog.d/368.enhancement new file mode 100644 index 000000000..7e8f78c0a --- /dev/null +++ b/changes/changelog.d/368.enhancement @@ -0,0 +1 @@ +Added button to search for objects on Discogs (#368) diff --git a/front/src/components/library/AlbumBase.vue b/front/src/components/library/AlbumBase.vue index 1f89bef88..2b3c978bc 100644 --- a/front/src/components/library/AlbumBase.vue +++ b/front/src/components/library/AlbumBase.vue @@ -61,7 +61,11 @@ View on MusicBrainz - + + Search on Discogs + + @@ -168,6 +172,13 @@ export default { return "https://musicbrainz.org/release/" + this.object.mbid } }, + discogsUrl() { + return ( + "https://discogs.com/search/?type=release&title=" + + encodeURI(this.object.title) + "&artist=" + + encodeURI(this.object.artist.name) + ) + }, headerStyle() { if (!this.object.cover.original) { return "" diff --git a/front/src/components/library/ArtistBase.vue b/front/src/components/library/ArtistBase.vue index 5da7370ba..3c21f603f 100644 --- a/front/src/components/library/ArtistBase.vue +++ b/front/src/components/library/ArtistBase.vue @@ -72,6 +72,10 @@ View on MusicBrainz + + + Search on Discogs + { diff --git a/front/src/components/library/TrackBase.vue b/front/src/components/library/TrackBase.vue index 639c8f51b..a968f8b0c 100644 --- a/front/src/components/library/TrackBase.vue +++ b/front/src/components/library/TrackBase.vue @@ -80,6 +80,10 @@ View on MusicBrainz + + + Search on Discogs +