From 2e77adfa52a239bbcca9722d1ea6479829670d3b Mon Sep 17 00:00:00 2001 From: zS1L3NT Windows Date: Sat, 29 Jul 2023 20:15:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove=20playlist=20video=20coun?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/references/interfaces/PlaylistFull.md | 2 -- src/parsers/PlaylistParser.ts | 10 ---------- src/schemas.ts | 1 - 3 files changed, 13 deletions(-) diff --git a/docs/references/interfaces/PlaylistFull.md b/docs/references/interfaces/PlaylistFull.md index a358850..891170f 100644 --- a/docs/references/interfaces/PlaylistFull.md +++ b/docs/references/interfaces/PlaylistFull.md @@ -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[] } ``` diff --git a/src/parsers/PlaylistParser.ts b/src/parsers/PlaylistParser.ts index 0ce2355..6908f21 100644 --- a/src/parsers/PlaylistParser.ts +++ b/src/parsers/PlaylistParser.ts @@ -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 diff --git a/src/schemas.ts b/src/schemas.ts index 24c9522..d0f1b7e 100644 --- a/src/schemas.ts +++ b/src/schemas.ts @@ -119,7 +119,6 @@ export const PlaylistFull = z.object({ playlistId: z.string(), name: z.string(), artist: ArtistBasic, - videoCount: z.number(), thumbnails: z.array(ThumbnailFull) })