JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 05.11.2021, 14:35
kuitogu67 kuitogu67 is offline
Baby Loader
 
Join Date: Apr 2021
Posts: 6
Default Bug with eventscripter

Hello, I have been using this script untouched for a few weeks. About 3 days ago it started malfunctioning on both a linux headless and windows installation.

Please see attachments.

Code:
var file = link.getName();
var folders = ["/home/ubuntu/Dropbox/g/1/", 
"/home/ubuntu/Dropbox/g/2/", 
"/home/ubuntu/Dropbox/g/3/", 
"/home/ubuntu/Dropbox/g/4/", 
"/home/ubuntu/Dropbox/g/5/", 
"/home/ubuntu/Dropbox/g/6/", 
"/home/ubuntu/Dropbox/g/7/", 
"/home/ubuntu/Dropbox/g/8/", 
"/home/ubuntu/Dropbox/g/9/", 
"/home/ubuntu/Dropbox/g/10/", 
"/home/ubuntu/Dropbox/g/11/", 
"/home/ubuntu/Dropbox/g/12/", 
"/home/ubuntu/Dropbox/g/13/", 
"/home/ubuntu/Dropbox/g/14/", 
"/home/ubuntu/Dropbox/g/15/", 
"/home/ubuntu/Dropbox/g/16/", 
"/home/ubuntu/Dropbox/g/17/", 
"/home/ubuntu/Dropbox/g/18/", 
"/home/ubuntu/Dropbox/g/19/", 
"/home/ubuntu/Dropbox/g/20/", 
"/home/ubuntu/Dropbox/g/21/", 
"/home/ubuntu/Dropbox/g/22/", 
"/home/ubuntu/Dropbox/g/23/", 
"/home/ubuntu/Dropbox/g/24/", 
"/home/ubuntu/Dropbox/g/25/", 
"/home/ubuntu/Dropbox/g/26/", 
"/home/ubuntu/Dropbox/g/27/", 
"/home/ubuntu/Dropbox/g/28/", 
"/home/ubuntu/Dropbox/g/29/", 
"/home/ubuntu/Dropbox/g/30/", 
"/home/ubuntu/Dropbox/g/31/",
]; // <- Check if file exists in these folders

for (i = 0; i < folders.length; i++) {
    var folder = folders[i];
    if (getPath(folder + file).exists()) link.setEnabled(false);
}
Attached Images
File Type: png 39745.Image 865x49 copied .png (3.4 KB, 2 views)
File Type: png 39747.Image 218x113 copied.png (7.1 KB, 2 views)
File Type: png 39742.Image 993x744 copied.png (75.0 KB, 2 views)
Reply With Quote
  #2  
Old 05.11.2021, 14:38
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

@kuitogu67: your json array is invalid. last element has trailing ,
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 05.11.2021, 16:24
kuitogu67 kuitogu67 is offline
Baby Loader
 
Join Date: Apr 2021
Posts: 6
Default

You are the man Jiaz!
Reply With Quote
  #4  
Old 05.11.2021, 16:38
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

You're welcome!
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 04:52.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.