EQL: Add support for 'age' noun
This is the "episode age in days", i.e. the amount of days since the episode has been downloaded (or the downloaded file modified).
This commit is contained in:
parent
6670e5e037
commit
0ed4082024
|
@ -76,6 +76,8 @@ class Matcher(object):
|
|||
return episode.description
|
||||
elif k == 'since':
|
||||
return (datetime.datetime.now() - datetime.datetime.fromtimestamp(episode.published)).days
|
||||
elif k == 'age':
|
||||
return episode.age_in_days()
|
||||
elif k in ('minutes', 'min'):
|
||||
return float(episode.total_time) / 60
|
||||
elif k in ('remaining', 'rem'):
|
||||
|
|
Loading…
Reference in New Issue