mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-28 02:26:10 +00:00
api/youtube: fix variable shadowing
oops
This commit is contained in:
parent
c6be689453
commit
4d634603e2
|
@ -68,7 +68,7 @@ const cloneInnertube = async (customFetch) => {
|
||||||
const shouldRefreshPlayer = lastRefreshedAt + PLAYER_REFRESH_PERIOD < new Date();
|
const shouldRefreshPlayer = lastRefreshedAt + PLAYER_REFRESH_PERIOD < new Date();
|
||||||
|
|
||||||
const rawCookie = getCookie('youtube');
|
const rawCookie = getCookie('youtube');
|
||||||
const cookieValues = rawCookie?.values();
|
const rawCookieValues = rawCookie?.values();
|
||||||
const cookie = rawCookie?.toString();
|
const cookie = rawCookie?.toString();
|
||||||
|
|
||||||
if (!innertube || shouldRefreshPlayer) {
|
if (!innertube || shouldRefreshPlayer) {
|
||||||
|
@ -76,8 +76,8 @@ const cloneInnertube = async (customFetch) => {
|
||||||
fetch: customFetch,
|
fetch: customFetch,
|
||||||
retrieve_player: !!cookie,
|
retrieve_player: !!cookie,
|
||||||
cookie,
|
cookie,
|
||||||
po_token: cookieValues?.po_token,
|
po_token: rawCookieValues?.po_token,
|
||||||
visitor_data: cookieValues?.visitor_data,
|
visitor_data: rawCookieValues?.visitor_data,
|
||||||
});
|
});
|
||||||
lastRefreshedAt = +new Date();
|
lastRefreshedAt = +new Date();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue