I would lile to know how to make filebot fully automatic on my DS218+
Actually i need to go to my DSM, open filebot, clic on "execute" when a new file is available in my "completed" folder.
I can create a task with "schedule" but it's not logic and can wait many hours.
I have found many topics about it but nothing works for me or it's too complicated for my low coding skills.
What i would like to do with your help ?
When a new file is added on my "completed" folder, autoStart Filebot. (it look easy)
Huge thanks for your future help.
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 13:44
by rednoah
A.
You can create a Schedule Task and then schedule that task to run every 10 minutes. That's the low-code easy solution.
A slight improvement (at the cost of basic coding) would be running light-weight find first to check if there are new files and only run heavy-weigth filebot when there actually are new files. See Run filebot command only if there are new files for details.
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 13:53
by killmort
Hello rednoah,
Thank you for the answer.
Start a task every 10min make me crazy, files are added 3 times / week, is it useful to stress my DS218+ for this ?
Does Docker need less resources to watch a folder ?
Many thanks
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 14:04
by rednoah
killmort wrote: ↑28 May 2024, 13:53
Start a task every 10min make me crazy, files are added 3 times / week, is it useful to stress my DS218+ for this ?
Yep. That's why I am suggesting to Run filebot command only if there are new files. Check every 10 min / 60 min / 360 min / etc until you find the desired trade-off between responsiveness and resource usage.
killmort wrote: ↑28 May 2024, 13:53
Does Docker need less resources to watch a folder ?
You'll want to run your own tests. Do keep in mind that "monitoring a folder for new files" does require something to do something at all times. The process that is mostly not doing anything will still use memory at the very least. If you use the find command once an hour to check for new files then I can guarantee that it won't use any CPU or memory most of the time as nothing is running most of the time. That said, run tests and report back.
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 14:34
by killmort
Thank you.
I'm sorry but i don't understand where to add the scripts from viewtopic.php?t=13550
I have tried to add it in Schudler but my skills are limited, can you explain for a lvl0 ? Many thanks
Re: AutoStart when new file in folder with Synology
if find /volume1/complete -type f -size +100M -mmin -60 -print -quit | read
then
filebot-node-task 0
fi
The 0 in filebot-node-task 0 may be a different number in your scheduled task.
/volume1/complete is the file path to to where you add files. You will have to change this to a file path that makes sense for your setup.
-mmin -60 assumes that your scheduled task is set to run once per hour. If you use a different interval then you must modify the -mmin value accordingly, otherwise the "new files" check may not always work as expected.
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 16:13
by killmort
Thank you for the answer.
I have applied the modifications in the schedule task but nothing happened, I have forced the execution but still nothing happened too.
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 19:17
by killmort
Great job, the script find all files in the right folder "completed". The path wasn't correct but it's fixed now.
Can you tell me what I need to add now ?
"then
filebot-node-task 3
fi" ?
Actual script:
find /volume/TorrentEngine/downloads/completed/ -type f -size +100M
Many thanks
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 19:24
by killmort
Seem to be perfect with this script :
if find /volume1/TorrentEngine/downloads/completed/ -type f -size +100M |
read
then
filebot-node-task 4
fi
Answer:
Parameter: excludeLink = y
Parameter: artwork = y
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: emby = *****
Parameter: seriesFormat = {plex}
Parameter: animeFormat = {plex}
Parameter: movieFormat = {plex}
Parameter: musicFormat = {plex}
Parameter: excludeList = .excludes
Argument[0]: /volume1/TorrentEngine/downloads/completed
Use excludes: /volume1/VideoClub/.excludes (28)
No files selected for processing
Done ¯\_(ツ)_/¯
Re: AutoStart when new file in folder with Synology
Posted: 28 May 2024, 19:27
by killmort
I suppose the folder need to be empty to perfectly working?
Thanks
Re: AutoStart when new file in folder with Synology
if find /volume1/TorrentEngine/downloads/completed -type f -size +100M -mmin -60 -print -quit | read
then
filebot-node-task 4
fi
The -mmin -60 bit is the whole point of the exercise. Check if there's a recently modified file, within the last 60 minutes, and then call filebot if so. Run this task every 60 minutes. Every 60 minutes we find that there is no file modified in the last 60 minutes, and thus skip the filebot call.
Re: AutoStart when new file in folder with Synology
Posted: 29 May 2024, 16:59
by killmort
Dear Rednoah,
I would like to thank you, it working well.
Many thanks