Page 1 of 1

Filebot scripting rename strict option

Posted: 29 Dec 2011, 21:22
by dougdeep
Some of my movies aren't getting matches using hashes. I'd like to fallback to using the filename for search when the hash doesn't work. To do this, I thought I'd set change the strict parameter. However, regardless of whether I use true or false, the console output still says it couldn't find a matching hash.

Do I understand the strict option correctly? Is it not working right for me?

Thanks.

Edit: Running version 2.3, debian package.

Re: Filebot scripting rename strict option

Posted: 30 Dec 2011, 02:01
by rednoah
hash is always the first options, but right now in console mode there is no auto-detection based on folder/filename, instead the query for text search has to be specified.

But if you know that the parent folder is the name of the movie, then you can script that:

Code: Select all

args.eachMediaFolder { dir ->
	rename(folder:dir, db:'opensubtitles', query:dir.name, strict:false)
}
I'll add automatic folder/file name lookup in -non-strict mode for next release. But this script will still be the saver options since FileBot can't just assume the parent folder name or the file name is in fact the movie name.

Re: Filebot scripting rename strict option

Posted: 30 Dec 2011, 04:08
by dougdeep
Thanks good to know. And you're right, it usually isn't the movie name by itself. It's usually a mashup of year, video format, etc. Maybe what I was imagining isn't possible.

Maybe an interactive option is the way to go, prompting for name if hash isn't matched. I can write that into my groovy script.

Re: Filebot scripting rename strict option

Posted: 30 Dec 2011, 07:14
by rednoah
It's easy to do if you can assume all that. You know the filename is the movie name than again it's easy to clean that up and use as query. But it's really hard do auto-detect without knowledge of your structure.

Re: Filebot scripting rename strict option

Posted: 30 Dec 2011, 20:11
by rednoah
Check out the latest revision. Rewrote the movie lookup logic, should work as one would expect now:

http://sourceforge.net/projects/filebot ... ebot/HEAD/

Re: Filebot scripting rename strict option

Posted: 12 Jan 2012, 02:51
by dougdeep
Tried 2.4, but I'm getting an NPE now with the CLI.


NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at java.util.Arrays.fill(Arrays.java:2696)
at net.sourceforge.filebot.cli.CmdlineOperations.renameMovie(Unknown Source)
at net.sourceforge.filebot.cli.CmdlineOperations.rename(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)

Removing delimiters in my title query (space, dot, etc) avoid the NPE, but produces no results, as you'd expect.

Re: Filebot scripting rename strict option

Posted: 12 Jan 2012, 03:57
by rednoah
Ups. Might have introduced a bug there. Maybe using a different data source can work around this problem. Not sure, I'll look into this when I come back from travelling.

Re: Filebot scripting rename strict option

Posted: 14 Jan 2012, 17:49
by dougdeep
Thanks, hoping to find a chance to bring the source into my IDE as well.

Re: Filebot scripting rename strict option

Posted: 15 Jan 2012, 01:15
by rednoah
dougdeep wrote:Thanks, hoping to find a chance to bring the source into my IDE as well.
Shouldn't be a problem. After you checkout trunk you got all sources and dependencies an the ant build will work right out of the box.