Seedbox automation with
Mac running
Resilio Sync,
Hazel and
Filebot
I discovered that the synced files are hidden before completly downloaded in a
.sync folder if they are video files. Don't use FOLDERS when syncing - process doesn't work with Plex ready directories.
Setup uses:
Seedbox requires: Torrent client, Filebot, Resilo Sync
Apple computer (Mac Mini) requires: Hazel, Resilio Sync and Filebot to be installed.
Hazel:
https://www.noodlesoft.com
Meta-Data issue:
Im predominately using Plex for meta data so if you have cover art and dedicated extras this might not be a good solution for you.
Step 1: (on Seedbox)
On the Seedbox I have Filebot scripts running on torrent completion for:
1) Transmission (Manual torrents)
2) ruTorrent for RSS feeds
Both export on completion to a Filebot script that organises in to dedicated directories on the seedbox.
This is where I name the files without folders ie Film (1999) or TV Show (2000) -> Season 1 etc.
Filebot Script I am using is --action copy so I can continue seeding (not using Symlink)
Step 2: (on Seedbox)
Setup Resilio sync folder for all the Plex folders where Filebot has added the files. Have these set up as default Sync (not selective)
Step 3: (on Apple computer)
1) Add the same folders following names from Seedbox for the ones I want to sync to Apple Mac Mini.
2) Add these Resilio directories/folders to Hazel
3 ) When the file completes it will become
visible and Hazel with apply the Filebot Script to the file/files. Resilio moves the file/files from the hidden directory/folder ".sync" and places it ready for Hazel to pickup. Hazel basically watches changes in folders.
4) As the folder is set up for Syncing (not selective sync) on the Apple Mac: The files moved by Filebot are also deleted off the Seedbox automatically by Resilio Sync.
5) I turned my Archive Sync
OFF on both Seedbox and remote Apple Mac Mini

You can also limit the archive days instead in Power user setting with:

"Alternatively, to limit the length of time (number of days) files are kept in the archive, change the value of "sync_trash_ttl" (the default is 30 days)"
https://forum.resilio.com/topic/31562-d ... ment=90503
4) Filebot Scripts are:
Seedbox - ruTorrent:
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 copy --conflict auto \
--def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : fn =~ /3D|3d|HSBS|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y}) - {s3d} {hd} {vc} {vf}{' CD'+pi}{'.'+lang}" \
--def "seriesFormat={fn =~ /2160p|4K|4k|UHD/ ? 'TV Shows 4K' : fn =~ /1080p/ ? 'TV Shows HD' : 'TV Shows'}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {hd} - {vc} - {vf} - {t.replaceAll(/[\`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}{'.'+lang}" \
--def plex=http://seedboxIP:seedboxPort/library/sections/all/refresh?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx \
extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Seedbox - Transmission:
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="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
TORRENT_NAME="$TR_TORRENT_NAME"
TORRENT_LABEL="N/A"
# 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-transmission.log --action copy --conflict auto \
--def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : fn =~ /3D|3d|HSBS|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y}) - {s3d} {hd} {vc} {vf}{' CD'+pi}{'.'+lang}" \
--def "seriesFormat={fn =~ /2160p|4K|4k|UHD/ ? 'TV Shows 4K' : fn =~ /1080p/ ? 'TV Shows HD' : 'TV Shows'}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {hd} - {vc} - {vf} - {t.replaceAll(/[\`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}{'.'+lang}" \
--def plex=http://seedboxIP:seedboxPort/library/sections/all/refresh?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx \
extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Remote Apple Mac Mini - TV_FilebotPlex.sh
Code: Select all
filebot -script fn:amc "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/media/TV Shows" -non-strict --def music=y --action move --conflict auto --def subtitles=eng,pol,por --def "movieFormat={fn =~ /3D/ ? '3D Movies' : 'Movies'}/{n} ({y}) - {hd} {vc} {vf} {' CD'+pi}{'.'+lang}" --def seriesFormat="/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot/TV Shows/{n} - {s00e00} - {hd} {vc} {vf} - {t}{'.'+lang}" --def clean=y --output "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot" --log-file "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot/amc.log"
Remote Apple Mac Mini - Movies_FilebotPlex.sh
Code: Select all
filebot -script fn:amc "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/media/Movies" -non-strict --def music=y --action move --conflict auto --def subtitles=eng,pol,por --def "movieFormat={fn =~ /3D/ ? '3D Movies' : 'Movies'}/{n} ({y}) - {hd} {vc} {vf} {' CD'+pi}{'.'+lang}" --def seriesFormat="/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot/TV Shows/{n} - {s00e00} - {hd} {vc} {vf} - {t}{'.'+lang}" --def clean=y --output "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot" --log-file "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot/amc-movies.log"
Remote Apple Mac Mini - Movies3D_FilebotPlex.sh
Code: Select all
filebot -script fn:amc "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/media/Movies 3D" -non-strict --def music=y --action move --conflict auto --def subtitles=eng,pol,por --def "movieFormat={fn =~ /3D|3d|HSBS|3dhsbs|H-SBS|3dhou|H-OU/ ? '3D Movies' : 'Movies'}/{n} ({y})/{n} ({y}) - {s3d} {hd} {vc} {vf} {' CD'+pi}{'.'+lang}" --def seriesFormat="/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot/TV Shows/{n} - {s00e00} - {hd} {vc} {vf} - {t}{'.'+lang}" --def clean=y --output "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot" --log-file "/Volumes/Drobo/Resilio-Sync/UltraSeedbox/plexFilebot/amc-movies3d.log"