amc script with custom formats for anime

Any questions? Need some help?
Post Reply
Khazit
Posts: 2
Joined: 08 Feb 2019, 09:32

amc script with custom formats for anime

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

Re: Need some help editing script

Post 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
:idea: Please read the FAQ and How to Request Help.
Khazit
Posts: 2
Joined: 08 Feb 2019, 09:32

Re: amc script with custom formats for anime

Post by Khazit »

So I can just replace --format {order.airdate.plex} with --format {plex} in my code?
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: amc script with custom formats for anime

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