Authored by: bashonly
This commit is contained in:
bashonly 2024-05-03 11:03:17 -05:00
parent 23d159f425
commit fd8b4fbea0
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,6 @@ class PatreonIE(PatreonBaseIE):
for include in traverse_obj(post, ('included', ...)):
include_type = include.get('type')
if include_type == 'media':
idx += 1
media_attributes = include.get('attributes') or {}
download_url = media_attributes.get('download_url')
ext = mimetype2ext(media_attributes.get('mimetype'))
@ -260,6 +259,7 @@ class PatreonIE(PatreonBaseIE):
# See: https://github.com/yt-dlp/yt-dlp/issues/4608
size_bytes = int_or_none(media_attributes.get('size_bytes'))
if download_url and ext in KNOWN_EXTENSIONS and size_bytes is not None:
idx += 1
entries.append({
'id': f'{video_id}-{idx}',
'ext': ext,