Page 1 of 1

amc script with custom formats for anime

Posted: 08 Feb 2019, 09:48
by Khazit
I am currently using a seedbox that runs filebot and this is the script it runs for rtorrent currently.

Code: Select all

#!/bin/bash

export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"

TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3

# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y

filebot -script /opt/filebot/scripts/amc.groovy \
    --output "$HOME/media" \
    -non-strict --encoding utf8 --log all --log-file amc-rtorrent.log --action symlink --conflict override \
    --def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
	extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
It works if I leave it as is but I am trying to change the code so it does SxE so Plex can read the format properly from TheTVDB. I tried changing the code to this

Code: Select all

#!/bin/bash

export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"

TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3

# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y

filebot -script fn:amc --db TheTVDB --output "$HOME/media" --action symlink -non-strict --conflict auto --lang en --log all --log-file amc-rtorrent.log --order Absolute --format {order.airdate.plex} \
    --def "skipExtract=y' 'seriesFormat=anime/{n}({y})/{'\''Season '\''+s}/{n} - {s00e00} - {t} - [{vf}.{vc}.{ac}]"

subtitles=$SUBLANG \
	extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
but the format didn't change at all after retrying, I am new to both filebot and using a seedbox so I am not sure what is wrong exactly, also I cant find the log files anywhere.

If I can get some help just to get my anime/shows to work with the TheTVDB database it would be greatly appreciated!

Re: Need some help editing script

Posted: 08 Feb 2019, 15:10
by rednoah
1.
The default format is {plex} so the format is what you want by default. If S00E00 doesn't work for you for some reason, then using SxE instead is not the solution. More research is needed.

You'll want to ask the Plex guys on how to figure this one out:
https://forums.plex.tv/



2.
Converting AniDB Absolute numbers to TheTVDB SxE numbers is a completely separate topic, and the amc script does not have built-in support, since it's best to have a human supervise for this one.

Here's a detailed explanation:
viewtopic.php?f=3&t=2769

Re: amc script with custom formats for anime

Posted: 08 Feb 2019, 16:41
by Khazit
So I can just replace --format {order.airdate.plex} with --format {plex} in my code?

Re: amc script with custom formats for anime

Posted: 08 Feb 2019, 17:11
by rednoah
Doesn't matter. --format is ignored anyway.

You can override the format for each content type with amc-specific options:

Code: Select all

--def movieFormat="{plex}" seriesFormat="{plex}" animeFormat="{plex}" musicFormat="{plex}"
:idea: This example is exactly the same as the default.