JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > International Support > JDownloader 2
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 27.02.2021, 12:51
plip plip is offline
Wind Gust
 
Join Date: Jun 2016
Posts: 44
Default

Hi. I hope someone could tell me what I'm doing wrong here.

I found this script which replaces characters in filenames when added to linkgrabber:
https://board.jdownloader.org/showpo...0&postcount=50

I'm altering it to suit my own needs. I can mostly do what I want with filenames without problems.

1. (Although I would like to know how to check if there's a letter/number right after 】or right before【, and add a space if a letter/number is there)

2. My big problem is this.

I want to do replacing of characters in the package/download folder too. Mostly the same replacements, but with a few differences.

I cannot figure out how to get the package/download folder name linkgrabber generates so that I can do replacements on that package/download folder name.

The file name is grabbed in the script like this:
Code:
    var myPackagizerLink = link;
    var fileName = myPackagizerLink.getName();
The file name can be modified after that no problem.

All my attempts to grab the package/folder apparently get a "null" error when actually trying to do a replacement. I don't know why.

I swear the following was working for a short while, but after restarting JD2 it just seems to store "null":
Code:
    var packageName = myPackagizerLink.getPackageName();
This doesn't work either:
Code:
    var packageName = myPackagizerLink.getDownloadFolder();

How do you capture the package/folder name so you can modify it, in the same manner as the filename is modified in that script I linked?

I know how to do the actual replacements and set the modified package name, if only I could reliably get the package/folder name in the first place.

Last edited by plip; 27.02.2021 at 12:59.
Reply With Quote
 


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 12:20.
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 - 2024, Jelsoft Enterprises Ltd.