Skip to content

[Feature Request] Make it easier to package with Nix #298

@ChocolateLoverRaj

Description

@ChocolateLoverRaj

This is already packaged in nixpkgs. But there are some things that would make maintaining the Nix package for this easier:

  • Way of disabling updating through app without modifying the source code
  • Way of disabling downloading ytdlp without modifying the source code
  • Have a consistent way of getting ffmpeg location. Currently in
    let ffmpeg = "";
    if (os.platform() === "win32") {
    ffmpeg = `"${__dirname}\\..\\ffmpeg.exe"`;
    } else if (os.platform() === "freebsd") {
    try {
    ffmpeg = cp.execSync("which ffmpeg").toString("utf8").split("\n")[0].trim();
    } catch (error) {
    console.log(error)
    showPopup("No ffmpeg found in PATH.");
    }
    }
    else {
    ffmpeg = `"${__dirname}/../ffmpeg"`;
    }
    it only checks the path on freebsd, and in
    if (!fs.existsSync(ffmpegPath)) {
    try {
    if (os.platform() === "win32") {
    ffmpeg = execSync("where ffmpeg.exe", {encoding: "utf8"});
    console.log({ffmpeg})
    ffmpeg = `"${ffmpeg.trimEnd()}"`;
    } else {
    ffmpeg = execSync("which ffmpeg", {encoding: "utf8"});
    ffmpeg = `"${ffmpeg.trimEnd()}"`;
    }
    } catch (error) {
    ffmpeg = `""`
    console.log(error);
    }
    }
    console.log("ffmpeg:", ffmpeg);
    there seems to be duplicate code that behaves differently.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions