#2881
|
||||
|
||||
@wizhack: Thanks for sharing your findings and feedback. Would have been my next question to check if bash is available
check ownership/permission for the nfs share or mount that the docker user will be mapped to correct nfs user
__________________
JD-Dev & Server-Admin |
#2882
|
|||
|
|||
Quote:
so the mv command doesn't act like a normal bash command (for the folder part) so i have to find a way to move folder, the easy way would be: mkdir in /mnt/4K with filename > cp file in the "newfolder" > rm -R old folder, dirty way in my opinions... if you have suggestions i'm open ! |
#2883
|
||||
|
||||
@wizhack: maybe check if mv might be part of internal bash but also be available as stand alone mv executable with different feature set? most likely it's something like that
__________________
JD-Dev & Server-Admin |
#2884
|
|||
|
|||
This is it !
so the built-in mv comand in alpine-linux is a part of busybox so it's explain why it was acting weird because i didn't know that i was looking for using a mv from coreutils. so here i did: Install the coreutils package in the container (alpine linux) Code:
apk add coreutils utmps Code:
mv --version Code:
mv (GNU coreutils) 9.1 |
#2885
|
||||
|
||||
@wizhack: thanks for feedback and confirmation
__________________
JD-Dev & Server-Admin |
#2886
|
|||
|
|||
Here is my script, i used 2 trigger 1 for package finished and 1 for extraction finished
Move folder based on name of file with a script shell Don't forget to check the box for preventing running the script in parallel Code:
var movefolder = '/config/scripts/movefolder.sh'; callSync(movefolder); And the movefolder.sh Code:
#!/bin/bash # Check subfolder from /output find /output -mindepth 1 -maxdepth 1 -type d | while IFS= read -r dir; do # check for *.part files if find "$dir" -type f -name "*.part" -print -quit | grep -q .; then echo "Le dossier $dir contient des fichiers avec l'extension .part. Il est ignoré." continue fi # Extract namefolder dirname=$(basename "$dir") # if folder has *1080*, *2160*, *4k*, ou *s??e??* if [[ $dirname == *1080* || $dirname == *2160* || $dirname == *4k* || $dirname == *s??e??* || $dirname == *s??* ]]; then # Si le dossier contient un fichier .rar, afficher un message d'erreur et passer au suivant if find "$dir" -type f -name "*.rar" -print -quit | grep -q .; then echo "Un fichier .rar a été détecté dans le dossier $dir. Le dossier est ignoré." continue fi # Déplacer le dossier vers le répertoire de destination approprié if [[ $dirname == *s??e??* ]]; then mv "$dir" "/mnt/FR-TV/" elif [[ $dirname == *1080* ]]; then mv "$dir" "/mnt/FR-HD/" elif [[ $dirname == *2160* || $dirname == *4k* ]]; then mv "$dir" "/mnt/FR-4K/" fi fi done Last edited by wizhack; 15.04.2024 at 20:06. |
#2887
|
||||
|
||||
@wizhack: Thanks for sharing your whole solution
__________________
JD-Dev & Server-Admin |
#2888
|
|||
|
|||
Would it be possible to make a script so that JD plays a (selectable) acoustic signal after, for example, 4 minutes without an internet connection (after a reconnect)? So if the reconnect hadn't worked? The signal could then be repeated, for example, every 5 minutes (as long as there is no internet connection). Can be stopped when an internet connection is available again.
__________________
Aktuelles Windows Last edited by Dockel; 17.04.2024 at 09:31. |
#2889
|
||||
|
||||
@Dockel: Yes, that should be possible, better ask mgpai, our scripter magician, for help or do some "trial and error" by yourself
__________________
JD-Dev & Server-Admin |
#2890
|
|||
|
|||
Oops, sorry, I thought if it was about scripts, one asked in this thread here, in which - I thought - magpai is also present. So where do I have to ask?
I guess, by doing some "trial and error" by myself I just would destroy JD completely.
__________________
Aktuelles Windows |
#2891
|
||||
|
||||
You are already right in this thread, you just mis-understood Jiaz.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2892
|
|||
|
|||
What exactaly did I misunderstand?
__________________
Aktuelles Windows |
#2893
|
||||
|
||||
By just posting in this thread, mgpai will most likely already read your questions - no need to ask him separately.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2894
|
|||
|
|||
Quote:
OK, now I still don't know what exactly I misunderstood, but everything seems to be as it should be. So I just will watit. Thank you!
__________________
Aktuelles Windows |
#2895
|
|||
|
|||
Quote:
Code:
/* connection notification trigger : interval (300000) enable 'synchronous execution of script' checkbox */ var time = Date.now() + 4 * 60 * 1000; var connected = false; while (!connected && Date.now() < time) { try { getPage("http://jdownloader.org"); connected = true; } catch (e) {}; sleep(1000); } if (!connected) { playWavAudio(JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"); } |
#2896
|
|||
|
|||
That was incredibly fast, thank you very much!
Now I have it like this: Could I change the interval of the no Internet connection signal being repeated as long as there is no connection? Or turn off the repetition (if need be)?
__________________
Aktuelles Windows |
#2897
|
|||
|
|||
Quote:
If you do not want repeatition, used the following script: Code:
/* connection notification trigger : after a reconnect */ if(result == "FAILED"){ sleep(4 * 60 * 1000); playWavAudio(JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"); } |
#2898
|
|||
|
|||
Quote:
So the length of the interval the signal is repeated can be changed by changing the value 4 (var time = Date.now() + 4 * 60 * 1000;) to another one, e.g. to 60 for 60 min. Quote:
__________________
Aktuelles Windows Last edited by Dockel; 17.04.2024 at 15:37. |
#2899
|
|||
|
|||
Quote:
In your example it will be 240000 + 60 * 60 * 1000 = 64 minutes. I would recommend using a script with a single interval. It will check for connection every x milliseconds, and play a sound only if connection is not present. Code:
/* connection notification trigger : interval (300000) */ try { getPage("http://jdownloader.org"); } catch (e) { playWavAudio(JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"); } |
#2900
|
|||
|
|||
OK, thank you very much for the new script. Sorry, I do not understand anything, but I guess, it will play a sound once (not repeatedly), if there is not connection for 5 minutes?
Hope, that is correct: Many thanks!
__________________
Aktuelles Windows |
#2901
|
|||
|
|||
Try all of them and find out.
|
#2902
|
|||
|
|||
OK, so each script a surprise egg (may be a good idea for another thread: making surprise egg-scripts, nobody knows what will happen).
Thank you very much again, very happy about the scripts!
__________________
Aktuelles Windows |
#2903
|
|||
|
|||
The script let the sound play here immediately after executing an automatic reconnect or after maybe about 5-15 seconds after or when the Internet connection actually is interrupted. Is there a way to let the sound play only if there is no Internet connection after 4 minutes? So if a reconnect fails? I
Code:
/* connection notification trigger : interval (300000) */ try { getPage("http://jdownloader.org"); } catch (e) { playWavAudio(JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"); }
__________________
Aktuelles Windows Last edited by Dockel; 18.04.2024 at 12:47. |
#2904
|
|||
|
|||
Quote:
The first interval script waits for 'time' before playing the sound. The second one plays it iimmediatley. The 'after a reconnect' script plays a sound after sleep(4 * 60 * 1000) (4 mins) if reconnect fails. If you want the sound to repeat, I would suggest you use the script with single interval (last script). If you want to plays the sound only once, use the 'after a reconnect' script. |
#2905
|
||||
|
||||
Very sorry for my confusion.
So I actually want this: Quote:
Quote:
Quote:
Quote:
If this script after executing a reconnect waits for 4 minutes, then checks the Internet connection and if there is any it would play a sound (it would not do if there was a connection) it would be great. It seems the script in my post before sometimes plays a sound immediately after a reconnect is executed. Not always (like I thought before). Maybe I have to correct some settings or so. OK, I will just try the other script (that waits for 4 minutes) and see what happens. Very sorry again for the sheer confusion.
__________________
Aktuelles Windows |
#2906
|
|||
|
|||
Quote:
If the reconnect was SUCCESFUL it will do nothing. If reconnect has FAILED, it will wait for 4 minutes and then play a sound. |
#2907
|
|||
|
|||
Quote:
Quote:
__________________
Aktuelles Windows |
#2908
|
|||
|
|||
Quote:
1000 hrs reconnect finished 1000 hrs script checks if reconnect was SUCCESFUL or has FAILED 1004 hrs play sound only if reconnect has FAILED |
#2909
|
|||
|
|||
Quote:
Quote:
Okey okey, I'll see what the script does (or doesn't do) on the next (failed) reconnect(s). Thank you very much again!
__________________
Aktuelles Windows |
#2910
|
|||
|
|||
It means, for example, if reconnect fails at 10:00 AM sound will play 4 minutes after that, at 10:04 AM.
|
#2911
|
|||
|
|||
Ah, okey, I see, thank you!
__________________
Aktuelles Windows |
#2912
|
|||
|
|||
fakeReconnect
As I understand it, a new method was made available yesterday called fakeRconnect but I can't seem to find where it is implemented. My current script looks like this, but I get an error that the fakeReconnect function is not available on object DownloadLink.
How do I call this method? Code:
//Desc: Resets the wait timer forcing a re-check of the download //Trigger: Download List Menu Item if (name == "Recheck Wait Timer" && dlSelection.isLinkContext()){ var link = dlSelection.getContextLink(); link.fakeReconnect(); alert("Wait Timer Recheck Script Executed"); } |
#2913
|
||||
|
||||
@nreal55: a small issue, will be available as normal method with next update/tomorrow
Quote:
__________________
JD-Dev & Server-Admin |
#2914
|
||||
|
||||
@mgpai (or whoever can help me)
New Script Request You already helped me with a script in the past. It would be great if you could write a script for the following requirement: In LinkGrabber I disable Dupe Manager on purpose. Setting: Advanced Settings | LinkCollector: Dupe Manager | Disabled But I want to be able to identify any duplicates in LinkGrabber window. So, I need a script which marks all occurrences of duplicates. EDIT: 2024-04-25 - 16:50 German Time As I learned that highlighting is not possible, but renaming or adding a comment is possible. I would prefer a comment which reads Dupe. This is also some kind of marking dupe links. Example: When there are three duplicate links, I want all three being marked. And when I delete two of them, the only remaining occurrence of that link should no longer be marked. It would be really great, if you could provide me with such a script. Thanks in advance for any efforts taken! Stefan Last edited by StefanM; 25.04.2024 at 17:50. Reason: Updated information |
#2915
|
||||
|
||||
@StefanM: not possible to highlight as there is no support for this. he could write a script and move dupes into special *duplicate* package
__________________
JD-Dev & Server-Admin |
#2916
|
||||
|
||||
Quote:
Link1, Link2, and Link3 are duplicates and so, will be renamed to DUPE-Link1, DUPE-Link2, and DUPE-Link3 Is that an option? The idea is, that when I add new links, that I immediately see, when there a re dupes among them. Last edited by StefanM; 25.04.2024 at 15:55. |
#2917
|
||||
|
||||
@StefanM: renaming or moving to special package or add/modify comments, everything is possible. but nothing to highlight or interact with gui
__________________
JD-Dev & Server-Admin |
#2918
|
||||
|
||||
Additionally to auto rename, you could create a custom linkgrabber view called "Linkgrabber duplicates" which would recognize those items according to said "duplicate filename".
This would then allow you to hide all duplicates in linkgrabber with a single click
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2919
|
||||
|
||||
Quote:
The only purpose for allowing duplicates, but marking them at the same time is as follows: When I start a new LinkGrabber-"crawling process", I want to be able to see all links to all files. Otherwise it might happen, that I only see a small fraction of links or even nothing, just because JD's dupe checker has filtered them out. But I cannot see the reason, why they are missing. So, I'd rather allow dupes, but then, I want to be able to identify them. |
#2920
|
||||
|
||||
Quote:
After all, it was just an idea. Quote:
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|