JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #581  
Old 08.02.2019, 20:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,341
Default

Is that an app for synology and you can push notifications to it? is it a real message service?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #582  
Old 08.02.2019, 21:14
almanteka almanteka is offline
Baby Loader
 
Join Date: Feb 2019
Posts: 9
Default

Quote:
Originally Posted by Jiaz View Post
Is that an app for synology and you can push notifications to it? is it a real message service?
yes, it's an app to connect to your own synology server. you can push notifications using web hooks & slash commands, chat with other users using the app from windows desktop, android & iOS. i think it's not a real message service because you need a synology server for it to work, but it provides what i need after using slack & pushbullet and obtained the same experience. i used slack & pushbullet just to receive push notifications on my cell phones, now, i integrated those to my synology server.
Attached Thumbnails
jdchat.jpg  

Last edited by almanteka; 08.02.2019 at 21:23.
Reply With Quote
  #583  
Old 11.02.2019, 12:36
Simon* Simon* is offline
DSL User
 
Join Date: Feb 2017
Posts: 38
Default

Hi almanteka

Would you mind PMing me about what kind of notifications you're setting this up for? Is it purely for download finished or something else?

I also had this same idea recently, so I've build this functionality into the iOS MyJDownloader app.

In the next iOS update users can simply tick boxes for various push notifications, and the app sets up the event scripter script as needed.

At the moment I provide 11 push notification types (package started, package finished, downloads stopped etc..), but users are free to set up their own custom notifications based on the ones I've made (with mgpai's help), they just won't be able to turn them on/off through the app ui.

I'm interested to know what other types of notifications users are wanting, and if you have any scripts you're willing to share that would be great.
Reply With Quote
  #584  
Old 12.02.2019, 12:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,341
Default

@almanteka: Thanks! Didn't know it before
@Simon: I'm sorry for huge delay :(
__________________
JD-Dev & Server-Admin
Reply With Quote
  #585  
Old 13.02.2019, 06:39
almanteka almanteka is offline
Baby Loader
 
Join Date: Feb 2019
Posts: 9
Default

Quote:
Originally Posted by Simon* View Post
Hi almanteka

Would you mind PMing me about what kind of notifications you're setting this up for? Is it purely for download finished or something else?

I also had this same idea recently, so I've build this functionality into the iOS MyJDownloader app.

In the next iOS update users can simply tick boxes for various push notifications, and the app sets up the event scripter script as needed.

At the moment I provide 11 push notification types (package started, package finished, downloads stopped etc..), but users are free to set up their own custom notifications based on the ones I've made (with mgpai's help), they just won't be able to turn them on/off through the app ui.

I'm interested to know what other types of notifications users are wanting, and if you have any scripts you're willing to share that would be great.
for now, i'm using the notifications for Package Finished and Before a Captcha Challenge triggers. i'm sure that it will work for all the triggers available on jdownloader.
Reply With Quote
  #586  
Old 13.02.2019, 10:37
Simon* Simon* is offline
DSL User
 
Join Date: Feb 2017
Posts: 38
Default

Quote:
Originally Posted by Jiaz View Post
@Simon: I'm sorry for huge delay :(
Np. Do you have an idea of when you'll be free to look into it for me? Eager to push this version out.
Reply With Quote
  #587  
Old 15.02.2019, 21:49
pinko
Guest
 
Posts: n/a
Default

I saw that one of the triggers is "A new file has been created". How would I make script, witch would be add number before name of new file. Number will be: number of files in folder+1.

Second thing: I try to create history of downloaded links, using #7, but I get message that variable "link" is not define. What am I doing wrong?
Reply With Quote
  #588  
Old 16.02.2019, 06:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by pinko View Post
I saw that one of the triggers is "A new file has been created". How would I make script, witch would be add number before name of new file. Number will be: number of files in folder+1.
The event will be triggered each time a download is finished or an archive is extracted. It will return any array of 'created' files, which will contain a single item when it is created by the download controller or single/multiple items (depends on the number of files in the archive) if it is created by the extractor. As such, the number of files in folder (assuming folder = folder on disk) will vary and might not be suitable for the task you specified.

Quote:
Originally Posted by pinko View Post
Second thing: I try to create history of downloaded links, using **External links are only visible to Support Staff**..., but I get message that variable "link" is not define. What am I doing wrong?
I had immediately replied (via PM) to your email. If you still have issues running the script, find me in JD Chat.

Last edited by mgpai; 16.02.2019 at 06:15.
Reply With Quote
  #589  
Old 16.02.2019, 19:30
TheDeath24
Guest
 
Posts: n/a
Default

Hello together,

i want to ask if somebody can help me with a script.

I want to set the download path of a new package wich is over 20gb to filme and all other bigger than 500mb to serien.

As event i used "A new link has been added"

var myLong = myPackagizerLink.getBytesTotal();
var filme = "E:\HD Filme";
var serien = "E:\Serien";


if (myLong > '20000000000') {
myPackagizerLink.setDownloadFolder(filme);
}

No error comes but it does not working.
Can anybody help?

Regards
Reply With Quote
  #590  
Old 16.02.2019, 19:51
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

You have to use escape the backslash character:
Code:
var filme = "E:\\HD Filme";

or use (forward) slash as path separator.
Code:
var filme = "E:/HD Filme";

Tried packagizer? You can create rules to set download folder (among other things) based on file size.
Reply With Quote
  #591  
Old 17.02.2019, 01:02
almanteka almanteka is offline
Baby Loader
 
Join Date: Feb 2019
Posts: 9
Default

hi! i'm trying to adapt these two scripts to move the original "un-extracted" package to another folder after the extraction ocurred! i know that jdownloader can move the original files to the recycle bin, but i'm looking to move the original "un-extracted" package to another folder instead! thanks in advance for your suggestions & help!


ArchiveExtracted.js
Code:
var script = 'F:\\JDownloader v2.0\\JDTest3.bat'

var myFilePackage = package;
var path = myFilePackage.getDownloadFolder()
var name = myFilePackage.getName()
var label = myFilePackage.getComment() ? myFilePackage.getComment() : 'N/A'
var links = myFilePackage.getDownloadLinks() ? myFilePackage.getDownloadLinks() : []

function isReallyFinished() {
	for (var i = 0; i < links.length; i++) {
		if (links[i].getArchive() != null && links[i].getExtractionStatus() != "SUCCESSFUL" || !package.isFinished()) {
			return false
		}
	}
	return true
}

if (isReallyFinished()) {
	var command = [script, path, name, label, 'PACKAGE_FINISHED']
	log(command)
	log(callSync(command))
}

maybe this one?
Code:
//Trigger: "Archive Extraction Finished"

var packageFinished = archive.getDownloadLinks()[0].getPackage().isFinished();

var folder = archive.getDownloadLinks()[0].getPackage().getDownloadFolder();
var name = archive.getDownloadLinks()[0].getPackage().getName();


if (packageFinished) {
    alert("External Command " + " Parameter1: " + folder + " Parameter2: " + name);
}

JDTest3.bat
Code:
@ECHO OFF

set ARG_NAME=%1

move "F:\\JD Downloads\\%ARG_NAME%" "F:\\!TRASH!"

:thumbup:
Reply With Quote
  #592  
Old 17.02.2019, 07:43
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by almanteka View Post
... i'm looking to move the original "un-extracted" package to another folder instead ...
Code:
// Move archive files after extraction
// Trigger: Archive Extraction Finished

var links = archive.getDownloadLinks() || [];

links.forEach(function(link) {
    var filePath = getPath(link.getDownloadPath());
    filePath.moveTo(filePath.getParent().toString().replace("JD Downloads", "!TRASH!"));
});

Last edited by mgpai; 17.02.2019 at 08:00.
Reply With Quote
  #593  
Old 17.02.2019, 08:25
almanteka almanteka is offline
Baby Loader
 
Join Date: Feb 2019
Posts: 9
Default

Quote:
Originally Posted by mgpai View Post
Code:
// Move archive files after extraction
// Trigger: Archive Extraction Finished

var links = archive.getDownloadLinks() || [];

links.forEach(function(link) {
    var filePath = getPath(link.getDownloadPath());
    filePath.moveTo(filePath.getParent().toString().replace("JD Downloads", "!TRASH!"));
});
WOW! you're the scripts hero! test with single and multiple files worked perfectly! thanks for all your help!

Last edited by almanteka; 17.02.2019 at 09:06. Reason: tested with multiple files too!
Reply With Quote
  #594  
Old 17.02.2019, 10:46
TheDeath24
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mgpai View Post
You have to use escape the backslash character:
Code:
var filme = "E:\\HD Filme";

or use (forward) slash as path separator.
Code:
var filme = "E:/HD Filme";

Tried packagizer? You can create rules to set download folder (among other things) based on file size.
I used now this
var filme = "E:/HD Filme";

But nothing happend.

I can´t use packagizerbecause there is no option to filter by package size only by file size. I want to filter the packagesize.

Or i must i use a different var? myDownloadLink?

Regards
Reply With Quote
  #595  
Old 17.02.2019, 11:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by TheDeath24 View Post
var myLong = myPackagizerLink.getBytesTotal();
This returns only the link size, not the package size.

Quote:
Originally Posted by TheDeath24 View Post
I can´t use packagizerbecause there is no option to filter by package size only by file size. I want to filter the packagesize.
Only the following methods return package size:
Code:
var myLong = myCrawledPackage.getBytesTotal();
var myLong = myFilePackage.getBytesTotal();

Only "Package Finished" trigger returns the "package" sandbox. In all other cases you have to get the "package" sandbox using methods which return packages or links.
Reply With Quote
  #596  
Old 17.02.2019, 16:00
TheDeath24
Guest
 
Posts: n/a
Default

Thanks mgpai,

now i use myCrawledPackage.getBytesTotal();

All working. Thanks for your help.
Reply With Quote
  #597  
Old 20.02.2019, 00:30
pinko
Guest
 
Posts: n/a
Default

Is it possible to create script for disable "LinkgrabberSettings: Various Package" if package name is "Some_Package_Name".
I want to disable it when am downloading from some selected youtube channels.
Reply With Quote
  #598  
Old 20.02.2019, 11:10
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,341
Default

@pinko: you can create a Settings-Packagizer rule to avoid links going into the various package. If you can explain what exactly you're trying to achieve, I can try to help
__________________
JD-Dev & Server-Admin
Reply With Quote
  #599  
Old 20.02.2019, 15:44
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 734
Default

I was told to ask mgpai for help with eventscript from here, https://board.jdownloader.org/showthread.php?t=79841
So,
@mgpai Can U make me a eventscript which will automatically grab proxies from here **External links are only visible to Support Staff****External links are only visible to Support Staff**
Thanks in advance.
Reply With Quote
  #600  
Old 20.02.2019, 16:59
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Cyberavater View Post
Can U make me a eventscript which will automatically grab proxies from here ...
Sorry, I have to decline your request.

Hope you have tried the bulk proxies import feature in JD Connection Manager. I can create a script which can automatically download the lists at specific intervals, but I guess it wont help you much.
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 10:36.
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.