Little bit of script help (I want to omit all except TV shows)

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
alanbaker
Posts: 5
Joined: 30 Jul 2018, 14:08

Little bit of script help (I want to omit all except TV shows)

Post by alanbaker »

This is the script I managed to bolt together, it works perfectly for tv shows they all go in the correct folder, get subtitles and plex refreshes.
However I cannot figure out how to get this to run only for tv shows, it unpacks and creates a new folder for films.
If anyone could modify the script and submit I would be grateful.

Code: Select all

"C:\Program Files\FileBot\filebot.launcher.exe" -script fn:amc --def seriesFormat="V:/TV Shows/{n}/{'Season '+s.pad(1)}/{n}.{s00e00}.{t}" --log-file "V:\amc.log" --action copy --conflict fail -non-strict --def music=n --def plex=192.168.10.*:* --def clean=y subtitles=en artwork=n "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Successful processing of a tv show, log file

Code: Select all

Run script [fn:amc] at [Tue Aug 21 05:00:27 BST 2018]
Parameter: seriesFormat = V:/TV Shows/{n}/{'Season '+s.pad(1)}/{n}.{s00e00}.{t}
Parameter: music = n
Parameter: plex = *****
Parameter: clean = y
Parameter: subtitles = en
Parameter: artwork = n
Parameter: ut_label = Revolution
Parameter: ut_state = 5
Parameter: ut_title = Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS
Parameter: ut_kind = multi
Parameter: ut_file = better.call.saul.s04e03.720p.hdtv.x264-killers.nfo
Parameter: ut_dir = C:\\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS
Read archive [better.call.saul.s04e03.720p.hdtv.x264-killers.rar] and extract to [C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS]
Extracting files [C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS.mkv]
Input: C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS.mkv
Group: [tvs:better call saul] => [Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Better Call Saul]
Fetching episode data for [Better Call Saul]
[COPY] From [C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS.mkv] to [V:\TV Shows\Better Call Saul\Season 4\Better Call Saul.S04E03.Something Beautiful.mkv]
Processed 1 files
Notify Plex: [host:192.168.10.*, token:*]
GET: http://192.168.10.*:32400/library/sections/all/refresh?X-Plex-Token=*
Clean temporary extracted files
Delete C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS.mkv
Delete C:\Downloads\Better.Call.Saul.S04E03.720p.HDTV.x264-KILLERS\better.call.saul.s04e03.720p.hdtv.x264-killers
Done ヾ(@⌒ー⌒@)ノ
Processing of a film I want to cease, log file

Code: Select all

Run script [fn:amc] at [Thu Aug 16 16:42:36 BST 2018]
Parameter: seriesFormat = V:/TV Shows/{n}/{'Season '+s.pad(1)}/{n}.{s00e00}.{t}
Parameter: music = n
Parameter: plex = *****
Parameter: clean = y
Parameter: subtitles = en
Parameter: artwork = n
Parameter: ut_label = 
Parameter: ut_state = 5
Parameter: ut_title = Upgrade.2018.1080p.BluRay.x264-DRONES
Parameter: ut_kind = multi
Parameter: ut_file = readme.txt
Parameter: ut_dir = C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES
Ignore extra: C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\upgrade.2018.1080p.bluray.x264-drones.sample.mkv
Input: C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\upgrade.2018.1080p.bluray.x264-drones.mkv
upgrade.2018.1080p.bluray.x264-drones.mkv [series: upgrade 2018, movie: Upgrade (2018)]
Exclude Series: upgrade 2018
Group: [tvs:null, mov:upgrade 2018] => [upgrade.2018.1080p.bluray.x264-drones.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Fetching [English] subtitles [Upgrade.2018.1080p.BluRay.x264-DRONES.srt] from [OpenSubtitles]
Export [Upgrade.2018.1080p.BluRay.x264-DRONES.srt] as [SubRip / UTF-8]
Writing [Upgrade.2018.1080p.BluRay.x264-DRONES.srt] to [upgrade.2018.1080p.bluray.x264-drones.eng.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\upgrade.2018.1080p.bluray.x264-drones.mkv]
[COPY] From [C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\upgrade.2018.1080p.bluray.x264-drones.mkv] to [C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\Movies\Upgrade (2018)\Upgrade (2018).mkv]
[COPY] From [C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\upgrade.2018.1080p.bluray.x264-drones.eng.srt] to [C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\Movies\Upgrade (2018)\Upgrade (2018).eng.srt]
Processed 2 files
Notify Plex: [host:192.168.10.*, token:*]
GET: http://192.168.10.*:32400/library/sections/all/refresh?X-Plex-Token=*
Clean temporary extracted files
Delete C:\Downloads\Upgrade.2018.1080p.BluRay.x264-DRONES\upgrade.2018.1080p.bluray.x264-drones.eng.srt
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Little bit of script help (I want to omit all except TV shows)

Post by rednoah »

The amc script does not support omitting non-TV files. You might be able to use the --def ignore options though to achieve what you want.

e.g. --def ignore="MyMovies" will make sure that any files that contain "MyMovies" in the file path will be ignored completely right from the beginning.

You may need to change you setup and ensure that TV / Movies are downloaded into separate TV / Movies folders so you can easily ignore one of them via the ignore option.
:idea: Please read the FAQ and How to Request Help.
Post Reply