Fix itunes matching
This commit is contained in:
parent
62b7121301
commit
7b36e8bf0c
6 changed files with 91 additions and 38 deletions
|
@ -1,17 +1,20 @@
|
|||
import { parse } from 'url';
|
||||
import kue from 'kue';
|
||||
import debuglog from 'debug';
|
||||
|
||||
import lookup from '../lib/lookup';
|
||||
import services from '../lib/services';
|
||||
import { find, create } from '../lib/share';
|
||||
|
||||
const debug = debuglog('combine.fm:search');
|
||||
|
||||
const queue = kue.createQueue({
|
||||
redis: process.env.REDIS_URL,
|
||||
});
|
||||
|
||||
export default function* () {
|
||||
const url = parse(this.request.body.url);
|
||||
|
||||
debug(`URL ${url}`);
|
||||
this.assert(url.host, 400, { error: { message: 'You need to submit a url.' } });
|
||||
|
||||
const music = yield lookup(this.request.body.url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue