Currently running this .bat file
Code: Select all
@ECHO OFF
setlocal enableextensions enabledelayedexpansion
:: Media file processing script for Filebot
:: This script gets triggered by some means (inotify, auditd, cron, etc.) and processes media files in some locations.
:: It will run the filebot amc.groovy script against these files and output them into user defined locations.
:: CLI Stuff http://www.filebot.net/cli.html
:: Set up some logging
set LOGDIR=C:/Users/JourneyOver/Dropbox/Public/Folders/Filebot/logs
:: Base destinations to move files, no trailing slash. The subfolder is defined in the format string.
set DESTINATION=D:/Shows
:: Passing Args from Qbittorrent
set TORRENT_NAME="%1"
set TORRENT_PATH="%2"
::set TORRENT_LABEL="%3"
:: Rename action i.e: move | copy | keeplink | symlink | hardlink
set ACTION=move
:: Conflict resolution i.e: override | skip | fail
set CONFLICT=override
:: Episode filtering
set FILTERPATH=@/C:/Users/JourneyOver/Desktop/Other/filter.txt
:: Process music files
set MUSIC=false
:: Download subtitles for the given languages i.e: en | de | fr
set SUBTITLES=en
:: Fetch artwork/nfo
set ARTWORK=false
:: Generate *.url files and fetch all available backdrops
set EXTRAS=false
:: Tell the given Kodi/XBMC instance to rescan it's library
::Set KODI=host[:port]
:: Tell the given Plex instance to rescan it's library. Plex Home instances require an authentication token
::set PLEX=localhost
:: Tell the given Emby instance to rescan it's library
::set EMBY=host:apikey
:: Save reports to local filesystem
set STOREREPORT=false
:: Do not extract archives
set SKIPEXTRACT=false
:: Automatically remove empty folders and clutter files that may be left behind after moving the video files, or temporary extracted files after copying
set CLEAN=true
:: Delete archives after extraction
set DELETEAFTEREXTRACT=true
:: Format path and strings for filebot, please see: http://www.filebot.net/naming.html
set FORMATPATH=@/C:/Users/JourneyOver/Dropbox/Public/Folders/Filebot/MyStuff/Formatting.txt
:: Run filebot script
filebot -script fn:amc ^
--output "%DESTINATION%" ^
--log-file "%LOGDIR%/filebot-amc.log" ^
--action %ACTION% ^
--conflict %CONFLICT% ^
-non-strict ^
-no-xattr ^
--filter ^
%FILTERPATH% ^
--def ^
ut_dir=%TORRENT_PATH% ^
ut_kind=multi ^
ut_title=%TORRENT_NAME% ^
excludeList="%LOGDIR%/filebot-history.log" ^
music=%MUSIC% ^
subtitles=%SUBTITLES% ^
artwork=%ARTWORK% ^
extras=%EXTRAS% ^
storeReport=%STOREREPORT% ^
skipExtract=%SKIPEXTRACT% ^
clean=%CLEAN% ^
deleteAfterExtract=%DELETEAFTEREXTRACT% ^
--def ^
%FORMATPATH%
Code: Select all
age < 30 || !(defines.ut_title =~ /(?i)American.Dad/) && !readLines('C:/Users/JourneyOver/Desktop/Other/excludes.txt').contains(n)
Code: Select all
Doctor Who
The Librarians
Code: Select all
age < 30 || !(defines.ut_title =~ /(?i)American.Dad/)
Code: Select all
Failed to match files to episode data
Code: Select all
&& !readLines('C:/Users/JourneyOver/Desktop/Other/excludes.txt').contains(n)

example log of when I ran it for Doctor Who
Code: Select all
Run script [fn:amc] at [Mon Dec 19 22:40:52 CST 2016]
Parameter: ut_dir = C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV
Parameter: ut_kind = multi
Parameter: ut_title = Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV
Parameter: excludeList = C:/Users/JourneyOver/Dropbox/Public/Folders/Filebot/logs/filebot-history.log
Parameter: music = false
Parameter: subtitles = en
Parameter: artwork = false
Parameter: extras = false
Parameter: storeReport = false
Parameter: skipExtract = false
Parameter: clean = true
Parameter: deleteAfterExtract = true
Parameter: seriesFormat = /TV Shows/{N}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{N.replaceTrailingBrackets()} - {episode.special ? 'S00E'+special.pad(2) : S00E00} - {T.replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
Parameter: animeFormat = /Anime/{N}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{N.replaceTrailingBrackets()} - {episode.special ? 'S00E'+special.pad(2) : S00E00} - {T.replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
Parameter: movieFormat = /Movies/{N} [{y}]/{N.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’ʻ]/, "'").lowerTrail()} [{y}]
Use excludes: C:\Users\JourneyOver\Dropbox\Public\Folders\Filebot\logs\filebot-history.log
Ignore extra: C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\Sample
Read archive [doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.rar] and extract to [C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV]
Extracting files [C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.mkv]
Input: C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.mkv
Group: [tvs:doctor who 2005] => [doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Fetching [English] subtitles [Doctor.Who.2005.S09E12.Hell.Bent.720p.HDTV.x264-FoV.srt] from [OpenSubtitles]
Export [Doctor.Who.2005.S09E12.Hell.Bent.720p.HDTV.x264-FoV.srt] as [SubRip / UTF-8]
Writing [Doctor.Who.2005.S09E12.Hell.Bent.720p.HDTV.x264-FoV.srt] to [doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.eng.srt]
Rename episodes using [TheTVDB]
Auto-detected query: [Doctor Who 2005]
Fetching episode data for [Doctor Who (2005)]
Fetching episode data for [Doctor Who (2009)]
Fetching episode data for [Doctor Who]
Apply Filter: {age < 30 || !(defines.ut_title =~ /(?i)American.Dad/) && !readLines('C:/Users/JourneyOver/Desktop/Other/excludes.txt').contains(n)}
No matching episode: doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.eng.srt
Auto-detected query: [Doctor Who 2005]
Fetching episode data for [Doctor Who (2005)]
Fetching episode data for [Doctor Who (2009)]
Fetching episode data for [Doctor Who]
Apply Filter: {age < 30 || !(defines.ut_title =~ /(?i)American.Dad/) && !readLines('C:/Users/JourneyOver/Desktop/Other/excludes.txt').contains(n)}
No matching episode: doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.mkv
Failed to match files to episode data
Delete archive C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.rar
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r00
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r01
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r02
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r03
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r04
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r05
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r06
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r07
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r08
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r09
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r10
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r11
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r12
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r13
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r14
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r15
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r16
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r17
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r18
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r19
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r20
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r21
Delete archive volume C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-fov.r22
Clean clutter files and empty folders
Delete C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\Sample\doctor_who_2005.9x12.hell_bent.720p_hdtv_x264-sample-fov.mkv
Delete C:\Users\JourneyOver\Desktop\QBT\Doctor_Who_2005.9x12.Hell_Bent.720p_HDTV_x264-FoV\Sample
Finished without processing any files
Failure (°_°)