Filter movie by year

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
edenexposito
Posts: 21
Joined: 10 Sep 2013, 06:08

Filter movie by year

Post by edenexposito »

Hi!

I have a file named "Movie 43.mkv" when i launch filebot command line to name correctly...

Code: Select all

filebot -rename "Movie 43.mkv" --db TheMovieDB --filter "y > 2010" -non-strict 
filebot rename the file like "Tegeran-43 (1980).mkv" instead "Movie 43 (2013).mkv" seems that code --filter "y > 2010" non work correctly or i dont know how use it. I supose that --filter "y > 2010" only return movies from 2010 to beyond

Someone can help me?

Thanks!!
User avatar
rednoah
The Source
Posts: 22979
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter movie by year

Post by rednoah »

The --filter option is currently not supported for movie mode, only used in episode mode.

It's not working because it's not my index while at the same time the Movie keyword being blocked. I'll fix that.
:idea: Please read the FAQ and How to Request Help.
edenexposito
Posts: 21
Joined: 10 Sep 2013, 06:08

Re: Filter movie by year

Post by edenexposito »

In next release? v3.63
User avatar
rednoah
The Source
Posts: 22979
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter movie by year

Post by rednoah »

Just data files. It'll magically work by tomorrow, regardless of --filter
:idea: Please read the FAQ and How to Request Help.
edenexposito
Posts: 21
Joined: 10 Sep 2013, 06:08

Re: Filter movie by year

Post by edenexposito »

Perfect i will try it!.

Another question is rename files from one language to another. An example, with this file named in spanish "Juego de Tronos - 2x01 - El Norte no olvida.mkv" if i want convert to english name "Game of Thrones 2x01 - The North Remembers.mkv" i try use

Code: Select all

filebot -rename "Juego de Tronos - 2x01 - El Norte no olvida.mkv" --db TheTVDB --lang en -non-strict
But no luck, "--lang en" must translate it?

thanks again
User avatar
rednoah
The Source
Posts: 22979
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter movie by year

Post by rednoah »

--lang en sets all to English (which is default anyway). But if filebot speaks english it won't be able to make sense of the filename which is spanish.

This is what you need:

Code: Select all

--q "game of thrones"
Help filebot what to search for. Alternatively you can set --lang es which will make lookup work but things are gonna be spanish.
:idea: Please read the FAQ and How to Request Help.
edenexposito
Posts: 21
Joined: 10 Sep 2013, 06:08

Re: Filter movie by year

Post by edenexposito »

Its possible that files downloades was named in multiples languages (native and english in most cases). In the case of Game of Thrones if i have some like this "Juego de Tronos - 2x01 - El Norte..blablablablabla.mkv" when i write

Code: Select all

filebot -rename "Juego de Tronos - 2x01 - El Norte..blablablablabla.mkv" --db TheTVDB --lang es -non-strict
Filebot rename perfect as "Juego de Tronos - 2x01 - El Norte no olvida.mkv", but its possible that the next chapter downloaded was name as "Game of Thrones - 2x02 -blablablabla.mkv"

Code: Select all

filebot -rename "Game of Thrones - 2x02 -blablablabla.mkv" --db TheTVDB --lang es -non-strict
Will not work due to "--lang es", i must choise manually "-lang es" or "-lang en" to rename correctly. The question is, its possible search in es & en at same time to avoid writte "--lang es" or "--lang en"???

For me, a clean name is correct in both languages, furthermore i can convert the words "Juego de Tronos" to "Game of thrones" with others programs to help to filebot found the correct name in English in a second pass

Thanks!!
User avatar
rednoah
The Source
Posts: 22979
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter movie by year

Post by rednoah »

Then we're back to this, except it's all gonna have to be GoT episodes:

Code: Select all

--q "game of thrones"
For more complicated logic you'll have to start with some minimal scripting, e.g. like this:
http://www.filebot.net/forums/viewtopic ... =280#p1135

EDIT: Just tested, it's working, even with --lang es and English file names:
http://snag.gy/ll1B4.jpg
:idea: Please read the FAQ and How to Request Help.
edenexposito
Posts: 21
Joined: 10 Sep 2013, 06:08

Re: Filter movie by year

Post by edenexposito »

Trying filename "The host (El huesped) [BR][DUAL][m-1080p].mkv" with

Code: Select all

filebot -rename "The host (El huesped) [BR][DUAL][m-1080p].mkv" --db TheMovieDB -non-strict --lang en --filter "y > 2005"
Return The Host (2013) Correct! :D

but with --lang es...

Code: Select all

filebot -rename "The host (El huesped) [BR][DUAL][m-1080p].mkv" --db TheMovieDB -non-strict --lang es --filter "y > 2005"
Return The Host (1960) Incorrect! :(

In database seems appear (The Host (1960), The Host (2006), The Host (2013)...)

Now testing to get 1960 version with this code (--lang en)

Code: Select all

filebot -rename "The host (El huesped) [BR][DUAL][m-1080p].mkv" --db TheMovieDB -non-strict --lang en --filter "y < 2005"
Return The Host (2013) Incorrect! :o

Filter is working?

Thanks
User avatar
rednoah
The Source
Posts: 22979
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter movie by year

Post by rednoah »

FileBot is doing lots of internal ranking and looking for the optimal result. If it's working with English filename but Spanish database result it's gonna be less reliable.

Then after the first rename the file is tagged. So previous rename operations affect future rename operations. So if it works first it'll always work later on. Use --action test to avoid this during testing and use the xattr clear script to delete xattr metadata.

PS: Filter is completely ignored in movie mode.

EDIT: --filter is supported in movie mode with r1720 and above
:idea: Please read the FAQ and How to Request Help.
edenexposito
Posts: 21
Joined: 10 Sep 2013, 06:08

Re: Filter movie by year

Post by edenexposito »

I have testted next commands to clean xattr (i never used it, sorry)

Code: Select all

/Applications/FileBot.app/Contents/MacOS/filebot -script "/Users/xxx/Downloads/xattr.groovy" fn:xattr --action clear "/Volumes/DATOS/The host (El huesped) [BR][DUAL][m-1080p].mkv"
And filebot return me:

Code: Select all

FileNotFoundException: /Users/xxx/fn:xattr
java.io.FileNotFoundException: /Users/xxx/fn:xattr
	at Script2$_run_closure13.doCall(Script2.groovy:24)
	at Script2$_run_closure14_closure87.doCall(Script2.groovy:25)
	at Script2$_run_closure14.doCall(Script2.groovy:25)
	at Script3.run(Script3.groovy:3)
	at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
	at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
	at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
	at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (?_?)
With this code i have the same problem:

Code: Select all

/Applications/FileBot.app/Contents/MacOS/filebot -script fn:xattr --action clear "/Volumes/DATOS/The host (El huesped) [BR][DUAL][m-1080p].mkv"
xattr.groovy contains default

Code: Select all

// filebot -script fn:xattr --action clear /path/to/files

args.getFiles{ it.xattr.size() > 0 }.each{
	println it
	it.xattr.each{ k, v ->
		println "\t$k: $v"
	}
	// clear xattr mode
	if (_args.action == 'clear') {
		it.xattr.clear()
		println '*** CLEARED ***'
	}
}
When you say...
--filter is supported in movie mode with r1720 and above
How i know what is my version? (I have downloaded 3.62) Where i can download r1720?

Thanks!
User avatar
rednoah
The Source
Posts: 22979
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter movie by year

Post by rednoah »

It's either local script:

Code: Select all

-script "/Users/xxx/Downloads/xattr.groovy"
or remote script:

Code: Select all

-script fn:xattr
You're passing in fn:xattr as file argument.

EDIT: Last question is in the FAQ ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply