got rid of dash in file names

This commit is contained in:
wukko 2022-07-17 17:21:51 +06:00
parent 67223b3acd
commit 299fe6336b
16 changed files with 17 additions and 20 deletions

View file

@ -5,13 +5,13 @@ import cors from "cors";
import * as fs from "fs";
import rateLimit from "express-rate-limit";
import { shortCommit } from "./modules/sub/current-commit.js";
import { shortCommit } from "./modules/sub/currentCommit.js";
import { appName, genericUserAgent, version, internetExplorerRedirect } from "./modules/config.js";
import { getJSON } from "./modules/api.js";
import renderPage from "./modules/page-renderer.js";
import { apiJSON } from "./modules/sub/api-helper.js";
import renderPage from "./modules/pageRender.js";
import { apiJSON } from "./modules/sub/utils.js";
import loc from "./modules/sub/i18n.js";
import { Bright, Cyan } from "./modules/sub/console-text.js";
import { Bright, Cyan } from "./modules/sub/consoleText.js";
import stream from "./modules/stream/stream.js";
const commitHash = shortCommit();

View file

@ -2,7 +2,7 @@ import UrlPattern from "url-pattern";
import { services as patterns } from "./config.js";
import { cleanURL, apiJSON } from "./sub/api-helper.js";
import { cleanURL, apiJSON } from "./sub/utils.js";
import { errorUnsupported } from "./sub/errors.js";
import loc from "./sub/i18n.js";
import match from "./match.js";

View file

@ -1,4 +1,4 @@
import loadJson from "./sub/load-json.js";
import loadJson from "./sub/loadJSON.js";
const config = loadJson("./src/config.json");
export const

View file

@ -1,4 +1,4 @@
import { apiJSON } from "./sub/api-helper.js";
import { apiJSON } from "./sub/utils.js";
import { errorUnsupported, genericError } from "./sub/errors.js";
import bilibili from "./services/bilibili.js";

View file

@ -1,5 +1,5 @@
import { services, appName, authorInfo, version, quality, repo, donations } from "./config.js";
import { getCommitInfo } from "./sub/current-commit.js";
import { getCommitInfo } from "./sub/currentCommit.js";
import loc from "./sub/i18n.js";
let s = services

View file

@ -2,7 +2,7 @@ import got from "got";
import { xml2json } from "xml-js";
import loc from "../sub/i18n.js";
import { genericUserAgent, maxVideoDuration, services } from "../config.js";
import selectQuality from "../stream/select-quality.js";
import selectQuality from "../stream/selectQuality.js";
export default async function(obj) {
try {

View file

@ -1,7 +1,7 @@
import ytdl from "ytdl-core";
import loc from "../sub/i18n.js";
import { maxVideoDuration, quality as mq } from "../config.js";
import selectQuality from "../stream/select-quality.js";
import selectQuality from "../stream/selectQuality.js";
export default async function (obj) {
try {

View file

@ -1,7 +1,7 @@
import { randomBytes } from "crypto";
import { existsSync, unlinkSync, appendFileSync } from "fs";
import { createInterface } from "readline";
import { Cyan, Bright, Green } from "./sub/console-text.js";
import { Cyan, Bright, Green } from "./sub/consoleText.js";
import { execSync } from "child_process";
let envPath = './.env';

View file

@ -1,4 +1,4 @@
import { apiJSON } from "../sub/api-helper.js";
import { apiJSON } from "../sub/utils.js";
import { verifyStream } from "./manage.js";
import { streamAudioOnly, streamDefault, streamLiveRender } from "./types.js";

View file

@ -2,7 +2,7 @@ import { spawn } from "child_process";
import ffmpeg from "ffmpeg-static";
import got from "got";
import { ffmpegArgs, genericUserAgent } from "../config.js";
import { msToTime } from "../sub/api-helper.js";
import { msToTime } from "../sub/utils.js";
import { internalError } from "../sub/errors.js";
import loc from "../sub/i18n.js";

View file

@ -1,17 +1,13 @@
import { supportedLanguages, appName, repo } from "../config.js";
import loadJson from "./load-json.js";
import loadJson from "./loadJSON.js";
export default function(lang, cat, string, replacement) {
if (!supportedLanguages.includes(lang)) {
lang = 'en'
}
try {
if (!supportedLanguages.includes(lang)) lang = 'en';
let str = loadJson(`./src/i18n/${lang}/${cat}.json`);
if (str && str[string]) {
let s = str[string].replace(/\n/g, '<br/>').replace(/{appName}/g, appName).replace(/{repo}/g, repo)
if (replacement) {
s = s.replace(/{s}/g, replacement)
}
if (replacement) s = s.replace(/{s}/g, replacement);
return s + ' '
} else {
return string

View file

@ -1,4 +1,5 @@
import { createStream } from "../stream/manage.js";
import { execSync } from "child_process";
export function apiJSON(type, obj) {
try {