aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-04-05 18:47:49 +0100
committerdirkf <fieldhouse@gmx.net>2023-04-05 19:05:16 +0100
commit25124bd640acf2fbae71b2a52738ee41da548fb1 (patch)
tree7c53c7610d7f39bb717bccd106bf23aed8be221f /youtube_dl/utils.py
parent78da22489b483988e198a8352893df9c6cf34032 (diff)
downloadyoutube-dl-25124bd640acf2fbae71b2a52738ee41da548fb1.tar.xz
[devscripts] Improve hack to convert command-line options to API options
* define equality for DateRange * don't show default DateRange
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index f3c7af437..d80ceb007 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -3190,6 +3190,10 @@ class DateRange(object):
def __str__(self):
return '%s - %s' % (self.start.isoformat(), self.end.isoformat())
+ def __eq__(self, other):
+ return (isinstance(other, DateRange)
+ and self.start == other.start and self.end == other.end)
+
def platform_name():
""" Returns the platform name as a compat_str """