mirror of
https://github.com/miraclx/freyr-js.git
synced 2024-11-01 04:41:45 +01:00
Update to @orsetto/meta-writer-0.1.5
This commit is contained in:
parent
fdf6070986
commit
f8058a129e
3 changed files with 10 additions and 11 deletions
11
cli.js
11
cli.js
|
@ -27,7 +27,7 @@ import {program as commander} from 'commander';
|
|||
import {decode as entityDecode} from 'html-entities';
|
||||
import {createFFmpeg, fetchFile} from '@ffmpeg/ffmpeg';
|
||||
import ProgressBar, {getPersistentStdout} from 'xprogress';
|
||||
import meta_writer from '@orsetto/meta-writer';
|
||||
import metaWriter from '@orsetto/meta-writer';
|
||||
|
||||
import _merge from 'lodash.merge';
|
||||
import _mergeWith from 'lodash.mergewith';
|
||||
|
@ -85,8 +85,7 @@ async function isOnline() {
|
|||
}
|
||||
|
||||
function parseMeta(params) {
|
||||
return Object.fromEntries(Object.entries(params || {})
|
||||
.filter(([, value]) => !['', undefined, null].includes(value)));
|
||||
return Object.fromEntries(Object.entries(params || {}).filter(([, value]) => !['', undefined, null].includes(value)));
|
||||
}
|
||||
|
||||
function getRetryMessage({meta, ref, retryCount, maxRetries, bytesRead, totalBytes, lastErr}) {
|
||||
|
@ -1030,7 +1029,7 @@ async function init(packageJson, queries, options) {
|
|||
Config.concurrency.embedder,
|
||||
async ({track, meta, files, audioSource}) => {
|
||||
try {
|
||||
await meta_writer(
|
||||
await metaWriter(
|
||||
parseMeta({
|
||||
TrackTitle: track.name, // ©nam
|
||||
TrackArtist: track.artists[0], // ©ART
|
||||
|
@ -1042,13 +1041,13 @@ async function init(packageJson, queries, options) {
|
|||
DiscNumber: `${track.disc_number}`, // disk
|
||||
DiscTotal: `${track.disc_number}`,
|
||||
RecordingDate: new Date(track.release_date).toISOString().split('T')[0], // ©day
|
||||
|
||||
|
||||
AlbumArtist: track.album_artist, // aART
|
||||
CopyrightMessage: track.copyrights.sort(({type}) => (type === 'P' ? -1 : 1))[0]?.text, // cprt
|
||||
EncoderSoftware: `freyr-js cli v${packageJson.version}`, // ©too
|
||||
EncodedBy: 'd3vc0dr', // ©enc
|
||||
FrontCover: files.image.file.path, // covr
|
||||
|
||||
|
||||
// Ilst tags
|
||||
cpil: track.compilation, // cpil
|
||||
stik: 'Normal', // stik
|
||||
|
|
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -12,7 +12,7 @@
|
|||
"@ffmpeg/core": "^0.11.0",
|
||||
"@ffmpeg/ffmpeg": "^0.11.0",
|
||||
"@miraclx/spotify-web-api-node": "^5.1.0",
|
||||
"@orsetto/meta-writer": "^0.1.4",
|
||||
"@orsetto/meta-writer": "^0.1.5",
|
||||
"@yujinakayama/apple-music": "^0.4.1",
|
||||
"async": "^3.2.4",
|
||||
"bluebird": "^3.7.2",
|
||||
|
@ -293,9 +293,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@orsetto/meta-writer": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@orsetto/meta-writer/-/meta-writer-0.1.4.tgz",
|
||||
"integrity": "sha512-EKF5gV7Sep9jsHlKAs9tQOwbk0zwinkrWHTirfm9k4obCvep2XRhOnGGxRb3B8urHG2zRMGdJTiC6rhEDzKoMA==",
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@orsetto/meta-writer/-/meta-writer-0.1.5.tgz",
|
||||
"integrity": "sha512-4PwEgkkLGc/U34Vblbo/Lcwh3b/EaPBF9qnsyzrEZNJRjv26yN7w9p0GURhfEucvj9uXhWrRwop7ssdkBgMXRQ==",
|
||||
"dependencies": {
|
||||
"suppress-experimental-warnings": "^1.1.17"
|
||||
},
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
"@ffmpeg/core": "^0.11.0",
|
||||
"@ffmpeg/ffmpeg": "^0.11.0",
|
||||
"@miraclx/spotify-web-api-node": "^5.1.0",
|
||||
"@orsetto/meta-writer": "^0.1.4",
|
||||
"@orsetto/meta-writer": "^0.1.5",
|
||||
"@yujinakayama/apple-music": "^0.4.1",
|
||||
"async": "^3.2.4",
|
||||
"bluebird": "^3.7.2",
|
||||
|
|
Loading…
Reference in a new issue