Skip to content

Commit

Permalink
drop cover artist information #308
Browse files Browse the repository at this point in the history
  • Loading branch information
nondanee committed Nov 17, 2019
1 parent df21082 commit d94e429
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions provider/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const find = id => {
.then(response => response.json())
.then(jsonBody => {
let info = filter(jsonBody.songs[0], ['id', 'name', 'alias', 'duration'])
info.name = (info.name || '')
.replace(/(\s*cover[::\s][^)]+)/i, '')
.replace(/\(\s*cover[::\s][^\)]+\)/i, '')
info.album = filter(jsonBody.songs[0].album, ['id', 'name'])
info.artists = jsonBody.songs[0].artists.map(artist => filter(artist, ['id', 'name']))
info.keyword = info.name + ' - ' + info.artists.map(artist => artist.name).join(' / ')
Expand Down

0 comments on commit d94e429

Please sign in to comment.