Add duration_string to info_dict

This commit is contained in:
pukkandan
2021-01-06 22:37:55 +05:30
parent 7fd86ce1a9
commit dbbbe555d7
3 changed files with 8 additions and 3 deletions

View File

@@ -908,6 +908,10 @@ class YoutubeDL(object):
self.add_extra_info(ie_result, {
'extractor': ie.IE_NAME,
'webpage_url': url,
'duration_string': (
formatSeconds(ie_result['duration'], '-')
if ie_result.get('duration', None) is not None
else None),
'webpage_url_basename': url_basename(url),
'extractor_key': ie.ie_key(),
})