#2301
|
|||
|
|||
![]()
Just checked, 'package finshed' trigger also returns a link object, which returns the the download folder correctly, if "Remove finished downloads" is not enabled. If however the "Remove finished downloads" is enabled, instead of the link object (instance) it will return only a hashmap where package is set to null.
|
#2302
|
||||
|
||||
![]()
@mgpai: added missing link to test properties for this event.
when you have *remove finished downloads*, then the reference to its parent/Filepackage is removed and thus package is null. but the package reference should still work fine
__________________
JD-Dev & Server-Admin |
#2303
|
|||
|
|||
![]()
Ok, Yes.. I did have it set to Autoremove Downloads on complete..
![]() It works now, after turning that off! thank you guys for the help.. :-) |
#2304
|
|||
|
|||
![]()
Synchronous execution cannot be enabled (gets unchecked on save).
|
#2305
|
|||
|
|||
![]()
@mgpai - Can you please provide a script to save direct links to a text file?
https://board.jdownloader.org/showpo...postcount=3250 |
#2306
|
|||
|
|||
![]() Quote:
Code:
/* Save direct links to text Trigger: A Download stopped */ if (link.downloadHost == "vk.com") { var directLink = link.getProperty("picturedirectlink") || link.getProperty("directurls_fallback"); try { directLink && writeFile(link.downloadPath + ".txt", directLink, false); } catch (e) {}; } @Jiaz: One example where mere mortals who wish to offer support/help need access to obfuscated content. |
#2307
|
|||
|
|||
![]()
1. I have installed "Event Scripter"
2. I have added this script. 3. Enabled. But is there anything more that should be done? By default I have "Trigger": None And where are the links saved on the disk? Code:
|
#2308
|
|||
|
|||
![]()
Set trigger as specified in the script:
Code:
Trigger: A Download stopped Same download location, Same name. Extension 'txt'. |
#2309
|
||||
|
||||
![]()
see the script info
Quote:
Quote:
__________________
JD-Dev & Server-Admin |
#2310
|
|||
|
|||
![]()
mgpai & Jiaz Now it's Ok! Thanks a lot!
|
#2311
|
|||
|
|||
![]()
Requesting a script that waits until file extraction is done before starting with the next download. Then auto renames the extracted file to the rar's name.
|
#2312
|
||||
|
||||
![]() Quote:
![]()
__________________
JD-Dev & Server-Admin |
#2313
|
|||
|
|||
![]() Quote:
Quote:
Code:
/* Wait till extraction is finished Trigger : A Download Started IMPORTANT: Enable 'Synhronous Execution' checkbox in the top panel */ while(isExtracting()){ sleep(1000); } function isExtracting() { return callAPI("extraction", "getQueue").length > 0; } A bug currently prevents the 'sync execution' setting to be saved. Please wait for the bug fix before starting to use the script. You can use packgizer for this. It has an option to rename files after extraction. |
#2314
|
||||
|
||||
![]() Quote:
![]()
__________________
JD-Dev & Server-Admin |
#2315
|
||||
|
||||
![]()
Will be fixed with next core update
__________________
JD-Dev & Server-Admin |
#2316
|
|||
|
|||
![]() Quote:
For example, packagename is usually derived from archive name. So can use: Code:
Then do > rename to : <jd:packagename>.<jd:orgfiletype> (Tested just now. Working fine) Guess a packagizer property for archive name will be useful in cases like this. <jd:archivename> ? |
#2317
|
||||
|
||||
![]()
__________________
JD-Dev & Server-Admin |
#2318
|
|||
|
|||
![]() Quote:
Code:
/* Rename extracted files Trigge: Archvie extraction finished */ var name = archive.name; archive.extractedFilePaths.forEach(function(filePath) { filePath.renameName(name + "." + filePath.extension); }) |
#2319
|
|||
|
|||
![]() Code:
/* Random delay before download Trigger : A Download Started IMPORTANT : Enable "Synchronous execution" checkbox in the top panel */ var seconds = Math.floor(Math.random() * 5) + 1 // 1 to 5 seconds while (seconds && !link.aborting) { sleep(seconds * 1000); seconds--; } |
#2320
|
|||
|
|||
![]()
Script to Clean Up Download Tab
Hi. I need a script to clean up my Download tab. Basically, remove all finished packages/files that have been deleted/moved. Such a script would need to do the following. 1. Go through all the packages that have finished downloading. 2. Check if the downloaded files exist on the disk. 3. If the downloaded files do not exist on the disk, then remove them from the download tab. 4. If the package folder does not exist on the disk, then remove it from the download tab. Is there already such a script? @Jiaz suggested that @mgpai might be able to help? Thanks in advance for any help anyone may provide. |
![]() |
Thread Tools | |
Display Modes | |
|
|