Some checks failed
release / build-release (push) Has been cancelled
- IChannel: creators -> sub-channels -> video posts (public listing API, search mapped) - IRequiresMediaInfoCallback -> signed proxy URLs; stream controller rewrites HLS so the AES-128 key is fetched server-side with the session cookie, segments stay on the CDN - delivery/info cached per token lifetime and throttled (~2/min) - config page: paste sails.sid + validate, extra creators, quality, search test - scripts/package.sh -> plugin folder + zip + md5 + manifest.json; Gitea release workflow - research docs, HAR analysis (HAR itself gitignored), install-pi5.sh Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
31 lines
931 B
TypeScript
31 lines
931 B
TypeScript
import prompts from "prompts";
|
|
import { type Channels } from "../types";
|
|
|
|
/**
|
|
* Prompts user to set videos to search through for downloads.
|
|
* @param {number} initial Default value
|
|
* @returns {Promise<number>} Videos to search through.
|
|
*/
|
|
export const videosToSearch = async (initial: number): Promise<number> =>
|
|
(
|
|
await prompts({
|
|
type: "number",
|
|
name: "videosToSearch",
|
|
message: "How many videos back from the latest do you want to search through for ones to download?",
|
|
initial,
|
|
min: 0,
|
|
})
|
|
).videosToSearch || initial;
|
|
|
|
export const channels = async (initial: Channels): Promise<string[]> => {
|
|
return (
|
|
await prompts({
|
|
type: "multiselect",
|
|
name: "downloadChannels",
|
|
message: "Enable/Disable channels:",
|
|
choices: initial.map((initial) => ({ title: initial.title, value: initial.title, selected: !initial.skip })),
|
|
hint: "- Space to select. Return to submit",
|
|
})
|
|
).downloadChannels;
|
|
};
|