···11import { PollingOptions } from "../common.js";
22import { CommonSourceConfig, CommonSourceData, CommonSourceOptions } from "./index.js";
33-import { Innertube } from 'youtubei.js';
4355-//type InnertubeOptions = Omit<Parameters<typeof Innertube.create>[0], 'cookie' | 'cache' | 'fetch'>;
44+export interface InnertubeOptions {
55+ /**
66+ * Proof of Origin token
77+ *
88+ * May be required if YTM starts returning 403
99+ *
1010+ * @see https://github.com/yt-dlp/yt-dlp/wiki/Extractors#po-token-guide
1111+ */
1212+ po_token?: string
1313+1414+ /**
1515+ * Visitor ID value found in VISITOR_INFO1_LIVE or visitorData cookie
1616+ *
1717+ * May be required if YTM starts returning 403
1818+ *
1919+ * @see https://github.com/yt-dlp/yt-dlp/wiki/Extractors#po-token-guide
2020+ */
2121+ visitor_data?: string
2222+2323+ /**
2424+ * If account login results in being able to choose multiple account, use a zero-based index to choose which one to monitor
2525+ *
2626+ * @examples [0,1]
2727+ */
2828+ account_index?: number
2929+3030+ location?: string
3131+ lang?: string
3232+ generate_session_locally?: boolean
3333+ device_category?: string
3434+ client_type?: string
3535+ timezone?: string
3636+}
637738export interface YTMusicData extends CommonSourceData, PollingOptions {
88- /**
3939+ /**
940 * The cookie retrieved from the Request Headers of music.youtube.com after logging in.
1041 *
1142 * See https://ytmusicapi.readthedocs.io/en/stable/setup/browser.html#copy-authentication-headers for how to retrieve this value.
···1445 * */
1546 cookie?: string
16474848+ /**
4949+ * Google Cloud Console project OAuth Client ID
5050+ *
5151+ * Generated from a custom OAuth Client, see docs
5252+ */
1753 clientId?: string
18545555+ /**
5656+ * Google Cloud Console project OAuth Client Secret
5757+ *
5858+ * Generated from a custom OAuth Client, see docs
5959+ */
1960 clientSecret?: string
20616262+ /**
6363+ * Google Cloud Console project OAuth Client Authorized redirect URI
6464+ *
6565+ * Generated from a custom OAuth Client, see docs. multi-scrobbler will generate a default based on BASE_URL.
6666+ * Only specify this if the default does not work for you.
6767+ */
2168 redirectUri?: string
6969+7070+ /**
7171+ * Additional options for authorization and tailoring YTM client
7272+ */
7373+ innertubeOptions?: InnertubeOptions
2274}
2323-//export type YTMusicData = YTMusicDataCommon & InnertubeOptions;
24752576export interface YTMusicSourceConfig extends CommonSourceConfig {
2677 data?: YTMusicData