aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/downloader/fragment.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-07-06 20:09:42 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-07-06 21:39:55 +0530
commit337734d4a8a6500bc65434843db346b5cbd05e81 (patch)
treeb2763ae741c1faefc4deaaae528a216e8df5fe9e /yt_dlp/downloader/fragment.py
parentfa44802809d189fca0f4782263d48d6533384503 (diff)
[cleanup] Misc
Diffstat (limited to 'yt_dlp/downloader/fragment.py')
-rw-r--r--yt_dlp/downloader/fragment.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/yt_dlp/downloader/fragment.py b/yt_dlp/downloader/fragment.py
index 458167216..069815326 100644
--- a/yt_dlp/downloader/fragment.py
+++ b/yt_dlp/downloader/fragment.py
@@ -300,9 +300,7 @@ class FragmentFD(FileDownloader):
def _finish_frag_download(self, ctx, info_dict):
ctx['dest_stream'].close()
if self.__do_ytdl_file(ctx):
- ytdl_filename = encodeFilename(self.ytdl_filename(ctx['filename']))
- if os.path.isfile(ytdl_filename):
- self.try_remove(ytdl_filename)
+ self.try_remove(self.ytdl_filename(ctx['filename']))
elapsed = time.time() - ctx['started']
to_file = ctx['tmpfilename'] != '-'