JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #2961  
Old 18.06.2024, 09:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,180
Default

@hulleyrob: sometimes solution is easier than thought Thanks for sharing your solution!
I will still work on better/easier browser usage. In case you need further help/got questions, just ask
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2962  
Old 18.06.2024, 10:46
StefanM's Avatar
StefanM StefanM is offline
JD Legend
 
Join Date: Oct 2020
Posts: 584
Default

@mpgai
New Script Request:

A script which converts ssssss.ms (sec. and msec.) to hh:mm:ss.xxx

Great thanks to Jiaz and especially pspzockerscene for implementing below properties in the PlugIns for keep2share and fileboom:
  • video_duration
  • video_width
  • video_height
  • video_format
Now, you can have these properties being shown in 'comments' by creating a Packagizer Rule.

Important note: In order to get this working, in the PlugIn settings - e.g. for k2s (keep2share) - you need to set single linkcheck as File linkcheck mode.

In Packagizer Rules, for Download-URLs which contain e.g k2s.cc
set Comment as e.g. as <jd:prop:video_width>,<jd:prop:video_duration>

For each new link added to LingGrabber, those properties will be shown in comments.

The duration, however, is shown as raw value.
For example:
4259.042 which is 4259 sec. and 42 msec.
What I would like to see is format hh:mm:ss.xxx
In this example 01:10:59.042

And for this conversion I would like to ask for a script.

Thank you very much for any efforts taken!
Reply With Quote
  #2963  
Old 20.06.2024, 10:42
hulleyrob hulleyrob is offline
JD Alpha
 
Join Date: Dec 2022
Posts: 22
Default

Quote:
Originally Posted by Jiaz View Post
@hulleyrob: sometimes solution is easier than thought Thanks for sharing your solution!
I will still work on better/easier browser usage. In case you need further help/got questions, just ask
funny you should say that, I have intermittent problem when running the event script a massive popup box appears occasionally with an IOException 424 failed dependency as the most obvious part of the error.

Is it worth uploading the logs for you to take a look?
20.06.24 06.16.53 <--> 20.06.24 08.43.39 jdlog://3653411370661/

Also once it has failed it disables the script. just enabling it again makes it work fine for another x times.
Reply With Quote
  #2964  
Old 20.06.2024, 12:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,180
Default

@hulleyrob: looks like some timeout issues with apprise, see
github.com/caronc/apprise-api/issues/29
github.com/caronc/apprise-api/issues/16
you should be able to try/catch the error to avoid the dialog/auto disable of the script
alternative you can make use of the following commands
Quote:
setAdvancedAlert(myBoolean);/*enable/disable alert with textbox and copy&paste*/
setDisableOnException(myBoolean);/*enable/disable script on exceptions*/
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2965  
Old 20.06.2024, 15:42
hulleyrob hulleyrob is offline
JD Alpha
 
Join Date: Dec 2022
Posts: 22
Default

Thank you will give it a go later when I get home.
Reply With Quote
  #2966  
Old 20.06.2024, 17:19
hulleyrob hulleyrob is offline
JD Alpha
 
Join Date: Dec 2022
Posts: 22
Default

try {
postPage('**External links are only visible to Support Staff**,
"urls=synology://192.168.0.4:5000/TOKEN&body=" + package.getName() +
" finished.");
}
catch (e) {
if (!(e instanceof Error)) {
e = new Error(e);
}
console.error(e.message);
}

A quick google of a JavaScript try catch and this appears to be working.

Can you suggest any improvements?
Reply With Quote
  #2967  
Old 21.06.2024, 00:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,180
Default

@hulleyrob: maybe URL encode package name to avoid issues if special/forbidden chars are part of it&final URL.
also maybe enqueue stuff that failed and retry sending them a few seconds later?
__________________
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 05:48.
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.