mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-27 21:59:17 +01:00
use actual filename
This commit is contained in:
parent
aa1f5c7689
commit
732929ae38
1 changed files with 2 additions and 2 deletions
|
@ -517,7 +517,7 @@ class FragmentFD(FileDownloader):
|
||||||
})
|
})
|
||||||
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 @@ class FragmentFD(FileDownloader):
|
||||||
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 a new issue