api/create-filename: build & sanitize filenames in one place

This commit is contained in:
wukko
2024-11-24 18:12:21 +06:00
parent 407c27ed86
commit 6770738116
9 changed files with 25 additions and 34 deletions

View File

@@ -1,7 +1,5 @@
import HLS from "hls-parser";
import { env } from "../../config.js";
import { cleanString, merge } from '../../misc/utils.js';
const resolutionMatch = {
"3840": 2160,
@@ -152,8 +150,8 @@ export default async function(obj) {
}
const fileMetadata = {
title: cleanString(info.name),
artist: cleanString(info.user.name),
title: info.name,
artist: info.user.name,
};
return merge(