Skip to content

Pairing DuckieTV with FileBot for a fully automated media center

garfield69 edited this page Jul 7, 2016 · 58 revisions

If you are looking to organise your DuckieTV shows for use with a media center, then I can recommend using FileBot.

FileBot is a file organiser and renamer that runs under Java RE, and paired with the Groovy script AMC, you can manage your TV show files as soon as they are downloaded by your torrent Host.

The Filebot web site has set-up instructions for most of the Torrent Hosts that DuckieTV can connect to: µTorrent, qBitTorrent, Deluge, Transmission, and Vuze. The exception is Tixati, but that will probably be available soon too.

To help you get started, I am going to show you how I have set up FileBot for my personal use on my Windows 7 platform with µTorrent.
With a little bit of reading, you can learn to customise the AMC script parameters to organise your personal TV show files.

###Pre requisites:###

###Recommended Reading / Documentation###

###My TV show naming preferences### I keep my shows in the D:/TV/ folder, and organize the shows by Series-name folders, and episodes by s00e00 titles.
My file naming scheme looks something like this: D:\TV\Archer\s04e02 The Wind Cries Mary.mp4
But you can change this scheme to better suit your needs just by altering the AMC parameters. See AMC default formats for examples.

###My µTorrent set up for Filebot###

  • ####Setup µTorrent download directory. On the µTorrent Preferences, Directories page I've set up µTorrent with a default download directory. This makes it easier for FileBot to find work.

  • ####Setup µTorrent to run FileBot. On the µTorrent Preferences, Advanced, Run Program page, I've pasted the following (see below) in the Run this program when a torrent changes state box.

"C:\Program Files\FileBot\filebot.launcher.exe" -script fn:amc --action move -non-strict -no-xattr --log-file "d:/tv/amc.log" --filter "any{episode; age < 92}{true}" --def "@d:/TV/amc_args.txt" "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

The Filebot.launcher.exe is the non-gui version of the program. If you want the console to pop up then use Filebot.exe.
I also filter episode to those within the last 3 months. This helps episode title matching by excluding series that have similar names that could prevent a successful renaming match. If you regularly download episodes that have been aired more than 3 months ago, then you should consider adjusting the filter age value, or even removing the filter parm altogether.
Note: The filter only applies to episodes. Movies ignore the filter :-)

###My AMC set up for FileBot### The D:/TV/amc_args.txt file contains the parms to tell AMC what to do

ut_state_allow=11
unsorted=n
music=n
artwork=n
extras=n
skipExtract=y
clean=y
seriesFormat=D:/TV/{n.sortName('$2, $1').replaceTrailingBrackets()}/{s00e00} {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’?]/, "'").lowerTrail()}
movieFormat=X:/AVI/{n.sortName('$2, $1').lowerTrail()} ({y}) {vf} {ac.replace('AC3','DD')}{af.replace('6ch','5.1').replace('2ch','2.0')}

My personal AMC script runs only when the µTorrent download state is Final, which means files are left alone until seeding is completed.
I don't bother downloading music, artwork, extras, subtitles or archives. All other files in the downloaded torrent directory are deleted after the show is renamed and moved to its final folder.

###Problems?### To quote Bart Simpson,

I didn't do it. Nobody saw me do it. You can't prove anything!

  • For testing your set up, you can do a Dry Run by changing the --action move parm to --action test.

  • If you want to keep seeding, but also want to get the show copied and renamed for viewing,

    • delete the ut_state_allow=11 from the amc_Args.txt file
    • change clean=y to clean=n
    • move the µTorrent Run Program command from the Run this program when a torrent changes state box to the Run this program when a torrent finishes box.
    • change the command --action move to --action copy
  • The FileBot website has an extensive forum with lots of helpful threads and you can ask for help there. http://www.filebot.net/forums/

  • If there is an error with this presentation then kindly raise a ticket on GitHub here, or submit a post on Reddit here

Clone this wiki locally