Page 1 of 1

How to recognize Specials

Posted: 16 Sep 2016, 11:28
by nikeb
Hi
i would like to have a suggestion on a problem that i have about recognizing specials episodes.

Sometimes i have this kind of filename:
"the.blacklist.s04e00.behind.the.blacklist"

This is my code:

Code: Select all

"seriesFormat= Telefilm2/{n.space('.')}/{episode.special ? 'Specials' : 'Serie.'+{s.pad(2)}}/{n.space('.')}.{episode.special ? 'S00E'+special.pad(2) : s00e00}{'.'+vf.match(/720[pP]|1080[pP]/)}{episode.special ? '.'+t.space('.') : ''}" 
With this code it doesn't recognize it as special but as normal episode (like s04e07).
How i can make everything that has "e00" in the name be identified as specials?

Thanks in advantage

Re: How to recognize Specials

Posted: 16 Sep 2016, 11:47
by rednoah
Formats allow you to format episode objects. If the episode object (e.g. S04E07) is wrong because FileBot failed to match the correct episode, then you can't do anything about that in the format.

The --filter allows you to control what episodes will be considered for matching.

e.g.

Code: Select all

$ filebot -rename . --action test --db TheTVDB -non-strict --filter "age < 7"
Rename episodes using [TheTVDB]
Auto-detected query: [The Blacklist]
Fetching episode data for [The Blacklist]
Fetching episode data for [The Blacklist: Redemption]
Fetching episode data for [Black Box]
Apply Filter: {age < 7}
Include [The Blacklist - 0xSpecial 5 - Behind Blacklist: Season 4]
[TEST] Rename [the.blacklist.s04e00.behind.the.blacklist.mkv] to [The Blacklist - 0xSpecial 5 - Behind Blacklist Season 4.mkv]
Note: This will only work between 0 and 7 days after the episode airdate. Please read the Advanced Fine-Tuning section of the amc manual for more information.

Re: How to recognize Specials

Posted: 16 Sep 2016, 13:04
by nikeb
Yes i get it and i get it worked.
The problem is that now it doesn't get movies or older tv shows.

Is that a way to filter from name? like a

Code: Select all

 --filter "n = /e00/ || age < 7"  
That can consider the filter " age < 7 " just for those files who has "e00" in the name?

Re: How to recognize Specials

Posted: 16 Sep 2016, 14:18
by rednoah
No, that's not how --filter works. You can however pass in different filter options in your calling script depending on the situation.

Re: How to recognize Specials

Posted: 16 Sep 2016, 14:27
by nikeb
Ok then

Can you confirm that using

Code: Select all

--filter "age < 7 || !model.any{ it.age < 7 }" 
would make a first check between what's under 7 days and after that make a check on everything else?
This way what's under 7 days has priority on other, than everything will come later.