's'
This commit is contained in:
@@ -116,6 +116,18 @@ export function parseYoutubeIniFields(content: string): YoutubeIniFields {
|
||||
return { key, rtmps, bitrate, fastAudio };
|
||||
}
|
||||
|
||||
/** 与 web.py `managed_url_config_relpath` 一致(app-config 相对路径) */
|
||||
export function managedUrlConfigRelPathForPm2(pm2: string): string {
|
||||
if (!pm2.includes("__")) return "URL_config.ini";
|
||||
return `URL_config.${pm2.replace(/[^a-zA-Z0-9_.-]/g, "_")}.ini`;
|
||||
}
|
||||
|
||||
/** 与 web.py `managed_youtube_ini_relpath` 一致 */
|
||||
export function managedYoutubeIniRelPathForPm2(pm2: string): string {
|
||||
if (!pm2.includes("__")) return "youtube.ini";
|
||||
return `youtube.${pm2.replace(/[^a-zA-Z0-9_.-]/g, "_")}.ini`;
|
||||
}
|
||||
|
||||
export function buildYoutubeIniFromFields(f: YoutubeIniFields): string {
|
||||
const bitrateLine = f.bitrate.trim()
|
||||
? `bitrate = ${f.bitrate.trim()}`
|
||||
|
||||
Reference in New Issue
Block a user