mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-30 07:41:42 +03:00
[utils]download_range_func: Update __eq__ and __repr__ to include from_info (#16393)
Authored by: atsushi2965
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user