diff --git a/deno/package.json b/deno/package.json index 1f7a0707..eba1fc69 100644 --- a/deno/package.json +++ b/deno/package.json @@ -1,6 +1,6 @@ { "name": "youtubei.js", - "version": "5.0.1", + "version": "5.0.2", "description": "A wrapper around YouTube's private API. Supports YouTube, YouTube Music, YouTube Kids and YouTube Studio (WIP).", "type": "module", "types": "./dist/src/platform/lib.d.ts", diff --git a/deno/src/parser/youtube/VideoInfo.ts b/deno/src/parser/youtube/VideoInfo.ts index fd8b5a43..dca96477 100644 --- a/deno/src/parser/youtube/VideoInfo.ts +++ b/deno/src/parser/youtube/VideoInfo.ts @@ -83,7 +83,8 @@ class VideoInfo extends MediaInfo { is_family_safe: info.microformat?.is_family_safe, category: info.microformat?.is(PlayerMicroformat) ? info.microformat?.category : null, has_ypc_metadata: info.microformat?.is(PlayerMicroformat) ? info.microformat?.has_ypc_metadata : null, - start_timestamp: info.microformat?.is(PlayerMicroformat) ? info.microformat.start_timestamp : null + start_timestamp: info.microformat?.is(PlayerMicroformat) ? info.microformat.start_timestamp : null, + view_count: info.microformat?.is(PlayerMicroformat) && isNaN(info.video_details?.view_count as number) ? info.microformat.view_count : info.video_details?.view_count }, like_count: undefined as number | undefined, is_liked: undefined as boolean | undefined,