Running FileBot from the console, Groovy scripting, shell scripts, etc
isibizi
Posts: 3 Joined: 22 May 2019, 11:56
Post
by isibizi » 22 May 2019, 12:04
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
rednoah
The Source
Posts: 23955 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 22 May 2019, 14:00
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}"
kim
Power User
Posts: 1251 Joined: 15 May 2014, 16:17
Post
by kim » 22 May 2019, 21:06
You may want to look into
Code: Select all
# Search for adult content
-Dnet.filebot.WebServices.TheMovieDB.adult=true
and
true/false
isibizi
Posts: 3 Joined: 22 May 2019, 11:56
Post
by isibizi » 23 May 2019, 06:23
@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?
rednoah
The Source
Posts: 23955 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 23 May 2019, 07:34
You can take it as an example to get started and the modified it to your specific needs.
isibizi
Posts: 3 Joined: 22 May 2019, 11:56
Post
by isibizi » 23 May 2019, 10:18
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
rednoah
The Source
Posts: 23955 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 23 May 2019, 14:30
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:
or this:
Code: Select all
{f.structurePathTail.path.nameWithoutExtension}