Skip to content

Commit

Permalink
Add ability to make datetime comparisons in item filter anxdpanic#984
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Dec 6, 2024
1 parent 0dba7a3 commit 538ea04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/lib/youtube_plugin/youtube/helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from __future__ import absolute_import, division, unicode_literals

import time
from datetime import date, datetime
from math import log10
from operator import (
contains as op_contains,
Expand Down Expand Up @@ -1364,6 +1365,8 @@ def filter_parse(item,
)
if input_1 is None:
input_1 = ''
elif isinstance(input_1, (date, datetime)):
input_2 = datetime_parser.parse(input_2)
else:
input_2 = float(input_2)
if input_1 is None:
Expand Down

0 comments on commit 538ea04

Please sign in to comment.