Repository navigation
Conversation
im done with the changes. do note of the following:tidal returns a creator id but it doesnt match the playlist creator's idi noticed while im doing playlist test runs, bandcamp parsing (tracks, albums, playlist, possibly artist too) are broken (im hitting the following errors)after merging this, i will work on the following:
|
| const meta = | ||
| current.author && current.artworkUrl | ||
| ? { author: '', thumbnail: '' } | ||
| : await this._fetchPlaylistMeta(playlistId) |
There was a problem hiding this comment.
can we extract the metadata from the existing browse response before fetching the playlist page? Android's browse response already includes owner text, the video count and a cover image. The handlers in common.ts currently discard those fields and return an empty pluginInfo.
Please fill those fields there and only scrape the page for anything still missing. That would avoid an extra request and another JSON parse when the original response already has everything we need.
if im not wrong, on Android you can get the owner text, video count and the playlist thumbnail (heroImage) on pageHeaderViewModel which by then, it will be inside the metadata
There was a problem hiding this comment.
this is a good question. you see i've been trying to keep the least request as possible but we are extracting data to these two, Android.ts for normal youtube links, and Web_Remix.ts for youtube music, which are very inconsistent with their jsons, so i prioritized consistency and sacrificed 1 extra request, see images below
Android.ts -> resolve() -> playlistResponseRaw returns an author and thumbnail


Web_Remix.ts -> resolve() -> resRaw returns no author, no thumbnail


There was a problem hiding this comment.
hmm, but i meant reusing android's metadata when it's available, and keep the page request as a fallback (so it will apply for web_remix / missing fields), that alone would save one request when android already provides the data we want ig.
But if maintaining the one extraction path rn is simpler now and is working just fine, we can see that android optimization later then
| current.url ?? `https://www.youtube.com/playlist?list=${playlistId}`, | ||
| artworkUrl: current.artworkUrl || meta.thumbnail, | ||
| author: current.author || meta.author, | ||
| totalTracks: current.totalTracks ?? playlist.tracks.length |
There was a problem hiding this comment.
playlist.tracks.length can be capped by maxPlaylistLength, so this can report 100 total tracks for a playlist that has 1,000. Please use the actual total from the playlist response, or leave totalTracks unset when it's unknown.
No description provided.