#1
|
|||
|
|||
![]()
Hi and Merry Christmas to all celebrating
Firstly thank you for wonderful Even Scripter, I started playing around, and tried using convert to mp3 script which works. Was just thinking of adding an "Are you sure" box before converting to mp3 file as below: Code:
// Convert aac/m4a/ogg files to mp3. // Trigger required: "A Download Stopped". // Requires ffmpeg/ffprobe. Uses JD ffmpeg/ffprobe settings if available. // Overwrites destination file (mp3) if it already exists. disablePermissionChecks(); //confirm("Pree OK to convert AAC to MP3, Cancel to ignore"); if (window.confirm("Convert to Mp3?")) { if (link.finished) { var input = link.downloadPath; var output = input.replace(/(aac)$/, "mp3"); if (input != output) { try { var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath"); var bitrate = callSync(ffmpeg, "-i", input).match(/bitrate: (\d+) kb/)[1]; callAsync(function(error) { !error && getPath(input).delete(); }, ffmpeg, "-y", "-i", input, "-b:a", bitrate + "k", output); } catch (e) {}; } } } Details tell me: Code:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: ReferenceError: "window" is not defined. Please can you advise? Thanks. Last edited by FWD079; 25.12.2024 at 17:23. |
Thread Tools | |
Display Modes | |
|
|