Synology Filebot Task - AMC Rename, Indexing, Java Memory Heap Solution

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
kaan133
Posts: 1
Joined: 28 Apr 2020, 05:46

Synology Filebot Task - AMC Rename, Indexing, Java Memory Heap Solution

Post by kaan133 »

Hi,

I just wanted to share the Synology script that I generated through help of different topics on this forum, so that every 6 hours filebot:
  • Renames and moves the downloaded files to "video" folder
  • Tell Synology to index them
Had couple of challenges and got all the solutions through this forums, so just wanted to give back.

I created a text file called "OrganizeMedia.sh" and made it called by Synology Task Scheduler every 6 hours. Here is the content of that file:

Code: Select all

#!/bin/bash
export JAVA_OPTS="-Xmx512m"
filebot -script fn:amc --output "/volume1/video" --action move -non-strict "/var/services/home/Downloads" --def skipExtract=n --def deleteAfterExtract=y --def excludeList=amc.txt --def extractFolder="/var/services/home/Downloads/Extracted" --def clean=y --def subtitles=en "seriesFormat=/volume1/video/TVShows/{n} ({y})/{'Season '+s}/{n} {'S'+s.pad(2)}E{e.pad(2)} [{vf}-{vs}-{vc}-{group}]" "movieFormat=/volume1/video/Movies/{n} ({y})/{n} ({y}) [{vf}-{vs}-{vc}-{group}]" --def exec="synoindex -a '{file}'"
The "export JAVA_OPTS" line is just to make filebot work properly as each time I tried to call the filebot through SSH I came across Java Memory Heap errors. So for each SSH session I had to execute this command to solve the problem; that is why it is in the shell script.

The naming format I use here includes information such as video format and release group because I did not want to lose that information in case I'd like to download subtitles that are not being downloaded using filebot (which is mostly the case for some reason...).

Before using this, just remember to enter your Opensubtitles.org username and password (just once is enough) using the following command:

Code: Select all

filebot -script fn:configure 
Hope this helps!

Best
Post Reply