Filebot scripting rename strict option

Any questions? Need some help?
Post Reply
dougdeep
Posts: 4
Joined: 29 Dec 2011, 21:20

Filebot scripting rename strict option

Post 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.
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot scripting rename strict option

Post 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.
:idea: Please read the FAQ and How to Request Help.
dougdeep
Posts: 4
Joined: 29 Dec 2011, 21:20

Re: Filebot scripting rename strict option

Post 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.
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot scripting rename strict option

Post 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.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot scripting rename strict option

Post 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/
:idea: Please read the FAQ and How to Request Help.
dougdeep
Posts: 4
Joined: 29 Dec 2011, 21:20

Re: Filebot scripting rename strict option

Post 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.
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot scripting rename strict option

Post 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.
:idea: Please read the FAQ and How to Request Help.
dougdeep
Posts: 4
Joined: 29 Dec 2011, 21:20

Re: Filebot scripting rename strict option

Post by dougdeep »

Thanks, hoping to find a chance to bring the source into my IDE as well.
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot scripting rename strict option

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply