Minor bugfixes for groove and deezer
This commit is contained in:
parent
cfaef8be94
commit
2693afb2bd
7 changed files with 27 additions and 23 deletions
|
@ -9,7 +9,7 @@ const debug = debuglog('match.audio:share');
|
|||
export function find(music) {
|
||||
return models[music.type].findOne({
|
||||
where: {
|
||||
externalId: music.id,
|
||||
externalId: music.id.toString(),
|
||||
},
|
||||
include: [
|
||||
{ model: models.artist },
|
||||
|
@ -20,7 +20,7 @@ export function find(music) {
|
|||
|
||||
export function create(music) {
|
||||
return models[music.type].create({
|
||||
externalId: music.id,
|
||||
externalId: music.id.toString(),
|
||||
service: music.service,
|
||||
name: music.name,
|
||||
albumName: music.type === 'track' ? music.album.name : null,
|
||||
|
@ -31,7 +31,7 @@ export function create(music) {
|
|||
},
|
||||
matches: [
|
||||
{
|
||||
externalId: music.id,
|
||||
externalId: music.id.toString(),
|
||||
service: music.service,
|
||||
name: music.name,
|
||||
streamUrl: music.streamUrl,
|
||||
|
@ -62,7 +62,7 @@ export function findMatchesAsync(share) {
|
|||
models.match.create({
|
||||
trackId: share.$modelOptions.name.singular == 'track' ? share.id : null,
|
||||
albumId: share.$modelOptions.name.singular == 'album' ? share.id : null,
|
||||
externalId: match.id,
|
||||
externalId: match.id.toString(),
|
||||
service: match.service,
|
||||
name: match.name,
|
||||
streamUrl: match.streamUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue