mirror of
https://git.stupid.fish/teidesu/scripts.git
synced 2026-01-12 23:21:08 +11:00
chore: update public repo
This commit is contained in:
parent
ef375d1188
commit
46cf487f04
5 changed files with 229 additions and 26 deletions
|
|
@ -9,8 +9,7 @@ import { ffetch as ffetchBase } from '../../utils/fetch.ts'
|
|||
import { sanitizeFilename } from '../../utils/fs.ts'
|
||||
import { pipeIntoProc, runMetaflac, writeIntoProc } from '../../utils/media-metadata.ts'
|
||||
import { getEnv } from '../../utils/misc.ts'
|
||||
import { concatMpdSegments, parseSimpleMpd } from '../../utils/mpd.ts'
|
||||
import { createLibcurlFetch } from '../../utils/temkakit/libcurl.ts'
|
||||
import { concatSegments, parseSimpleMpd } from '../../utils/mp4-streaming.ts'
|
||||
|
||||
const oauthResponse = await ffetchBase('https://auth.tidal.com/v1/oauth2/token', {
|
||||
form: {
|
||||
|
|
@ -192,8 +191,8 @@ async function downloadTrack(options: {
|
|||
]
|
||||
|
||||
const proc = $`ffmpeg ${params}`
|
||||
await pipeIntoProc(proc, concatMpdSegments({
|
||||
mpd: parseSimpleMpd(utf8.decoder.decode(manifest)),
|
||||
await pipeIntoProc(proc, concatSegments({
|
||||
segments: parseSimpleMpd(utf8.decoder.decode(manifest)).segments,
|
||||
fetch: async url => new Uint8Array(await ffetch(url).arrayBuffer()),
|
||||
}))
|
||||
await proc
|
||||
|
|
@ -408,7 +407,7 @@ if ((m = url.match(/\/track\/(\d+)/))) {
|
|||
|
||||
await rm(tmpAlbumCoverPath)
|
||||
} else if ((m = url.match(/\/album\/(\d+)/))) {
|
||||
await downloadAlbum(m[1])
|
||||
await downloadAlbum(Number(m[1]))
|
||||
} else if ((m = url.match(/\/artist\/(\d+)/))) {
|
||||
const withAppearsOn = (await question('include appears on albums? (y/N) > ')).toLowerCase() === 'y'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue