mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
fix: typed networkManager.fetch
This commit is contained in:
@ -19,8 +19,14 @@ export const getMusicQueueRenderer = async (
|
||||
const store = queue?.queue.store.store;
|
||||
if (!store) return null;
|
||||
|
||||
return (await app.networkManager.fetch('/music/get_queue', {
|
||||
return await app.networkManager.fetch<
|
||||
QueueRendererResponse,
|
||||
{
|
||||
queueContextParams: string;
|
||||
videoIds: string[];
|
||||
}
|
||||
>('/music/get_queue', {
|
||||
queueContextParams: store.getState().queue.queueContextParams,
|
||||
videoIds,
|
||||
})) as QueueRendererResponse | null;
|
||||
});
|
||||
};
|
||||
|
||||
@ -111,9 +111,14 @@ export class YTMusic implements LyricProvider {
|
||||
|
||||
if (!app) return null;
|
||||
|
||||
return app.networkManager.fetch('/next?prettyPrint=false', {
|
||||
return app.networkManager.fetch<
|
||||
NextData,
|
||||
{
|
||||
videoId: string;
|
||||
}
|
||||
>('/next?prettyPrint=false', {
|
||||
videoId,
|
||||
}) as Promise<NextData>;
|
||||
});
|
||||
}
|
||||
|
||||
private fetchBrowse(browseId: string) {
|
||||
|
||||
Reference in New Issue
Block a user