[peertube] only call description endpoint if necessary (#29383)
This commit is contained in:
parent
7fb9564420
commit
a803582717
@ -569,15 +569,15 @@ class PeerTubeIE(InfoExtractor):
|
|||||||
formats.append(f)
|
formats.append(f)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
full_description = self._call_api(
|
description = video.get('description')
|
||||||
host, video_id, 'description', note='Downloading description JSON',
|
if len(description) >= 250:
|
||||||
fatal=False)
|
# description is shortened
|
||||||
|
full_description = self._call_api(
|
||||||
|
host, video_id, 'description', note='Downloading description JSON',
|
||||||
|
fatal=False)
|
||||||
|
|
||||||
description = None
|
if isinstance(full_description, dict):
|
||||||
if isinstance(full_description, dict):
|
description = str_or_none(full_description.get('description')) or description
|
||||||
description = str_or_none(full_description.get('description'))
|
|
||||||
if not description:
|
|
||||||
description = video.get('description')
|
|
||||||
|
|
||||||
subtitles = self.extract_subtitles(host, video_id)
|
subtitles = self.extract_subtitles(host, video_id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user