mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-20 05:47:24 +01:00
use actual filename
This commit is contained in:
parent
aa1f5c7689
commit
732929ae38
@ -517,7 +517,7 @@ def _download_fragment(fragment):
|
|||||||
})
|
})
|
||||||
decrypted_fragment = decrypt_fragment(fragment, self._read_fragment(ctx))
|
decrypted_fragment = decrypt_fragment(fragment, self._read_fragment(ctx))
|
||||||
if self.params.get('keep_fragments', False):
|
if self.params.get('keep_fragments', False):
|
||||||
f, _ = self.sanitize_open(format(fragment['frag_index'], '05d') + '.ts', 'wb')
|
f, _ = self.sanitize_open(ctx.get('fragment_filename_sanitized'), 'wb')
|
||||||
f.write(decrypted_fragment)
|
f.write(decrypted_fragment)
|
||||||
if not append_fragment(decrypted_fragment, frag_index, ctx):
|
if not append_fragment(decrypted_fragment, frag_index, ctx):
|
||||||
return False
|
return False
|
||||||
@ -535,7 +535,7 @@ def _download_fragment(fragment):
|
|||||||
download_fragment(fragment, ctx)
|
download_fragment(fragment, ctx)
|
||||||
decrypted_fragment = decrypt_fragment(fragment, self._read_fragment(ctx))
|
decrypted_fragment = decrypt_fragment(fragment, self._read_fragment(ctx))
|
||||||
if self.params.get('keep_fragments', False):
|
if self.params.get('keep_fragments', False):
|
||||||
f, _ = self.sanitize_open(format(fragment['frag_index'], '05d') + '.ts', 'wb')
|
f, _ = self.sanitize_open(ctx.get('fragment_filename_sanitized'), 'wb')
|
||||||
f.write(decrypted_fragment)
|
f.write(decrypted_fragment)
|
||||||
result = append_fragment(decrypted_fragment, fragment['frag_index'], ctx)
|
result = append_fragment(decrypted_fragment, fragment['frag_index'], ctx)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
Loading…
Reference in New Issue
Block a user