From f1df65d5d7a97bd81b3c70bf4bc41897b0616f6e Mon Sep 17 00:00:00 2001 From: Atsushi2965 <142886283+atsushi2965@users.noreply.github.com> Date: Sun, 30 Aug 2026 07:31:58 +0900 Subject: [PATCH] [utils]`download_range_func`: Update `__eq__` and `__repr__` to include `from_info` (#16393) Authored by: atsushi2965 --- yt_dlp/utils/_utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index 5be084eb57..0fcacb9364 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -3384,10 +3384,15 @@ class download_range_func: def __eq__(self, other): return (isinstance(other, download_range_func) - and self.chapters == other.chapters and self.ranges == other.ranges) + and self.chapters == other.chapters + and self.ranges == other.ranges + and self.from_info == other.from_info) def __repr__(self): - return f'{__name__}.{type(self).__name__}({self.chapters}, {self.ranges})' + args = [repr(self.chapters), repr(self.ranges)] + if self.from_info: + args.append('from_info=True') + return f'{__name__}.{type(self).__name__}({", ".join(args)})' def parse_dfxp_time_expr(time_expr):