Migrating to workers, renaming service
This commit is contained in:
parent
850584ff36
commit
a6cd5f4266
29 changed files with 5542 additions and 611 deletions
|
@ -4,7 +4,7 @@ import PlayMusic from 'playmusic';
|
|||
import debuglog from 'debug';
|
||||
import urlMatch from './url';
|
||||
|
||||
const debug = debuglog('match.audio');
|
||||
const debug = debuglog('combine.fm');
|
||||
|
||||
const pm = bluebird.promisifyAll(new PlayMusic());
|
||||
|
||||
|
|
|
@ -54,8 +54,8 @@ export function* lookupId(possibleId, type, countrycode) {
|
|||
streamUrl: null,
|
||||
purchaseUrl: result.collectionViewUrl,
|
||||
artwork: {
|
||||
small: `https://match.audio/itunes/${result.artworkUrl100.replace('100x100', '200x200').replace('http://', '')}`,
|
||||
large: `https://match.audio/itunes/${result.artworkUrl100.replace('100x100', '600x600').replace('http://', '')}`,
|
||||
small: `${result.artworkUrl100.replace('100x100', '200x200').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
large: `${result.artworkUrl100.replace('100x100', '600x600').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
},
|
||||
artist: {
|
||||
name: result.artistName,
|
||||
|
@ -116,8 +116,8 @@ export function* search(data) {
|
|||
streamUrl: null,
|
||||
purchaseUrl: result.collectionViewUrl,
|
||||
artwork: {
|
||||
small: `https://match.audio/itunes/${result.artworkUrl100.replace('100x100', '200x200').replace('http://', '')}`,
|
||||
large: `https://match.audio/itunes/${result.artworkUrl100.replace('100x100', '600x600').replace('http://', '')}`,
|
||||
small: `${result.artworkUrl100.replace('100x100', '200x200').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
large: `${result.artworkUrl100.replace('100x100', '600x600').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
},
|
||||
artist: {
|
||||
name: result.artistName,
|
||||
|
|
|
@ -5,7 +5,7 @@ import urlMatch from './url';
|
|||
const spotify = new SpotifyWebApi({
|
||||
clientId: process.env.SPOTIFY_CLIENT_ID,
|
||||
clientSecret: process.env.SPOTIFY_CLIENT_SECRET,
|
||||
redirectUri: 'https://match.audio',
|
||||
redirectUri: 'https://combine.fm',
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'superagent-bluebird-promise';
|
|||
import debuglog from 'debug';
|
||||
import urlMatch from './url';
|
||||
|
||||
const debug = debuglog('match.audio:xbox');
|
||||
const debug = debuglog('combine.fm:xbox');
|
||||
|
||||
if (!process.env.XBOX_CLIENT_ID || !process.env.XBOX_CLIENT_SECRET) {
|
||||
debug('XBOX_CLIENT_ID and XBOX_CLIENT_SECRET environment variables not found, deactivating Xbox Music.');
|
||||
|
|
|
@ -6,7 +6,7 @@ import 'superagent-bluebird-promise';
|
|||
import debuglog from 'debug';
|
||||
import urlMatch from './url';
|
||||
|
||||
const debug = debuglog('match.audio:youtube');
|
||||
const debug = debuglog('combine.fm:youtube');
|
||||
|
||||
if (!process.env.YOUTUBE_KEY) {
|
||||
debug('YOUTUBE_KEY environment variable not found, deactivating Youtube.');
|
||||
|
@ -19,7 +19,7 @@ const credentials = {
|
|||
const apiRoot = 'https://www.googleapis.com/youtube/v3';
|
||||
|
||||
const nodebrainz = new Nodebrainz({
|
||||
userAgent: 'match-audio ( https://match.audio )',
|
||||
userAgent: 'combine.fm ( https://combine.fm )',
|
||||
defaultLimit: 10,
|
||||
retryOn: true,
|
||||
retryDelay: 3000,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue