api/utils: rename metadata converter function

This commit is contained in:
wukko 2024-11-24 14:55:46 +06:00
parent 6a430545d2
commit 407c27ed86
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
const forbiddenCharsString = ['}', '{', '%', '>', '<', '^', ';', ':', '`', '$', '"', "@", '=', '?', '|', '*'];
export function metadataManager(obj) {
export function convertMetadataToFFmpeg(obj) {
const keys = Object.keys(obj);
const tags = [
"album",

View file

@ -4,8 +4,8 @@ import { spawn } from "child_process";
import { create as contentDisposition } from "content-disposition-header";
import { env } from "../config.js";
import { metadataManager } from "../misc/utils.js";
import { destroyInternalStream } from "./manage.js";
import { convertMetadataToFFmpeg } from "../misc/utils.js";
import { hlsExceptions } from "../processing/service-config.js";
import { getHeaders, closeRequest, closeResponse, pipe } from "./shared.js";
@ -110,7 +110,7 @@ const merge = (streamInfo, res) => {
}
if (streamInfo.metadata) {
args = args.concat(metadataManager(streamInfo.metadata))
args = args.concat(convertMetadataToFFmpeg(streamInfo.metadata))
}
args.push('-f', format, 'pipe:3');
@ -242,7 +242,7 @@ const convertAudio = (streamInfo, res) => {
}
if (streamInfo.metadata) {
args = args.concat(metadataManager(streamInfo.metadata))
args = args.concat(convertMetadataToFFmpeg(streamInfo.metadata))
}
args.push('-f', streamInfo.audioFormat === "m4a" ? "ipod" : streamInfo.audioFormat, 'pipe:3');