mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-13 04:35:28 +01:00
remove unused stuff
This commit is contained in:
parent
244357820d
commit
a6134c58d2
3 changed files with 1 additions and 16 deletions
|
@ -69,7 +69,6 @@
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"streamable": {
|
"streamable": {
|
||||||
"alias": "streamable videos",
|
|
||||||
"patterns": [":id", "o/:id", "e/:id", "s/:id"],
|
"patterns": [":id", "o/:id", "e/:id", "s/:id"],
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { spawn } from "child_process";
|
||||||
import ffmpeg from "ffmpeg-static";
|
import ffmpeg from "ffmpeg-static";
|
||||||
import got from "got";
|
import got from "got";
|
||||||
import { ffmpegArgs, genericUserAgent } from "../config.js";
|
import { ffmpegArgs, genericUserAgent } from "../config.js";
|
||||||
import { getThreads, metadataManager, msToTime } from "../sub/utils.js";
|
import { getThreads, metadataManager } from "../sub/utils.js";
|
||||||
|
|
||||||
function fail(res) {
|
function fail(res) {
|
||||||
if (!res.headersSent) res.sendStatus(500);
|
if (!res.headersSent) res.sendStatus(500);
|
||||||
|
|
|
@ -49,20 +49,6 @@ export function metadataManager(obj) {
|
||||||
for (let i in keys) { if (tags.includes(keys[i])) commands.push('-metadata', `${keys[i]}=${obj[keys[i]]}`) }
|
for (let i in keys) { if (tags.includes(keys[i])) commands.push('-metadata', `${keys[i]}=${obj[keys[i]]}`) }
|
||||||
return commands;
|
return commands;
|
||||||
}
|
}
|
||||||
export function msToTime(d) {
|
|
||||||
let milliseconds = parseInt((d % 1000) / 100, 10),
|
|
||||||
seconds = parseInt((d / 1000) % 60, 10),
|
|
||||||
minutes = parseInt((d / (1000 * 60)) % 60, 10),
|
|
||||||
hours = parseInt((d / (1000 * 60 * 60)) % 24, 10),
|
|
||||||
r;
|
|
||||||
|
|
||||||
hours = (hours < 10) ? `0${hours}` : hours;
|
|
||||||
minutes = (minutes < 10) ? `0${minutes}` : minutes;
|
|
||||||
seconds = (seconds < 10) ? `0${seconds}` : seconds;
|
|
||||||
r = `${hours}:${minutes}:${seconds}`;
|
|
||||||
if (milliseconds) r += `.${milliseconds}`;
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
export function cleanURL(url, host) {
|
export function cleanURL(url, host) {
|
||||||
switch(host) {
|
switch(host) {
|
||||||
case "vk":
|
case "vk":
|
||||||
|
|
Loading…
Reference in a new issue