mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-20 02:27:27 -05:00
oops all bug fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lucida",
|
"name": "lucida",
|
||||||
"version": "1.2.3",
|
"version": "1.2.4",
|
||||||
"description": "A modular downloader tool",
|
"description": "A modular downloader tool",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -232,7 +232,8 @@ async function fetchKey(response: string) {
|
|||||||
if (typeof streamKey == 'string') continue
|
if (typeof streamKey == 'string') continue
|
||||||
|
|
||||||
const key = keys[i].split(`"`)[0]
|
const key = keys[i].split(`"`)[0]
|
||||||
const keyregex = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$/
|
const keyregex =
|
||||||
|
/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/
|
||||||
if (!keyregex.test(key)) continue
|
if (!keyregex.test(key)) continue
|
||||||
|
|
||||||
const script = await (await fetch(key)).text()
|
const script = await (await fetch(key)).text()
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export async function parseAlbum(raw: RawAlbum): Promise<Album> {
|
|||||||
releaseDate: new Date(raw.release_date),
|
releaseDate: new Date(raw.release_date),
|
||||||
artists: [parseArtist(raw.user)]
|
artists: [parseArtist(raw.user)]
|
||||||
}
|
}
|
||||||
if (raw.tracks?.[0]?.artwork_url) {
|
if (raw.tracks?.[0]?.artwork_url != undefined) {
|
||||||
album.coverArtwork = [
|
album.coverArtwork = [
|
||||||
await parseCoverArtwork(raw.tracks[0].artwork_url.replace('-large', '-original'))
|
await parseCoverArtwork(raw.tracks[0].artwork_url.replace('-large', '-original'))
|
||||||
]
|
]
|
||||||
@@ -94,8 +94,8 @@ export async function parseTrack(raw: RawTrack): Promise<Track> {
|
|||||||
durationMs: raw.media?.transcodings?.[0]?.duration
|
durationMs: raw.media?.transcodings?.[0]?.duration
|
||||||
}
|
}
|
||||||
|
|
||||||
if (raw.artwork_url) {
|
if (raw?.artwork_url != undefined) {
|
||||||
track.coverArtwork = [await parseCoverArtwork(raw.artwork_url?.replace('-large', '-original'))]
|
track.coverArtwork = [await parseCoverArtwork(raw?.artwork_url?.replace('-large', '-original'))]
|
||||||
}
|
}
|
||||||
|
|
||||||
return track
|
return track
|
||||||
|
|||||||
Reference in New Issue
Block a user