Force FileBot to choose a particular series

Any questions? Need some help?
Post Reply
priits
Posts: 4
Joined: 09 Mar 2013, 17:25

Force FileBot to choose a particular series

Post by priits »

At times FileBot CLI seems to consistently choose a wrong series for the basis of renaming the episodes. Is there any way possible to force it to choose from a particular series even though its automatic choice would be different?

Case in point:

Code: Select all

# filebot --action hardlink --db tvrage --output *** --format "{n}/{n} - {sxe} - {t}" -rename ***/* --q "Life on Mars (UK)"
Rename episodes using [TVRage]
Exception: Failed to auto-select search result: [Life on Mars (UK), Life on Mars (US), Life on Top, Life (UK), Life in a Cottage Garden with Carol Klein, Cover Me: Based on the True Life of an FBI Family, Life on a Stick, Life on Earth, Life on Fire, Life on a Wire, Life Begins at Forty (UK), Life as We Know It (UK), Life on the Line, The Secret Life of the American Teenager, Life (US), The Suite Life of Zack and Cody, Veronica Mars, The Suite Life on Deck, Life Unexpected, Life with Derek]
java.lang.Exception: Failed to auto-select search result: [Life on Mars (UK), Life on Mars (US), Life on Top, Life (UK), Life in a Cottage Garden with Carol Klein, Cover Me: Based on the True Life of an FBI Family, Life on a Stick, Life on Earth, Life on Fire, Life on a Wire, Life Begins at Forty (UK), Life as We Know It (UK), Life on the Line, The Secret Life of the American Teenager, Life (US), The Suite Life of Zack and Cody, Veronica Mars, The Suite Life on Deck, Life Unexpected, Life with Derek]
	at net.sourceforge.filebot.cli.CmdlineOperations.selectSearchResult(Unknown Source)
	at net.sourceforge.filebot.cli.CmdlineOperations$1.call(Unknown Source)
	at net.sourceforge.filebot.cli.CmdlineOperations$1.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Failure (°_°)
As you can see from the output, it sees the series name from TVRage but for some reason does not use it and errors out.
If I try with -non-strict, then this happens:

Code: Select all

# filebot --action hardlink --db tvrage --output *** --format "{n}/{n} - {sxe} - {t}" -rename ***/* --q "Life on Mars (UK)" -non-strict
Rename episodes using [TVRage]
Fetching episode data for [Life on Mars (UK)]
Fetching episode data for [Life on Mars (US)]
[HARDLINK] Rename [***] to [***/Life on Mars (US)/Life on Mars (US) - 1x01 - Out Here in the Fields.mkv]
--- snip ---
Processed 8 files
Done ヾ(@⌒ー⌒@)ノ
I know for a fact that the series is actually the UK version, but for some reason it still insists that it is the US one and renames accordingly.

Is there any way to fix this?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force FileBot to choose a particular series

Post by rednoah »

1.
Send me the paths so I can have a look what's happening.

2.
Pass in a --filter expression => http://www.filebot.net/forums/viewtopic ... 1916#p1916
:idea: Please read the FAQ and How to Request Help.
priits
Posts: 4
Joined: 09 Mar 2013, 17:25

Re: Force FileBot to choose a particular series

Post by priits »

1. Paths sent.
2. I'm not sure about the query syntax, "n ==~ /Life on Mars (UK)/" didn't really do anything.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force FileBot to choose a particular series

Post by rednoah »

This works:

Code: Select all

--q "life on mars" --filter "n =~ /UK/"
:idea: Please read the FAQ and How to Request Help.
priits
Posts: 4
Joined: 09 Mar 2013, 17:25

Re: Force FileBot to choose a particular series

Post by priits »

It does not :(

Code: Select all

# filebot --action hardlink --db tvrage --output *** --format "{n}/{n} - {sxe} - {t}" -rename ***/* --q "life on mars" --filter "n =~ /UK/"
Rename episodes using [TVRage]
Exception: Failed to auto-select search result: [Life on Mars (US), Life on Mars (UK), Cover Me: Based on the True Life of an FBI Family, Life on Earth, Life on Fire, The Secret Life of the American Teenager, Homicide: Life on the Street, Life on Top, Kathy Griffin: My Life on the D-List, Life After People: The Series, Life of Ryan, Life Goes On, The Fabulous Life Presents: My Big Fat Fabulous Wedding, Life in a Cottage Garden with Carol Klein, Life on a Stick, Life After People, Life Is Great With Brooke Burke, Stephen Fry – The Secret Life Of The Manic Depressive, Hidden Howie: The Private Life of a Public Nuisance, Life After Top Chef]
Version (if it helps)

Code: Select all

# filebot -version
FileBot 3.4 (r1467) / OpenJDK Runtime Environment 1.7.0_15 (headless)
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force FileBot to choose a particular series

Post by rednoah »

You still need -non-strict

Code: Select all

--q "life on mars" --filter "n =~ /UK/" -non-strict
--q => get all episode data for a given search term (still needs -non-strict if there's more than one option)
--filter => select episodes
:idea: Please read the FAQ and How to Request Help.
priits
Posts: 4
Joined: 09 Mar 2013, 17:25

Re: Force FileBot to choose a particular series

Post by priits »

This worked, thanks a bunch.
Where can I see the full syntax for --filter?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Force FileBot to choose a particular series

Post by rednoah »

You're passing in Groovy code. So that's the syntax. Same as the format expression, exept here it's a condition evaluating to a boolean.

And the variables for episode data are the same as with the format.
http://www.filebot.net/naming.html

--filter is designed to be very general, e.g. you could exclude episodes aired before 2000 or you could always exclude (US) versions of any show.

EDIT: r1519 has some episode-matching optimizations for cases like this.
:idea: Please read the FAQ and How to Request Help.
Post Reply