mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-16 16:47:31 -05:00
add podcast episode scraping to spotify
This commit is contained in:
@@ -33,9 +33,10 @@ export function parseTrack(raw: SpotifyTrack) {
|
|||||||
trackNumber: raw.trackNumber,
|
trackNumber: raw.trackNumber,
|
||||||
discNumber: raw.discNumber,
|
discNumber: raw.discNumber,
|
||||||
artists: raw.artists?.map((e) => parseArtist(e)) ?? [],
|
artists: raw.artists?.map((e) => parseArtist(e)) ?? [],
|
||||||
durationMs: raw.durationMs
|
durationMs: raw.durationMs,
|
||||||
}
|
}
|
||||||
if (raw.album) track.album = parseAlbum(raw.album)
|
if (raw.album) track.album = parseAlbum(raw.album)
|
||||||
|
//if (raw?.isrc) track.isrc = raw.isrc
|
||||||
return track
|
return track
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,9 +73,10 @@ export function parsePodcast(raw: SpotifyPodcast) {
|
|||||||
id: raw.id,
|
id: raw.id,
|
||||||
url: raw.externalUrl,
|
url: raw.externalUrl,
|
||||||
description: raw.description,
|
description: raw.description,
|
||||||
coverArtwork: parseThumbnails(raw.coverArtwork),
|
coverArtwork: parseThumbnails(raw.coverArtwork)
|
||||||
}
|
}
|
||||||
if (typeof raw.explicit == 'boolean') podcast.explicit = raw.explicit
|
if (typeof raw.explicit == 'boolean') podcast.explicit = raw.explicit
|
||||||
|
if (raw.episodes) podcast.episodes = raw.episodes.map((e) => parseEpisode(e))
|
||||||
|
|
||||||
return podcast
|
return podcast
|
||||||
}
|
}
|
||||||
@@ -81,6 +81,7 @@ export interface Podcast {
|
|||||||
explicit?: boolean
|
explicit?: boolean
|
||||||
description?: string
|
description?: string
|
||||||
coverArtwork?: CoverArtwork[]
|
coverArtwork?: CoverArtwork[]
|
||||||
|
episodes?: Episode[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SearchResults {
|
export interface SearchResults {
|
||||||
|
|||||||
Reference in New Issue
Block a user