Script for JD an Filebot XXX Content

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
isibizi
Posts: 3
Joined: 22 May 2019, 11:56

Script for JD an Filebot XXX Content

Post 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
User avatar
rednoah
The Source
Posts: 22978
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script for JD an Filebot XXX Content

Post 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}"
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Script for JD an Filebot XXX Content

Post 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
isibizi
Posts: 3
Joined: 22 May 2019, 11:56

Re: Script for JD an Filebot XXX Content

Post 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?
User avatar
rednoah
The Source
Posts: 22978
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script for JD an Filebot XXX Content

Post by rednoah »

You can take it as an example to get started and the modified it to your specific needs.
:idea: Please read the FAQ and How to Request Help.
isibizi
Posts: 3
Joined: 22 May 2019, 11:56

Re: Script for JD an Filebot XXX Content

Post 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
User avatar
rednoah
The Source
Posts: 22978
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Script for JD an Filebot XXX Content

Post 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}
:idea: Please read the FAQ and How to Request Help.
Post Reply