mirror of
https://git.stupid.fish/teidesu/scripts.git
synced 2025-11-27 16:31:25 +11:00
chore: update public repo
This commit is contained in:
parent
261c7eefa0
commit
171ba5de7a
3 changed files with 520 additions and 3 deletions
|
|
@ -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()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue