Detect different media types automatically

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
tresi
Posts: 13
Joined: 30 Jun 2019, 15:51

Detect different media types automatically

Post by tresi »

Hello,

can Filebot detect different media types automatically or do I have to decide myself if the input is a TV show, a movie, even perhaps Documentation, Sports and so on? Are there small hints in the naming of files and folders or maybe some content to read from given nfo-files?

[edit]
TV shows can be detected very simple by checking regex pattern like (S\d{1,2}E\d{1,2}|\d{1,2}x\d{1,2}) but for the other cases I have not really a good idea. Of course can this only work if the source is reasonably named.
[/edit]

Is there a common regex pattern which is used for this? I think, the AMC-Script must have something like this included or I am wrong?

I don't understand the complex scripts so I want to write my own. In case of errors I know exactly what to do and can customize better for my fittings.

Thanks in advance.

Kind regards,
tresi
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Detect different media types automatically

Post by rednoah »

You can use the File.isEpisode() and File.isMovie() extension methods.


Here's the API docs for that:
https://www.filebot.net/docs/api/net/fi ... a.io.File)


EDIT

:idea: There's no are helpers to check for Documentaries, Sports, etc.
:idea: Please read the FAQ and How to Request Help.
tresi
Posts: 13
Joined: 30 Jun 2019, 15:51

Re: Detect different media types automatically

Post by tresi »

Thank you for your very fast and competent support. I will give it a try :-)

What do you mean with "There's are helpers to check for documentaries, Sports, etc."?
Which helpers, where are they. I cannot find anything... ;-)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Detect different media types automatically

Post by rednoah »

tresi wrote: 26 Jul 2019, 14:35 What do you mean with "There's are helpers to check for documentaries, Sports, etc."?
Which helpers, where are they. I cannot find anything... ;-)
Sorry, I don't mean what what auto-complete ended up typing. :lol:

There are NO helpers for auto-detecting documentaries, sports, etc.
:idea: Please read the FAQ and How to Request Help.
tresi
Posts: 13
Joined: 30 Jun 2019, 15:51

Re: Detect different media types automatically

Post by tresi »

I have to open my eyes when I read. It can't be any better visible. Sorry for that ;-)

I don't understand how I can use the functions File.isMovie and File.isEpisode in my command line.

filebot --isMovie -rename ...?

Do you have an example?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Detect different media types automatically

Post by rednoah »

1.
Note that filebot command-line calls is not the same as filebot scripting.

CLI:
https://www.filebot.net/cli.html

Scripting:
https://www.filebot.net/script.html


2.
If you want to call FileBot, but somehow limit input to files that look like they might be movies, then you can use the --filter option for that:

Code: Select all

--filter "f.movie"
If you just want to force movie rename mode, then you can use the appropriate --db option:

Code: Select all

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