🔥 remove playlist video count
This commit is contained in:
parent
27df842c98
commit
2e77adfa52
|
|
@ -8,7 +8,6 @@
|
|||
| playlistId | `string` | Playlist ID |
|
||||
| name | `string` | Name |
|
||||
| artist | [ArtistBasic](#ArtistBasic) | Creator of the Playlist |
|
||||
| videoCount | `number` | Number of videos in the Playlist |
|
||||
| thumbnails | [ThumbnailFull](#ThumbnailFull)`[]` | Thumbnails |
|
||||
|
||||
## TypeScript Source Code
|
||||
|
|
@ -19,7 +18,6 @@ interface PlaylistFull {
|
|||
playlistId: string
|
||||
name: string
|
||||
artist: ArtistBasic
|
||||
videoCount: number
|
||||
thumbnails: ThumbnailFull[]
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -14,11 +14,6 @@ export default class PlaylistParser {
|
|||
artistId: traverseString(data, "header", "subtitle", "browseId")(),
|
||||
name: traverseString(data, "header", "subtitle", "text")(2)
|
||||
},
|
||||
videoCount: +traverseList(data, "header", "secondSubtitle", "text")
|
||||
.at(0)
|
||||
.split(" ")
|
||||
.at(0)
|
||||
.replaceAll(",", ""),
|
||||
thumbnails: traverseList(data, "header", "thumbnails")
|
||||
},
|
||||
PlaylistFull
|
||||
|
|
@ -38,11 +33,6 @@ export default class PlaylistParser {
|
|||
artistId,
|
||||
name: traverseString(flexColumns[1], "runs", "text")(-2)
|
||||
},
|
||||
videoCount: +traverseList(flexColumns[1], "runs", "text")
|
||||
.at(-1)
|
||||
.split(" ")
|
||||
.at(0)
|
||||
.replaceAll(",", ""),
|
||||
thumbnails: traverseList(item, "thumbnails")
|
||||
},
|
||||
PlaylistFull
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ export const PlaylistFull = z.object({
|
|||
playlistId: z.string(),
|
||||
name: z.string(),
|
||||
artist: ArtistBasic,
|
||||
videoCount: z.number(),
|
||||
thumbnails: z.array(ThumbnailFull)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue