[utils]download_range_func: Update __eq__ and __repr__ to include from_info (#16393)

Authored by: atsushi2965
This commit is contained in:
Atsushi2965
2026-08-30 00:31:58 +02:00
committed by GitHub
parent 3d062c86ea
commit f1df65d5d7
+7 -2
View File
@@ -3384,10 +3384,15 @@ class download_range_func:
def __eq__(self, other): def __eq__(self, other):
return (isinstance(other, download_range_func) 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): 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): def parse_dfxp_time_expr(time_expr):