chore: fix some inconsistencies

This commit is contained in:
LuanRT
2023-03-28 21:22:12 -03:00
parent 470d8d9406
commit be71d7c937
2 changed files with 3 additions and 3 deletions

View File

@@ -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 };

View File

@@ -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');