Page 1 of 1

Script for JD an Filebot XXX Content

Posted: 22 May 2019, 12:04
by isibizi
Hello together,

i have a running script, but i miss one option in my script for adult content. The most titles for adult content includes "XXX" . How can i move Content with includes XXX i the title to my XXX Folder? Can anyone Help me Please

This is my Script

Code: Select all

#!/bin/sh
##FileBot benötigt diese Variablen
LOG="/volume1/amc.log"
EXC="/volume1/amc.txt"
SERIEN="/volume1/Video/Serien/{n}/{s}/{n}.{s00e00} - {t} ({y}) {vf}"
FILME="/volume1/Video/Filme/{n} ({y}) {source}({vf}@{vc}) [{rating}]/{n} ({y}) {source}({vf}@{vc}) [{rating}]"
UNSORTIERT="/volume1/Video/Unsortiert/{file.structurePathTail}" ### Wenn Filebot mal etwas nicht zuordnen kann, dann kannst du es in einen seperaten Ordner verschieben lassen, dann bleibt es im Downloadordner Übersichtlich.
##FileBot ausführen
/var/packages/filebot/target/filebot.sh -script fn:amc --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" "animeFormat=$ANIME" "unsortedFormat=$UNSORTIERT" -non-strict --def unsorted=y "artwork=y" --def "clean=y" "skipExtract=y" "excludeList=/volume1/Video/.excludes" "exec=/usr/syno/bin/synoindex -R video"
##OpenSubtitles downloaden
/var/packages/filebot/target/filebot.sh -script fn:suball /volume1/Video/ --lang de -non-strict --def maxAgeDays=7
## Aufräumen, --def root löscht den Unterordner mit
/var/packages/filebot/target/filebot.sh -script fn:cleaner "$1" --def root=y

Re: Script for JD an Filebot XXX Content

Posted: 22 May 2019, 14:00
by rednoah
Sounds like a generic bash script question.

Since this is the FileBot forum, here's how to move generic files with the filebot command:

Code: Select all

filebot -rename -r /path/to/input --db file --file-filter "fn =~ /XXX/" --output /path/to/output --format "{fn}"

Re: Script for JD an Filebot XXX Content

Posted: 22 May 2019, 21:06
by kim
You may want to look into

Code: Select all

# Search for adult content
-Dnet.filebot.WebServices.TheMovieDB.adult=true
and

Code: Select all

{info.adult}
true/false

Re: Script for JD an Filebot XXX Content

Posted: 23 May 2019, 06:23
by isibizi
@rednoah

Thank you for your help! Your command works only with files not with folders, what i must change to work with folders?

@Kim

Is your solution better than @rednoah's command and how can i add this in my script?

Re: Script for JD an Filebot XXX Content

Posted: 23 May 2019, 07:34
by rednoah
You can take it as an example to get started and the modified it to your specific needs.

Re: Script for JD an Filebot XXX Content

Posted: 23 May 2019, 10:18
by isibizi
This is my solution, but i have the problem, that the Video files ended with double extension videofile.mp4.mp4

i don't know why

Code: Select all

filebot -rename -r /volume1/Video/Download/ --db file --file-filter "f =~ /XXX/" --output /volume1/Video/XXX --format "{file.structurePathTail}"
when i use {file.structurePathTail} for unsorted, everything works perfect without double extension

Re: Script for JD an Filebot XXX Content

Posted: 23 May 2019, 14:30
by rednoah
FileBot always preserves the extension. If your format also includes the extension in the new name you'll and up with two.

You probably want a simple format such as this:

Code: Select all

{folder.name}/{fn}
or this:

Code: Select all

{f.structurePathTail.path.nameWithoutExtension}