[adultswim] add joinparts support
This commit is contained in:
parent
fe07a74fcb
commit
15e4f0ff84
@ -160,8 +160,7 @@ class AdultSwimIE(InfoExtractor):
|
|||||||
'description': episode_description
|
'description': episode_description
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
data = {
|
||||||
'_type': 'playlist',
|
|
||||||
'id': episode_id,
|
'id': episode_id,
|
||||||
'display_id': episode_path,
|
'display_id': episode_path,
|
||||||
'entries': entries,
|
'entries': entries,
|
||||||
@ -169,3 +168,13 @@ class AdultSwimIE(InfoExtractor):
|
|||||||
'description': episode_description,
|
'description': episode_description,
|
||||||
'duration': episode_duration
|
'duration': episode_duration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self._downloader.params.get('joinparts') and len(entries) > 1:
|
||||||
|
# convert entries => formats into formats => parts
|
||||||
|
self.to_screen('Found {} segments to join'.format(len(entries)))
|
||||||
|
data['formats'] = self._entry_formats_to_parts(entries)
|
||||||
|
else:
|
||||||
|
data['_type'] = 'playlist'
|
||||||
|
data['entries'] = entries
|
||||||
|
|
||||||
|
return data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user