From 2e0b6a151e7181d1721c9f302b177839d18d6189 Mon Sep 17 00:00:00 2001 From: Jonathan Cremin Date: Sun, 25 Jan 2015 22:21:45 +0000 Subject: [PATCH] Fix sharing url on first page view --- test/lookup.js | 4 ++-- views/head.jsx | 4 ++-- views/home.jsx | 5 +++-- views/share.jsx | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test/lookup.js b/test/lookup.js index 021c254..0f63a36 100644 --- a/test/lookup.js +++ b/test/lookup.js @@ -1,12 +1,12 @@ "use strict"; require('should'); -var search = require("../lib/search"); +var lookup = require("../lib/lookup"); describe('Search with url', function(){ it('should find album by url', function(done){ - search("https://play.google.com/music/listen#/album/Bz6wrjczddcj5hurijsv6ohdoay").then(function(result) { + lookup("https://play.google.com/music/listen#/album/Bz6wrjczddcj5hurijsv6ohdoay").then(function(result) { result.name.should.equal("Phase 5"); done(); }); diff --git a/views/head.jsx b/views/head.jsx index 35b7f08..09ed744 100644 --- a/views/head.jsx +++ b/views/head.jsx @@ -16,13 +16,13 @@ module.exports = React.createClass({ {this.props.shares ? "Listen to " + this.props.shares[0].name + " by " + this.props.shares[0].artist.name + " on Match Audio": "Match Audio"} - + - + diff --git a/views/home.jsx b/views/home.jsx index 8673665..8bb0460 100644 --- a/views/home.jsx +++ b/views/home.jsx @@ -141,8 +141,9 @@ module.exports = React.createClass({
-

Make sharing from music services better. - We match album and track links from Rdio, Spotify, Deezer, Beats Music, Google Music and iTunes and give you back a link with all of them. +

Match Audio makes sharing from music services better. + What happens when you share your favourite song on Spotify with a friend, but they don't use Spotify? +

We match album and track links from Youtube, Rdio, Spotify, Deezer, Google Music, Xbox Music, Beats Music, and iTunes and give you back one link with matches we find on all of them.

diff --git a/views/share.jsx b/views/share.jsx index a1c2413..b04e57e 100644 --- a/views/share.jsx +++ b/views/share.jsx @@ -116,7 +116,8 @@ module.exports = React.createClass({ this.setState({ name: shares[0].name, artist: shares[0].artist.name, - shares: shares + shares: shares, + shareUrl: "https://match.audio/" + this.props.shares[0].service + "/" + this.props.shares[0].type + "/" + this.props.shares[0].id }); }.bind(this)); }.bind(this)