chore: update public repo

This commit is contained in:
desu-bot 2025-10-25 04:16:32 +00:00
parent 261c7eefa0
commit 171ba5de7a
No known key found for this signature in database
3 changed files with 520 additions and 3 deletions

View file

@ -43,13 +43,19 @@ export async function runMetaflac(options: {
| 'TRACKNUMBER'
| 'COMMENT'
| 'PRODUCER'
| 'LYRICIST'
| 'PERFORMER'
| 'COPYRIGHT'
| 'ISRC'
| 'LYRICS'
| 'MAIN_ARTIST',
| 'MAIN_ARTIST'
| 'REPLAYGAIN_ALBUM_GAIN'
| 'REPLAYGAIN_TRACK_GAIN'
| 'REPLAYGAIN_ALBUM_PEAK'
| 'REPLAYGAIN_TRACK_PEAK'
| 'BPM',
string | number | string[] | null
>
>
>>
coverPath?: string
}) {
const params: string[] = [
@ -100,3 +106,16 @@ export async function pipeIntoProc(proc: ProcessPromise, stream: ReadableStream)
pipe.on('finish', resolve)
})
}
export async function writeIntoProc(proc: ProcessPromise, data: Uint8Array) {
return new Promise<void>((resolve, reject) => {
proc.stdin.write(data, (err) => {
if (err) {
reject(err)
} else {
proc.stdin.end()
resolve()
}
})
})
}