#1621
|
|||
|
|||
![]()
'Download stopped' trigger can be used, but with additional check. LIke check if the link and its packge is also finished. But since the archive extraction will run post download, it is not suitable in your case.
You can use 'package finished' tirgger, for packages which do not contain archves and 'archive extraction finished' trigger, for packages whic contain arcihves. It may not necessary to create any text file for 'package finised' since it is triggered only, unless of course you add new links to it or reset the existing ones. Archive extractiion is also triggered only once, unless you extract it manually again. I guess that would be unlikely since the files would have been moved to a different location on the previous trigger, and the link in JD will not ablle to extract it, since the new file path is not associated with links in the link list. Can use bash script, but also might be possible to use eventscripter methods to move them. Let me know how you wish to proceed. |
#1622
|
|||
|
|||
![]()
Hi Mgpai,
thanks for your reply! If it is possible the evensripter-solution would be great. Greetings Default63 |
#1623
|
|||
|
|||
![]()
Should be possible. Find me in JD Chat.
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1624
|
|||
|
|||
![]()
Hello, would it be easy for someone to provide me a call for a Resume script. Thats all. Just every 10 min or so to call to Resume downloads. I download alot from my media server that for some reason just stops my downloads randomly. I dont have to do anything but press resume ( or Start Downloads button ) and it continues where it left off.
Thanks for any help. |
#1625
|
|||
|
|||
![]()
It would be better to fix the underlying issue. If you provide example links and log the developers might be able to check it.
The download controller is stopped only when all attempts to start/resume pending downloads have failed. In which case, they will be skipped with a relevant message displayed in the 'status' column. Do you see any such message in that column? |
#1626
|
|||
|
|||
![]() Quote:
Ive been playing around with some scripts way back in this post that pauses and resumes a download after the speed reached a certian point. I edited it to make it 1kbps and it definatly has helped. But it still occasionaly does it, like maybe once a day which is annoying in my situation. Here is the script i use. I did not make this script i just edited the speed. Code:
if (isDownloadControllerRunning() && !isDownloadControllerStopping()) { var running = getRunningDownloadLinks(); //loop through all running Downloads for (var i = 0; i < running.length; i++) { //check if the download has been running at least 30 seconds if (running[i].getDownloadDuration() > 30000) { //check if the current speed is below 1kb/s if (running[i].getSpeed() < 1 * 1024) { //resume the download //running[i].resume(); //stop the download and resume it running[i].abort(); } } } } Last edited by dereks10; 27.12.2020 at 02:33. |
#1628
|
|||
|
|||
![]()
Very Clean. Thank you it works very well. I just lowered speed a bit on it. Exactly what i was looking for. The one i was using was hit or miss.
|
#1629
|
||||
|
||||
![]()
@dereks10
status / error messages are usually present until you restart the client. or Just not displayed maybe due to another attempt at downloading without error if you double click (this triggers the tooltip display, tool tips cant be disabled in advanced settings either) the status column (not package, only download links) you can see which download candidates used and which ones had errors. tooltips
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] Last edited by raztoki; 27.12.2020 at 10:28. |
#1630
|
|||
|
|||
![]()
The M4A to mp3 converter script keeps crashing on line 17 after a while of download. Was there a fix to it?
|
#1631
|
|||
|
|||
![]() Quote:
Quote:
|
#1632
|
|||
|
|||
![]()
When the thing crash, it came up with "SyntaxError: Unterminated Object Literal (#17)". When I reboot Jdownloader, it works again, and it's not just limited to just one file but seemingly at random, but when there is a long list of files to process. The minimum so far was 10 files. Also, I'm barely entry level in terms of programming and such, so I don't know what it means when you tell me to run that command string. I also don't know how to upgrade or replace the ffmpeg, as I googled and can't find an .exe file to do so.
Last edited by Kaelthas; 29.12.2020 at 10:52. |
#1633
|
||||
|
||||
![]()
@Kaelthas:
can you provide screenshot of the shown error? Does it happen for the same file or does the file work after restart?
__________________
JD-Dev & Server-Admin |
#1634
|
|||
|
|||
![]()
It just come up with a dialog box with that message. It's happening seemingly at random at no particular one file. The process works again after a restart and having to re-download the thing to trigger the process.
|
#1635
|
|||
|
|||
![]()
Here is the attached screenshots.
|
#1636
|
||||
|
||||
![]()
Thanks
@mgpai: could you modify the script with debug, to write out the result of ffprobe to disk so we know what it returns and finally fail?
__________________
JD-Dev & Server-Admin |
#1637
|
|||
|
|||
![]() Quote:
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. if (link.isFinished()) { var fileName = link.name.replace(/(.+)(\..+$)/, "$1"); var fileType = link.name.replace(/(.+)(\..+$)/, "$2"); var sourceFile = link.getDownloadPath(); var audioFile = /\.(aac|m4a|ogg)$/.test(sourceFile); if (audioFile) { var downloadFolder = package.getDownloadFolder(); var destFile = downloadFolder + "/" + fileName + ".mp3"; var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath"); var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe"); var json = callSync(ffprobe, "-v", "quiet", "-print_format", "json", "-show_streams", "-show_format", sourceFile); writeFile(JD_HOME + "/ffrpobe output.txt", json + "\r\n\r\n", true); // will be created in JDownloader install folder try { var data = JSON.parse(json); var streamsBitrate = data.streams[0].bit_rate ? data.streams[0].bit_rate : 0; var formatBitrate = data.format.bit_rate ? data.format.bit_rate : 0; var bitrate = Math.max(streamsBitrate, formatBitrate) / 1000; var deleteSourceFile = false; // Set this to true to delete source file after conversion. if (bitrate > 0) { callSync(ffmpeg, "-y", "-i", sourceFile, "-b:a", bitrate + "k", destFile); if (deleteSourceFile && getPath(destFile).exists()) deleteFile(sourceFile, false); } } catch (e) { alert("Could not convert " + sourceFile); } } } |
#1638
|
|||
|
|||
![]()
In your youtube download to html page script, why do you call .prop() on string literals and not jquery selectors? "YT_VARIANT".prop()
|
#1639
|
|||
|
|||
![]() Quote:
Code:
// Get link property String.prototype.prop = function() { return link.getProperty(this); }; It is not a a JQuery method. It is prototype added by me to the Javascript String object and named as such by sheer coincidence. ![]() |
#1640
|
|||
|
|||
![]()
How do I tell the Event Scripter to add/download a certain link to a different custom local filnename (instead of the original online filename)?
addLinks doesn't seem to have a "filename" or "saveAs" argument. Also the myObject coming out of myObject = callAPI("linkgrabberv2", "addLinks", {"links": myURL}); doesn't seem to have .setName() What methods and properties does it have, how do I use it? The API documentation says that it's a boolean, but I see an number called "id" inside. Maybe I should somehow use renameLink, but how do I get the linkId from myObject? If I try to use myObject or myObject.id as the linkID, I get a null pointer exception. Last edited by SMS; 08.01.2021 at 19:46. |
![]() |
Thread Tools | |
Display Modes | |
|
|