From 8d46a6df42796dff0ad87593e414832be052beb8 Mon Sep 17 00:00:00 2001 From: Jonathan Cremin Date: Tue, 24 Oct 2017 12:59:58 +0100 Subject: [PATCH] Update more marketing materials --- public/src/app.vue | 2 +- public/src/views/index.vue | 2 +- routes/search.js | 2 +- views/index.html | 6 ++-- worker.js | 56 ++++++++++++++++++++------------------ 5 files changed, 36 insertions(+), 32 deletions(-) diff --git a/public/src/app.vue b/public/src/app.vue index 6692aa9..7333db0 100644 --- a/public/src/app.vue +++ b/public/src/app.vue @@ -16,7 +16,7 @@ diff --git a/public/src/views/index.vue b/public/src/views/index.vue index 4bc76af..e1ae1ad 100644 --- a/public/src/views/index.vue +++ b/public/src/views/index.vue @@ -6,7 +6,7 @@ Combine.fm 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, Spotify, Deezer, Google Music, Xbox Music, and iTunes and give you back one link with matches we find on all of them. + We match album and track links from Youtube, Spotify, Google Music, Apple Musicm, Groove Music and Deezer and give you back one link with matches we find on all of them.

diff --git a/routes/search.js b/routes/search.js index 7621c29..bb5ff86 100644 --- a/routes/search.js +++ b/routes/search.js @@ -30,7 +30,7 @@ export default function* () { if (service.id === share.service) { continue; // eslint-disable-line no-continue } - const job = queue.create('search', {share: share, service: service}).save((err) => { + const job = queue.create('search', { share: share, service: service }).save((err) => { if (!err) console.log(job.id); }); } diff --git a/views/index.html b/views/index.html index 3332ac4..6c9c4c6 100644 --- a/views/index.html +++ b/views/index.html @@ -4,13 +4,13 @@ Combine.fm • <%=head.title%> - + ' /> - + - + diff --git a/worker.js b/worker.js index 22a1d7f..e870a23 100644 --- a/worker.js +++ b/worker.js @@ -16,34 +16,38 @@ function search(data, done) { const service = services.find(item => data.service.id === item.id); console.log(service); co(function* gen() { // eslint-disable-line no-loop-func - const match = yield service.search(share); + try { + const match = yield service.search(share); - if (match.id) { - models.match.create({ - trackId: share.type === 'track' ? share.id : null, - albumId: share.type === 'album' ? share.id : null, - externalId: match.id.toString(), - service: match.service, - name: match.name, - streamUrl: match.streamUrl, - purchaseUrl: match.purchaseUrl, - artworkSmall: match.artwork.small, - artworkLarge: match.artwork.large, - }); - } else { - models.match.create({ - trackId: share.type === 'track' ? share.id : null, - albumId: share.type === 'album' ? share.id : null, - externalId: null, - service: match.service, - name: null, - streamUrl: null, - purchaseUrl: null, - artworkSmall: null, - artworkLarge: null, - }); + if (match.id) { + models.match.create({ + trackId: share.type === 'track' ? share.id : null, + albumId: share.type === 'album' ? share.id : null, + externalId: match.id.toString(), + service: match.service, + name: match.name, + streamUrl: match.streamUrl, + purchaseUrl: match.purchaseUrl, + artworkSmall: match.artwork.small, + artworkLarge: match.artwork.large, + }); + } else { + models.match.create({ + trackId: share.type === 'track' ? share.id : null, + albumId: share.type === 'album' ? share.id : null, + externalId: null, + service: match.service, + name: null, + streamUrl: null, + purchaseUrl: null, + artworkSmall: null, + artworkLarge: null, + }); + } + return done(); + } catch (err) { + return done(err); } - return done(); }).catch((err) => { console.log(err); raven.captureException(err);