JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 04.05.2020, 11:01
ultrahigh ultrahigh is offline
JD Fan
 
Join Date: Feb 2016
Posts: 70
Default EventScripter

Hallo,

ich benutze auf meiner NAS den EventScripter mit der Option "ON_ARCHIVE_EXTRACTED" das hat mir jetzt aber schon mehrmals Dateien zerschossen wenn man z.B. ganze Staffeln downloaded ( wo die Folgen einzeln sind ) gibt es einen Trigger anstelle von "ON_ARCHIVE_EXTRACTED" der erst ausgelöst wird wenn "alle Downloads fertig entpackt sind" ?

Gruß Kai
Reply With Quote
  #2  
Old 04.05.2020, 12:39
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,076
Default

Was genau soll dein Script denn tun und was genau hast du dir wie zerschossen?

Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #3  
Old 04.05.2020, 12:47
ultrahigh ultrahigh is offline
JD Fan
 
Join Date: Feb 2016
Posts: 70
Default

Hi,
mein Script startet nach dem erfolgreichen entpacken Filebot und Filebot renamed dann die Dateien und moved sie in den richtigen Ordner.

Eventscriper:
Code:
[{"eventTrigger":"ON_ARCHIVE_EXTRACTED", "enabled":true, "name":"Filebot", "script":"var amcFile = \"/volume1/homes/Kai/filebot.sh\";\nvar path = archive.getFolder();\ncallAsync(function() {}, amcFile, path);", "eventTriggerSettings":{}, "id":1585827394965}]
filebot.sh
Code:
#!/bin/sh
#Javapfad
#PATH=$PATH: /var/packages/Java8/target/j2sdk-image/bin/

#Pfade
QUELLE=/volume1/Downloads/Unsortiert
ZIEL=/volume1/
SERIEN="/volume1/Serien"
FILME="/volume1/Filme"

#Filebot
FILEBOT=/volume1/@appstore/filebot/filebot.sh
SPRACHE=de
IGNORE=.nfo,.txt,.url,.rar,.jpg,.iso,.sub,.idx,.mp3
CLEAN=y
LOG=/volume1/Downloads/filebot.log

#Formate
SERIE="{n} - {S00E00} - {t}"
FILM="{n} ({y})"

###################################################################################

#Filebot-Kommando
$FILEBOT -script fn:amc -rename --conflict skip --def minLengthMS=0 --action move -no-xattr -non-strict --lang de "$QUELLE" --log-file $LOG --def ignore=$IGNORE "seriesFormat=$SERIEN/$SERIE" "movieFormat=$FILME/$FILM" clean=$CLEAN

exit 0

Das Problem ist wenn ich eine Staffel im JD drin habe und die Episoden einzeln sind, entpackt er z.B. Episode 1 und bis Filebot ggfs fertig ist, ist Episode 2 zu 90% entpackt und Filebot nimmt sich diese Datei direkt mit... und somit ist sie nur zu 90% fertig und wird so verschoben, was dann zu defekten Serien führt.

Deshalb die Frage ob es einen Trigger gibt, der erst aktiv wird wenn "alle" Downloads entpackt sind.

Gruß

Last edited by ultrahigh; 04.05.2020 at 12:49.
Reply With Quote
  #4  
Old 04.05.2020, 19:26
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,516
Default

Du könntest das Script auf Synchron/Blockierend schalten, dann wartet JDownloader auf die Ausführung des Scripts
"isSynchronous":true
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 05.05.2020, 09:07
ultrahigh ultrahigh is offline
JD Fan
 
Join Date: Feb 2016
Posts: 70
Default

Danke, dann so ?

Code:
[{"eventTrigger":"ON_ARCHIVE_EXTRACTED", "isSynchronous":true,"enabled":true, "name":"Filebot", "script":"var amcFile = \"/volume1/homes/Kai/filebot.sh\";\nvar path = archive.getFolder();\ncallAsync(function() {}, amcFile, path);", "eventTriggerSettings":{}, "id":1585827394965}]
Reply With Quote
  #6  
Old 05.05.2020, 09:33
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,516
Default

Ich hab grad im Source nachgeschaut und müsste eher so sein
"eventTriggerSettings":{"isSynchronous":true}
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 05.05.2020, 09:34
ultrahigh ultrahigh is offline
JD Fan
 
Join Date: Feb 2016
Posts: 70
Default

Danke, dann wohl so:

Code:
[{"eventTrigger":"ON_ARCHIVE_EXTRACTED", "enabled":true, "name":"Filebot", "script":"var amcFile = \"/volume1/homes/Kai/filebot.sh\";\nvar path = archive.getFolder();\ncallAsync(function() {}, amcFile, path);", "eventTriggerSettings":{"isSynchronous":true}, "id":1585827394965}]
Reply With Quote
  #8  
Old 05.05.2020, 09:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,516
Default

Genau Teste mal. Sofern der Prozess erst beendet wird, wenn er *durch* ist, sollte das helfen, da der Entpacker bei diesem Event dann *blockiert*/nicht weiter macht
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 05.05.2020, 09:55
ultrahigh ultrahigh is offline
JD Fan
 
Join Date: Feb 2016
Posts: 70
Default

ja wenn ich die nächste Staffel ziehe probiere ich es mal, danke!!!
Reply With Quote
  #10  
Old 05.05.2020, 10:14
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,516
Default

Erst bedanken, wenn es wirklich geholfen hat
__________________
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 06:21.
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.