added more tags

This commit is contained in:
uh wot 2021-06-03 00:55:29 +02:00
parent 3c5905bb4e
commit 995645dcb5
Signed by: uhwot
GPG Key ID: CB2454984587B781
2 changed files with 23 additions and 4 deletions

6
dist/worker.js vendored

File diff suppressed because one or more lines are too long

View File

@ -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) {