mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2025-01-05 22:18:42 +00:00
hdtracks: Move audio quality into the annotation
Only use it as disambiguation comment if it is non-standard quality.
This commit is contained in:
parent
4ad72e58d4
commit
84ab91f589
1 changed files with 3 additions and 2 deletions
|
@ -39,6 +39,7 @@ async function parsePage() {
|
||||||
|
|
||||||
function parseHDtracksRelease(data, releaseUrl) {
|
function parseHDtracksRelease(data, releaseUrl) {
|
||||||
const releaseDate = new Date(data.release);
|
const releaseDate = new Date(data.release);
|
||||||
|
const audioQuality = data.quality.replace(' · ', '/');
|
||||||
const release = {
|
const release = {
|
||||||
id: data.productId, // not used as release editor seed
|
id: data.productId, // not used as release editor seed
|
||||||
title: data.name,
|
title: data.name,
|
||||||
|
@ -48,8 +49,8 @@ function parseHDtracksRelease(data, releaseUrl) {
|
||||||
year: releaseDate.getUTCFullYear(),
|
year: releaseDate.getUTCFullYear(),
|
||||||
month: releaseDate.getUTCMonth() + 1,
|
month: releaseDate.getUTCMonth() + 1,
|
||||||
day: releaseDate.getUTCDate(),
|
day: releaseDate.getUTCDate(),
|
||||||
comment: data.quality.replace(' · ', '/'),
|
comment: audioQuality != '44.1kHz/16bit' ? audioQuality : '',
|
||||||
annotation: [data.cLine, data.pLine].join('\n'),
|
annotation: [`${audioQuality} available on HDtracks`, data.cLine, data.pLine].join('\n'),
|
||||||
// `data.credits` is currently not included as its unclear for which tracks the individual credits apply
|
// `data.credits` is currently not included as its unclear for which tracks the individual credits apply
|
||||||
discs: [],
|
discs: [],
|
||||||
urls: [],
|
urls: [],
|
||||||
|
|
Loading…
Reference in a new issue