I have JDownloader as Docker-Container and would like to add also FileBot for automatism:
Download finished -> Extract archives (contain several parts) -> rename mkv-files and srt-files -> move to tv-shows or movie-folder or unsorted-Folder -> clean up and remove archives
Therefore I want to ask if these steps are working:
1. Deactivate automatic extraction at jdownloader (as this will be done by script)
2. add event scripter in jdownloader and add the following code
Code: Select all
[ {
"eventTrigger" : "ON_PACKAGE_FINISHED",
"enabled" : true,
"name" : "Execute FileBot (PackageFinished)",
"script" : "var script = '/volume1/docker/jdownloader2/scripts/jdownloader-postprocess.sh'\n\nvar path = package.getDownloadFolder()\nvar name = package.getName()\nvar label = package.getComment() ? package.getComment() : 'N/A'\n\nvar command = [script, path, name, label, 'PACKAGE_FINISHED']\n\nlog(command)\nlog(callSync(command))\n",
"eventTriggerSettings" : {
}
} ]
Code: Select all
#!/bin/sh
SERIEN="/volume1/Videos/Serien/{n}/Staffel {s}/{n} - {s00e00} - {t}"
FILME="/volume1/Videos/Filme/{n} ({y})"
UNSORTIERT="/path/{file.structurePathTail}"
docker exec FileBot /opt/filebot/filebot.sh -script fn:amc --lang de --log-file amc.log --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" "unsortedFormat=$UNSORTIERT" -non-strict --conflict skip --def movieDB=TheMovieDB seriesDB=TheTVDB --def unsorted=y --def skipExtract=n --def clean=y
## Aufräumen, --def root löscht den Unterordner mit
docker exec FileBot /opt/filebot/filebot.sh -script fn:cleaner "$1" --def root=y
Questions
- Should I use FileBot oder FileBot Watcher as Docker-Container?
- How to handle subtitle files in that script? How to get them in the format "Film (2020).Deutsch.srt" or "Film (2020).Englisch.Forced.srt"