AMC detection

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
jeff1326
Posts: 22
Joined: 25 Mar 2016, 16:00

AMC detection

Post by jeff1326 »

From the AMC script with this command :
filebot -script fn:amc --output "out" --action test -non-strict "in" --log-file amc.log --def excludeList=amc.txt
I get this result :
Anges et Demons tt0808151.avi [series: Demons, movie: Angels & Demons (2009)]
Unable to differentiate: [Anges et Demons tt0808151.avi] => [Demons] VS [Angels & Demons (2009)]
I expect the file to match only movie since the IMDB id is present. I think it's not from the AMC script since Filebot GUI on windows propose 3 movies (tt0089013, tt0068522, tt0808151).

I checked the code for the detection, but I never saw groovy language before this so it's hard to find a perfect solution without drawback.

I have over 1400 movies manually named with the IMDB id.
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC detection

Post by rednoah »

--def ut_label=movie should solve the problem. Check the manual for details.
:idea: Please read the FAQ and How to Request Help.
jeff1326
Posts: 22
Joined: 25 Mar 2016, 16:00

Re: AMC detection

Post by jeff1326 »

Yes this will work if i put only movie inside of this folder.
So i guess i need to force it to manage my existing movies folder.
I'll do that for them. Thanks.

But the advantage of using amc was to manage my download and move them on the correct folder depending on his type (Anime, movie, series). I expect to get a better detection if imdb id is present.

If i try a query from http://www.omdbapi.com/ with the imdb id, i get this response

Code: Select all

{
	"Title":"Angels & Demons",
	"Year":"2009",
	"Rated":"PG-13",
	"Released":"15 May 2009",
	"Runtime":"138 min",
	"Genre":"Mystery, Thriller",
	"Director":"Ron Howard",
	"Writer":"David Koepp (screenplay), Akiva Goldsman (screenplay), Dan Brown (novel)",
	"Actors":"Tom Hanks, Ewan McGregor, Ayelet Zurer, Stellan Skarsgård",
	"Plot":"Harvard symbologist Robert Langdon works to solve a murder and prevent a terrorist act against the Vatican.",
	"Language":"English, Italian, Latin, French, Swiss German, German, Chinese",
	"Country":"USA, Italy",
	"Awards":"1 win & 5 nominations.",
	"Poster":"http://ia.media-imdb.com/images/M/MV5BMjEzNzM2MjgxMF5BMl5BanBnXkFtZTcwNTQ1MTM0Mg@@._V1_SX300.jpg",
	"Metascore":"48",
	"imdbRating":"6.7",
	"imdbVotes":"200,301",
	"imdbID":"tt0808151",
	"Type":"movie",
	"Response":"True"
}
We can see than we have a type "movie'. So we may add a validation of the file type in the code at https://github.com/svn2github/filebot/b ... .java#L600 like this

Code: Select all

if (movie != null && movie.type == 'movie' ) {
	options.add(movie);
}
Maybe it's better to add validation here
https://github.com/svn2github/filebot/b ... .java#L140

Code: Select all

			MovieInfo info = getMovieInfo(id, locale, false);
			if (info != null && info.type == 'movie' ) {
				String name = info.getName();
				String[] aliasNames = info.getOriginalName() == null || info.getOriginalName().isEmpty() || info.getOriginalName().equals(name) ? new String[0] : new String[] { info.getOriginalName() };
				int year = info.getReleased() != null ? info.getReleased().getYear() : id.getYear();
				int tmdbid = info.getId();
				int imdbid = info.getImdbId() != null ? info.getImdbId() : -1;
				return new Movie(name, aliasNames, year, imdbid, tmdbid, locale);
			}
So we won't get a movie proposition for a tv file.

To avoid than we don't get a tv proposition for a movie.
If a imdb id is present, we should not try others detection if thetvdb returns empty data.
http://thetvdb.com/api/GetSeriesByRemot ... =tt0988824
vs
http://thetvdb.com/api/GetSeriesByRemot ... =tt0808151

This project is amazing ! I love the concept and how it's made too !
Needs just some tweaks for detection ;)
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC detection

Post by rednoah »

On second thought, forceMovie in the amc script already had a check for /tt\d{7}/ except it was broken. Fixed now, so you can try dev:amc and give it a spin.
:idea: Please read the FAQ and How to Request Help.
jeff1326
Posts: 22
Joined: 25 Mar 2016, 16:00

Re: AMC detection

Post by jeff1326 »

With the command

Code: Select all

filebot -script dev:amc --output "out" --action test -non-strict "in" --log-file amc.log --def excludeList=amc.txt
The file named "Anges et Demons tt0808151.avi" is correctly detected as a movie.
jeff1326
Posts: 22
Joined: 25 Mar 2016, 16:00

Re: AMC detection

Post by jeff1326 »

Do you plan to add the validation like i proposed ?
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC detection

Post by rednoah »

Do you have any logs that show that this is actually an issue? The changes you suggest probably wouldn't affect amc behaviour.
:idea: Please read the FAQ and How to Request Help.
jeff1326
Posts: 22
Joined: 25 Mar 2016, 16:00

Re: AMC detection

Post by jeff1326 »

The AMC should not be in problem if the function getMovieInfo from the TMDbClient.java return only information about a movie. That's just a security ! That's strange behaviour to ask about information for a movie and getting an anime or tv show information.

I think i saw this problem too with Filebot GUI, but i am not sure. I'll need to show you a case, i'll get information you need the next time. If this occurs again of course.
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC detection

Post by rednoah »

TheMovieDB will give you a 404 if you try to lookup a non-movie imdb. If you use OMDb than it's gonna be as if that series is a movie, but if you process episode files in movie mode then the results will always be a mess, so at that point it doesn't matter.

I *highly* recommend using TheMovieDB, and I *strongly* discourage using OMDb for renaming movies.
:idea: Please read the FAQ and How to Request Help.
jeff1326
Posts: 22
Joined: 25 Mar 2016, 16:00

Re: AMC detection

Post by jeff1326 »

Cool ! Thank you for your answer :mrgreen:
Post Reply