-
Notifications
You must be signed in to change notification settings - Fork 274
Pairing DuckieTV with FileBot for a fully automated media center
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, rTorrent, Transmission, and Vuze.
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.
- FileBot 4.6.1+. Get the latest version at the official download site here
- Java RE 8 Update 74+. The FileBot installer will automatically download this if it is required.
- AMC. The latest Groovy script is fetched automatically when you invoke Filebot from your Torrent Host.
- FileBot
- Scripts and Automation
- FileBot Format Expressions
- Automated Media Center
- AMC FAQ
- AMC default formats
- AMC Usage and Examples
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.
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.
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 :-)
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.
Here is a list of useful options, lifted straight from the FileBot AMC page for your convenience. Note you can get AMC to inform Kodi, Plex or even Emby to rescan their libraries.
--def music=y Process music files as well. Disabled by default.
--conflict skip Never override existing files if the same media is downloaded multiple times
--conflict auto Override existing media only if new media is better
--def subtitles=en,de,fr Download subtitles for the given languages
--def artwork=y Fetch artwork/nfo
--def extras=y Generate *.url files and fetch all available backdrops
--def kodi=host Tell the given Kodi/XBMC instance to rescan it's library
--def plex=host:token Tell the given Plex instance to rescan it's library. Plex Home instances require an authentication token.
--def emby=host:apikey Tell the given Emby instance to rescan it's library.
--def pushover=userkey[:apikey] Send update notifications to your devices via Pushover. It is recommended that you create your own API key.
--def pushbullet=apikey Send full reports to all your PushBullet devices
--def gmail=username:password Use the following gmail account to send and receive full reports. You must use an App Password for security reasons.
--def mail=host:port:from Send email via private mail server
--def mailto=email Send report to the given email address (optional, email to yourself if not set)
--def reportError=y Report errors via email
--def storeReport=y Save reports to local filesystem
--def skipExtract=y Do not extract archives
--def deleteAfterExtract=y Delete archives after extraction
--def clean=y Automatically remove empty folders and clutter files that may be left behind after moving the video files, or temporary extracted files after copying
--def exec="echo '{file}'" Run program on newly processed files
--def unsorted=y Move media files that cannot be identified to a separate folder
--def ignore=regex Ignore filepaths that match the given regular expression
--def minFileSize=0 Only process video files larger than the given number (in bytes). Defaults to 50 MB.
--def minLengthMS=0 Only process videos longer than the given number (in milliseconds). Defaults to 10 minutes.
--def excludeList=amc.txt Keep a list of previously processed files to be ignored in future runs (if you run this script on the same files repeatedly you must enable this option)
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,
- change
ut_state_allow=11
tout_state_allow=5
in theamc_Args.txt
file - change
clean=y
toclean=n
- change the µTorrent Run this Program command from
--action move
to--action copy
- change
-
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
Since Filebot is now a paid app I'd suggest using Rename My TV Series.
https://www.tweaking4all.com/home-theatre/rename-my-tv-series-v2/