#1
|
||||
|
||||
Referenceerror name is not definied
The error appears only when I power on my pc, open JD2, press start download button. After that even I close, open JD2 add the same links and start the downloads it doesn't appear.
**External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** 12.09.21 12.09.50 <--> 12.09.21 12.15.35 jdlog://6377825302851/ Example links **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** Last edited by tunayx; 12.09.2021 at 12:26. |
#2
|
|||
|
|||
According to you screenshot it is caused by eventscripter script named "split packages". Can take look if you post the script here.
|
#3
|
||||
|
||||
Quote:
https://board.jdownloader.org/showthread.php?t=70525 Last edited by tunayx; 12.09.2021 at 21:17. |
#4
|
|||
|
|||
That script uses linkgrabber context menu button tirgger, so any errors related to the script should only appear when you click the corresponding button. If the error appears during startup or download, it could most likely be due to a different trigger being used for the script, instead of the recommended/required trigger.
|
#5
|
||||
|
||||
I've just copied and pasted your script. This is the script I have. Also error occurs without using context menu or pressing anything. It just appears when a download starts and happens randomly.
Code:
// Split Packages and create sub-folder based on package length // Trigger : Linkgrabber Contextmenu Button Pressed // Forum Topic: https://board.jdownloader.org/showthread.php?t=70979 if (name == "Split Packages") { var package = lgSelection.getContextPackage(); var links = package.getDownloadLinks(); var newSize = 100; // Specify max number of links per package var UUIDS = []; var count = 1; if (links.length > newSize) { for (i = 0; i < links.length; i++) { var link = links[i]; UUIDS.push(link.getUUID()); } while (UUIDS.length) { var oldFolder = package.getDownloadFolder(); var packageName = package.getName(); var splitUUIDS = UUIDS.splice(0, newSize); var newFolder = oldFolder + "/" + pad(count); setNewFolder(); count++; } } } // Add sub folder function setNewFolder() { callAPI("linkgrabberv2", "movetoNewPackage", splitUUIDS, [], packageName, newFolder); } // Pad number with leading zeros function pad(num) { var a = num + ""; var b = (links.length / newSize).toFixed(0); while (a.length < b.length) a = "0" + a; return a; } |
#6
|
||||
|
||||
@tunayx: It's important to set the correct event type! You cannot simply change it when script relies on information only available on specific event type.
In this case the even type/trigger must be set to Quote:
__________________
JD-Dev & Server-Admin |
#7
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|