Skip to content

Commit

Permalink
chore: fix some inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Mar 29, 2023
1 parent 470d8d9 commit be71d7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/parser/youtube/Library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class Library extends Feed<IBrowseResponse> {
if (!this.page.contents_memo)
throw new InnertubeError('Page contents not found');

const stats = this.page.contents_memo.getType(ProfileColumnStats)?.[0];
const user_info = this.page.contents_memo.getType(ProfileColumnUserInfo)?.[0];
const stats = this.page.contents_memo.getType(ProfileColumnStats).first();
const user_info = this.page.contents_memo.getType(ProfileColumnUserInfo).first();

this.profile = { stats, user_info };

Expand Down
2 changes: 1 addition & 1 deletion src/parser/youtube/TimeWatched.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TimeWatched {
contents?: ObservedArray<ItemSection>;

constructor(response: ApiResponse) {
this.#page = Parser.parseResponse(response.data);
this.#page = Parser.parseResponse<IBrowseResponse>(response.data);

if (!this.#page.contents)
throw new InnertubeError('Page contents not found');
Expand Down

0 comments on commit be71d7c

Please sign in to comment.