mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-27 20:11:15 +02:00
feat: custom signature in every file download, as a comment
This commit is contained in:
@@ -4,6 +4,7 @@ const getUserBrowser = require("./getBrowser.helpers.js");
|
|||||||
const { ffmpegPath, denoPath} = require("./path.helpers.js");
|
const { ffmpegPath, denoPath} = require("./path.helpers.js");
|
||||||
const { configFeatures } = require("../../config.js");
|
const { configFeatures } = require("../../config.js");
|
||||||
const { logger } = require("../logger.js");
|
const { logger } = require("../logger.js");
|
||||||
|
const config = require("../../config")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates whether the provided codec is supported by the application.
|
* Validates whether the provided codec is supported by the application.
|
||||||
@@ -130,6 +131,14 @@ function buildYtDlpArgs({url, audioOnly, quality, outputFolder, isPlaylist}) {
|
|||||||
outputTemplate = "%(playlist_index)02d - %(title)s.%(ext)s";
|
outputTemplate = "%(playlist_index)02d - %(title)s.%(ext)s";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add a custom signature in each file downloaded with the app. It's a small things but i found it cool :)
|
||||||
|
if (configFeatures.addMetadata) {
|
||||||
|
args.push(
|
||||||
|
"--postprocessor-args",
|
||||||
|
`ffmpeg:-metadata comment="Downloaded with Freedom Loader v${config.version}"`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
args.push("-o", path.join(outputFolder, outputTemplate));
|
args.push("-o", path.join(outputFolder, outputTemplate));
|
||||||
args.push(url);
|
args.push(url);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user