Skip to content

Commit

Permalink
get_user -> get_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Jul 14, 2023
1 parent b55c3c9 commit 568b35e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mixins/browsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export interface UserPage extends UserContents {
} | null;
}

export async function get_user(
export async function get_channel(
channelId: string,
options: AbortOptions = {},
): Promise<UserPage> {
Expand Down Expand Up @@ -503,6 +503,11 @@ export async function get_user(
return user;
}

/**
* @deprecated Use `get_channel` instead.
*/
export const get_user = get_channel;

export async function get_user_playlists(
channelId: string,
params: string,
Expand Down
1 change: 1 addition & 0 deletions nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const NAVIGATION_BROWSE_ID = `${NAVIGATION_BROWSE}.browseId`;
export const NAVIGATION_PARAMS = `${NAVIGATION_BROWSE}.params`;
export const PAGE_TYPE =
"browseEndpointContextSupportedConfigs.browseEndpointContextMusicConfig.pageType";
export const NAVIGATION_PAGE_TYPE = `${NAVIGATION_BROWSE}.${PAGE_TYPE}`;
export const NAVIGATION_VIDEO_ID = "navigationEndpoint.watchEndpoint.videoId";
export const NAVIGATION_PLAYLIST_ID =
"navigationEndpoint.watchEndpoint.playlistId";
Expand Down
2 changes: 1 addition & 1 deletion parsers/browsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ export function parse_video(result: any): ParsedVideo {
artists: parse_song_artists_runs(runs.slice(0, artists_len)),
playlistId: jo(result, NAVIGATION_PLAYLIST_ID),
thumbnails: j(result, THUMBNAIL_RENDERER),
views: runs[runs.length - 1].text.split(" ")[0],
views: runs[runs.length - 1].text,
};
}

Expand Down

0 comments on commit 568b35e

Please sign in to comment.