Page 1 of 1

Detect different media types automatically

Posted: 25 Jul 2019, 21:18
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

Re: Detect different media types automatically

Posted: 26 Jul 2019, 05:14
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.

Re: Detect different media types automatically

Posted: 26 Jul 2019, 14:35
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... ;-)

Re: Detect different media types automatically

Posted: 26 Jul 2019, 14:46
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.

Re: Detect different media types automatically

Posted: 04 Aug 2019, 15:57
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?

Re: Detect different media types automatically

Posted: 04 Aug 2019, 16:59
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