diff --git a/Uploader/dl_button.py b/Uploader/dl_button.py index bab91f2d..23be5ee9 100644 --- a/Uploader/dl_button.py +++ b/Uploader/dl_button.py @@ -79,8 +79,8 @@ async def ddl_call_back(bot, update): youtube_dl_url = youtube_dl_url[o:o + l] description = custom_file_name - if not "." + youtube_dl_ext in custom_file_name: - custom_file_name += '.' + youtube_dl_ext + if f".{youtube_dl_ext}" not in custom_file_name: + custom_file_name += f'.{youtube_dl_ext}' logger.info(youtube_dl_url) logger.info(custom_file_name) @@ -94,7 +94,7 @@ async def ddl_call_back(bot, update): "/" + str(update.from_user.id) if not os.path.isdir(tmp_directory_for_each_user): os.makedirs(tmp_directory_for_each_user) - download_directory = tmp_directory_for_each_user + "/" + custom_file_name + download_directory = f"{tmp_directory_for_each_user}/{custom_file_name}" command_to_exec = [] async with aiohttp.ClientSession() as session: c_time = time.time() @@ -227,8 +227,8 @@ async def ddl_call_back(bot, update): disable_web_page_preview=True ) - logger.info("Downloaded in: " + str(time_taken_for_download)) - logger.info("Uploaded in: " + str(time_taken_for_upload)) + logger.info(f"Downloaded in: {str(time_taken_for_download)}") + logger.info(f"Uploaded in: {str(time_taken_for_upload)}") else: await bot.edit_message_text( text=Translation.NO_VOID_FORMAT_FOUND.format("Incorrect Link"),