added more tags
This commit is contained in:
parent
3c5905bb4e
commit
995645dcb5
File diff suppressed because one or more lines are too long
21
index.js
21
index.js
|
@ -119,6 +119,7 @@ async function track(id, format, access_token, tagging) {
|
|||
id3.padding = 0
|
||||
id3.setFrame('TIT2', json.title)
|
||||
.setFrame('TALB', json.album.title)
|
||||
.setFrame('TPE2', json.artist.name)
|
||||
|
||||
if (json.contributors !== undefined) {
|
||||
contr_list = [];
|
||||
|
@ -129,8 +130,26 @@ async function track(id, format, access_token, tagging) {
|
|||
id3.setFrame('TPE1', contr_list)
|
||||
}
|
||||
|
||||
if (json.track_position !== undefined) {
|
||||
id3.setFrame('TRCK', json.track_position)
|
||||
}
|
||||
|
||||
if (json.disk_number !== undefined) {
|
||||
id3.setFrame('TPOS', json.disk_number)
|
||||
}
|
||||
|
||||
if (json.isrc !== "") {
|
||||
id3.setFrame('TSRC', json.isrc)
|
||||
}
|
||||
|
||||
if (json.bpm !== undefined) {
|
||||
id3.setFrame('TBPM', json.bpm)
|
||||
}
|
||||
|
||||
if (json.release_date !== undefined) {
|
||||
id3.setFrame('TYER', json.release_date.split('-')[0])
|
||||
const split = json.release_date.split('-')
|
||||
id3.setFrame('TYER', split[0])
|
||||
id3.setFrame('TDAT', split[2]+split[1])
|
||||
}
|
||||
|
||||
if (json.album.cover_xl !== undefined) {
|
||||
|
|
Loading…
Reference in New Issue