Anime/TV Show filtering

Any questions? Need some help?
Post Reply
tes2ube
Posts: 10
Joined: 03 Jul 2018, 18:07

Anime/TV Show filtering

Post by tes2ube »

Hello,

I've been recently attempting to grow in my FileBot Node knowledge. In my hopes to instruct FileBot Node to move files based on whether they are from an anime tv show (or movie), I tried to apply the approach of this post: viewtopic.php?t=11760. I have a lot of questions but I think I'm learning a little!

Basically, my objective is this: check the production country of an input. If it is from Japan, use the Plex naming convention, except that it gets moved to either "/Anime" or "/Anime Movies" instead of "TV Shows" or "Movies". Otherwise, move it to the latter.

1. am I right in thinking that the way the post is approaching this is through the format options?
2. or should I be using the Media Center Options > Run Program for custom stuff?

This is how far I got on my formatting: Format Options > Series Format:

Code: Select all

{info.productionCountries =~ /JP/ ? 'Anime' : 'TV Shows'}
which resulted in the difference in these two shows:

Code: Select all

[TEST] from [/volume1/homes/IamJacksHandle/Server Ops/TransmissionToFilebot/Completed/For.All.Mankind.S02E08.1080p.HEVC.x265-MeGusta[eztv.re].mkv] to [/volume1/homes/plex/TV Shows.mkv]
Processed 1 file
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/homes/IamJacksHandle/Server Ops/TransmissionToFilebot/Completed/My Hero Academia - S05E03 VOSTFR 1080p WEB x264 -NanDesuKa (ADN).mkv
* Consider using -non-strict to enable search by name and opportunistic matching
Rename episodes using [TheTVDB] with [Airdate]
Lookup via [My Hero Academia]
Fetching episode data for [My Hero Academia]
[TEST] from [/volume1/homes/IamJacksHandle/Server Ops/TransmissionToFilebot/Completed/My Hero Academia - S05E03 VOSTFR 1080p WEB x264 -NanDesuKa (ADN).mkv] to [/volume1/homes/plex/Anime.mkv]
Processed 1 file
progress, but not quite there. I understand that the 'Anime' and 'TV Shows' are essentially parameters, yes? I use Plex as my media server and thought to attempt to use

Code: Select all

{plex[1]}/{plex[3]}
as explained by this post: viewtopic.php?t=4116

I recognize that Plex will create a file object, but not sure how that may change things (I have a very as-needed understanding of coding). I know that using the {plex[1]}/{plex[3]} won't actually change where the file ends up exactly, but I think that it might help.

Am I on the right track? What argument would you suggest I use in the formatting to get this sorting working?

Thank you in advance!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Anime/TV Show filtering

Post by rednoah »

e.g.

Code: Select all

{anime ? "Anime" : "TV Shows"}/{plex.tail}
{anime} is a built-in binding that checks for the usual Anime heuristics, including but not limited to the one you propose above. ;)
:idea: Please read the FAQ and How to Request Help.
tes2ube
Posts: 10
Joined: 03 Jul 2018, 18:07

Re: Anime/TV Show filtering

Post by tes2ube »

This works wonderfully, thank you! will it also recognize if a movie is an "anime" movie if put this into the movie format?

Code: Select all

{anime ? "Anime Movies" : "Movies"}/{plex.tail}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Anime/TV Show filtering

Post by rednoah »

{anime} should work for movies as well, but perhaps not always if it's less popular ones.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Anime/TV Show filtering

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
Post Reply