From 407c27ed863a243dc3ba4b57130c9d49c1a00752 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 24 Nov 2024 14:55:46 +0600 Subject: [PATCH] api/utils: rename metadata converter function --- api/src/misc/utils.js | 2 +- api/src/stream/types.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/misc/utils.js b/api/src/misc/utils.js index 85d250ca..cf4fefe6 100644 --- a/api/src/misc/utils.js +++ b/api/src/misc/utils.js @@ -1,6 +1,6 @@ const forbiddenCharsString = ['}', '{', '%', '>', '<', '^', ';', ':', '`', '$', '"', "@", '=', '?', '|', '*']; -export function metadataManager(obj) { +export function convertMetadataToFFmpeg(obj) { const keys = Object.keys(obj); const tags = [ "album", diff --git a/api/src/stream/types.js b/api/src/stream/types.js index 6fbe314e..d1e56bf2 100644 --- a/api/src/stream/types.js +++ b/api/src/stream/types.js @@ -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');