Page 1 of 1

filter timespamp doesn't work with 4.7.5

Posted: 02 Dec 2016, 20:47
by warover
following filter doesn't work anymore:
--filter "d.timeStamp > now.time || age < 8"
please advice
thx in advance

Re: filter timespamp doesn't work with 4.7.5

Posted: 03 Dec 2016, 01:20
by rednoah
"age < 8" will work perfectly fine, since age will throw an error if negative instead of returning a negative value.

Re: filter timespamp doesn't work with 4.7.5

Posted: 03 Dec 2016, 15:21
by warover
ok thx just "age < 8" works but are future episodes covered then

Re: filter timespamp doesn't work with 4.7.5

Posted: 04 Dec 2016, 04:04
by rednoah
Yes, in that future episodes fail to pass the filter (same as in your original expression).

Re: filter timespamp doesn't work with 4.7.5

Posted: 04 Dec 2016, 14:16
by warover
ok i see is there a filter expression to filter results for airdate older than 8 days AND/OR future episodes?

Re: filter timespamp doesn't work with 4.7.5

Posted: 04 Dec 2016, 16:35
by rednoah
Sure:

Code: Select all

any{ age > 8 }{ true }
But I'm not sure if that makes any sense as --filter expression for -rename calls...

Re: filter timespamp doesn't work with 4.7.5

Posted: 26 Dec 2016, 20:43
by nuchdog
Is there a way to limit the time frame for future episodes? any{ age < 5}{true} returns all future episodes. With timeStamp I could filter down to only episodes in the next few days.

Specifically, some episodes hit my machine before midnight in my timezone and thus show as technically not having aired yet since the timezone they aired in is ahead of me. Using just an {age < 5} filter will match the previous episode or match nothing at all since 5 is too small. If I coupled that with a filter based on "d.timeStamp", I was able to filter down to episodes that aired in the past few days or episodes that would air in the next day or two. This allowed the new episode to be matched correctly even though it "hadn't aired yet" due to my timezone offset. When I updated, this filter doesn't seem to work anymore.

I have been trying various things {airdate.timeStamp < (now.time + 2*24*60*60*1000)} but nothing has worked. Any help or insight would be greatly appreciated.

Re: filter timespamp doesn't work with 4.7.5

Posted: 27 Dec 2016, 01:14
by ZeroByDivide
nuchdog wrote:Is there a way to limit the time frame for future episodes? any{ age < 5}{true} returns all future episodes. With timeStamp I could filter down to only episodes in the next few days.

Specifically, some episodes hit my machine before midnight in my timezone and thus show as technically not having aired yet since the timezone they aired in is ahead of me. Using just an {age < 5} filter will match the previous episode or match nothing at all since 5 is too small. If I coupled that with a filter based on "d.timeStamp", I was able to filter down to episodes that aired in the past few days or episodes that would air in the next day or two. This allowed the new episode to be matched correctly even though it "hadn't aired yet" due to my timezone offset. When I updated, this filter doesn't seem to work anymore.

I have been trying various things {airdate.timeStamp < (now.time + 2*24*60*60*1000)} but nothing has worked. Any help or insight would be greatly appreciated.
Wondering the same thing (if it'll fix my issue anyways), since I've been messing around with my filters a bit and just now ran into this post while trying to find out how to get future episodes to process correctly if I grab them before air date, got it to see future episodes while filtering down older episodes which is great but now trying to figure out how to filter out episodes that have no air date to them yet and haven't gotten that bit figured out..

Wondering if filtering down future episodes would cut out the episodes that have no air date? and if not then how exactly would I go about doing such a thing?

Re: filter timespamp doesn't work with 4.7.5

Posted: 27 Dec 2016, 05:05
by nuchdog
Getting closer. Also should answer your issue ZeroByDivide. I have been having some luck using the "?" Ternary operator.

Code: Select all

expression ? "if true or exists" : "if not true or does not exist"
see: http://groovy-lang.org/operators.html

Thus we can filter out episodes more than 5 days old and specials by:

Code: Select all

any{ age < 5 }{ special ? false : true }
which should return false if it is a special and true if it is not. I haven't tried this one yet.

Similarly, we can filter out episodes more than 5 days old and episodes that do not have an airdate by:

Code: Select all

any{ age < 5 }{ airdate ? true : false }
should return true if the episode has an airdate and false if it does not. I can confirm that this seems to work.

I am still going to have to play around and see if I can filter on a future airdate. i.e. episodes with an airdate only X days in the future.

Re: filter timespamp doesn't work with 4.7.5

Posted: 27 Dec 2016, 06:05
by rednoah
Time zone issues (if there were any to begin with) should be fixed with r4667.

Re: filter timespamp doesn't work with 4.7.5

Posted: 27 Dec 2016, 06:44
by nuchdog
Awesome, I will give it a shot and see if I can force the issue again. Otherwise

Code: Select all

any{ age < 5 }{ airdate ? true : false }
appears like it should work, or at least give filebot a shot at correctly matching the episode.

Re: filter timespamp doesn't work with 4.7.5

Posted: 27 Dec 2016, 06:57
by ZeroByDivide
Great yes, thanks a bunch nuchdog

Code: Select all

any{ age < 5 }{ airdate ? true : false }
worked perfectly to weed out episodes that has no air date yet while allowing future episodes and keeping the age filter intact :D