#1401
|
|||
|
|||
Make the infobar appear only when a download is running
I've positioned the panel in the bottom right corner, but it's still taking a valuable space. I want to write a script that makes it appear when a download starts, and another script that makes it disappear when all downloads stop--all this with the help of the Event Scripter of course. Easy if you are a Java programmer, not so much if you were me.
I've actually checked the forum and found this script: https://board.jdownloader.org/showpo...39&postcount=8 but it doesn't exactly suit my needs. Anyone that can provide me with these two scripts please? |
#1402
|
|||
|
|||
Hello,
When I paste below and enter in my app token and user key, I get an error from JDownloader:unterminated string literal.... What does this mean? Quote:
|
#1403
|
|||
|
|||
Is possible to get 'extract to' value from Archive extractor setting?
|
#1404
|
|||
|
|||
Quote:
From what I know, manual extraction will use "Subfolder pattern" from archive extractor setting wherever possible (e.g. %ARCHIVENAME%, $DATE:dd.MM.yyyy$), but it does not use the "Extract to" folder setting from it. The files will be extracted to the same location as the archive, which can be accessed by the "var myString = myArchive.getExtractToFolder();" method. If you haven't found a solution to replace your existing script, it is possible to do it using the extracted file paths method. Let me know if you need any help with it. |
#1405
|
||||
|
||||
@Fritjof Larsson
Merged EventScripter threads. -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#1406
|
|||
|
|||
Quote:
I can hardcode unpack folder in script but it better and dynamic if possible to take from 'extract to' from extractor settings. |
#1407
|
|||
|
|||
So you just want to get the "extract to" value from "Archive Extractor" setting, not the 'extracted' archive?
|
#1408
|
|||
|
|||
Quote:
Trigger is after extract or before? Yes because bug I want get extract folder from setting and set in script. |
#1409
|
|||
|
|||
Choose a special variant of the resolution of 100 YouTube video in a single step?
Is there a way in the link grabber window to choose a special variant of the resolution of more than a single YouTube video in a single step? For example, all (selected, may be 100) videos in the link grabber shall be downloaded with 480p.
https://board.jdownloader.org/showth...557#post467557
__________________
Aktuelles Windows |
#1410
|
|||
|
|||
Quote:
Can do with trigger "Any extraction event' to set extraction path to "extract to" value from "Archive Extractor" setting? |
#1411
|
|||
|
|||
Quote:
Code:
// Auto-show/Auto-hide infobar // Trigger: Remote API Event fired if (event.publisher == "downloadwatchdog") { var id = event.id; if (id == "RUNNING" || id == "STOPPED") { var interfaceName = "org.jdownloader.extensions.infobar.InfoBarConfig", storage = "cfg/org.jdownloader.extensions.infobar.InfoBarExtension"; callAPI("config", "set", interfaceName, storage, "windowvisible", id == "RUNNING"); } } |
#1412
|
|||
|
|||
Quote:
Code:
postPage("https" + "://api.pushover.net/1/messages.json", "token=appToken&user=userKey&message=" + package.getName() + " finished."); |
#1413
|
|||
|
|||
Quote:
Function: Code:
// Function to get extract to folder from extractor settings var customExtractionPath = function() { var interfaceName = "org.jdownloader.extensions.extraction.ExtractionConfig", storage = "cfg/org.jdownloader.extensions.extraction.ExtractionExtension"; return callAPI("config", "get", interfaceName, storage, "CustomExtractionPath"); } alert(customExtractionPath()); Feel free to let me know if I can help in any way with your script. |
#1414
|
|||
|
|||
Quote:
Code:
// Remove links - from download list, if a file with matching name + size exists in user-specified folders // Trigger: Toolbar Button Pressed // Customize toolbar > add new "Eventscripter Trigger" button > rename it to "remove links" (without quotes, case-sensitive) > change icon (optional) var folders = ["c:/downloads", "c:/video", "c:/audio", "c:/other"]; // <- Folders to check if (name == "remove links") { getAllDownloadLinks().forEach(function(link) { if (!link.bytesLoaded && !link.running) { folders.some(function(folder) { var file = getPath(folder + "/" + link.name); if (file.exists() && file.size == link.bytesTotal) { link.remove(); return true; } }) } }) } |
#1415
|
|||
|
|||
Quote:
Can you not achieve the desired result tweaking the YT variant selection algorithm in advanced settings? It is highly configurable. |
#1416
|
||||
|
||||
re: youtube change variant, might be just easier to change plugin settings just delete the entries, add them back again. There is cache so they wont have to scrape each video again. All info is retained in memory, so this will work on assumption you just added them.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#1417
|
|||
|
|||
Quote:
Thank you very much for this script, unfortunatly it doesn't do anything. |
#1418
|
|||
|
|||
Make sure you are using the correct trigger, have created a custom button in the toolbar as instructed, and replaced the example folders in the script with your own.
If you need help setting the script up, you can find me in JD Chat: Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1419
|
|||
|
|||
In a script with the trigger "a download started", I'm trying to do
Code:
var url = link.getURL(); Where can I see what methods are available for `link`? Edit: Looks like it's getURL (uppercase) for "packagizer hook", but getUrl for "a download started". Last edited by SMS; 19.06.2020 at 18:03. |
#1420
|
|||
|
|||
Click 'Show/Hide Help' in the main menu of the script editor.
Please note, getUrl() does not necessarily return the download url. It will return the url as per the 'downloadlink url display' selection in 'user interface' settings. It will also return null, if the download url is obtained from an encrypted source. If you want to always access the download url, use the content url method as the primary source and plugin url method as fallback. |
#1421
|
|||
|
|||
Quote:
I have set this in MyJDownloader EventScripter: Scripts: Code:
[ { "eventTrigger" : "ON_ARCHIVE_EXTRACTED", "enabled" : true, "name" : "Synology Videoordner nach entpacken indizieren", "script" : "disablePermissionChecks();\n\nif (isDownloadControllerIdle() && !callAPI(\"extraction\", \"getQueue\").length) callSync(\"synoindex\", \"-R\", \"video\");", "eventTriggerSettings" : { "isSynchronous" : false }, "id" : anonymus } ] |
#1422
|
|||
|
|||
Quote:
If you are still having problem with the script, you can find me in JD Chat.: Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1423
|
|||||
|
|||||
Quote:
Quote:
Quote:
Quote:
Quote:
__________________
Aktuelles Windows Last edited by Dockel; 20.06.2020 at 15:54. |
#1424
|
||||
|
||||
@Dockel
not youtube website, JD > settings > plugins > youtube
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#1425
|
|||
|
|||
So change the settings there. Very many settings. And when I want other variants of videos (than 480p) I would have to reset the settings each time.
__________________
Aktuelles Windows |
#1426
|
|||
|
|||
Quote:
|
#1427
|
|||
|
|||
Thank you for checking.
Quote:
Where could I find it?
__________________
Aktuelles Windows Last edited by Dockel; 22.06.2020 at 21:26. |
#1428
|
|||
|
|||
|
#1429
|
|||
|
|||
Yes, but here it is not:
And I even cannot find it in the menu cusstomizer / offline menu manager or so. I do not have any idea how to add it. I assume, a long time ago I removed it, but I cannot remember it.
__________________
Aktuelles Windows |
#1430
|
|||
|
|||
Menu Item Name: Plugin Menu Entries (Component)
|
#1431
|
|||
|
|||
Sorry, what do I have to do with it:
__________________
Aktuelles Windows |
#1432
|
|||
|
|||
Click "Add". Any entries available for a plugin which is used for the particular link, will then appear in the context menu.
|
#1433
|
|||
|
|||
Ah yes, now it is available.
And here I can select the resolutions: Thank you very much!
__________________
Aktuelles Windows |
#1434
|
|||
|
|||
Hello,
I'm trying to use the Event Scripter to prune incoming link packages from a specified domain, leaving only the largest file, while discarding the rest. But I can't for the life of me find any documentation that clearly describes when and where each Trigger is triggered. For example, when is Package Finished triggered? Or Package Hook? Apologies for being completely clueless, much appreciation for anyone willing to point me in a direction. Thanks |
#1435
|
|||
|
|||
Neither of them are suitable for your use case. There aren't any event triggers which will work out of the box (in this case) either. You will have to use "A new link was added" trigger, and use the 'packagizer link' object returned by it to get the relevant 'crawled link' objects, and query/match/remove them from list. |
#1436
|
|||
|
|||
Quote:
myArchive.getExtractedFilePaths() gives path from extracted file. But I need full path and name of archive/archive parts from manual open beacause I want move archive after extract. Last edited by sherbee; 27.06.2020 at 17:55. |
#1437
|
|||
|
|||
Quote:
Code:
var filePaths = archive.getExtractionLog().match(/\(FileArchiveFile\)File:[^|]+/g).map(function(filePath) { return filePath.replace(/.+?:(.+)/, "$1"); }); alert(filePaths.join("\n")); |
#1438
|
|||
|
|||
I'm looking for a script that I can run periodically that will reset a link if status = Finished and size = 0 bytes. Basically resetting anything that looks like this. I spoke more about this issue here.
https://board.jdownloader.org/showthread.php?t=84716 If anyone could help me make this script I would be very grateful. |
#1439
|
|||
|
|||
Quote:
Code:
// Reset finished link, if size is zero bytes // Trigger: A Download Stopped if (link.finished && !link.bytesTotal) { link.reset(); } |
#1440
|
|||
|
|||
As it took me a few hours to get it done im posting my code for anyone who wants to send a finished download to a remote machine via scp.
This is a follow-up post of my last post in Dec '19. OS: Linux with public key auth on remote server Code:
disablePermissionChecks(); if (link.isFinished()) { var sourceFile = link.getDownloadPath(); var result = callSync("scp", "-P <portnr>", sourceFile, "<user>@<IP_of_destination>:/<filepath>"); var exitcode = callSync("sh", "-c", "echo $?").trim(); log("scp-output: " + result); log("Exit Code: " + exitcode); if (exitcode == "0") { deleteFile(sourceFile, false); //false=non-recursive log("DELETED " + link.getName()); } if (package.isFinished()) package.remove(); } Code:
callSync("sh", "-c", "scp -P <portnr> " + sourceFile + " <user>@<IP_of_destination>:/<filepath> && rm " + sourceFile); |
Thread Tools | |
Display Modes | |
|
|