Skip to content

Commit

Permalink
Merge pull request ( #41 )
Browse files Browse the repository at this point in the history
fix errors [#27, #30, #32, #37] (Sourcery refactored)
  • Loading branch information
kalanakt authored Aug 12, 2022
2 parents d3b34d2 + b7285b2 commit 7ee900a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Uploader/dl_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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()
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 7ee900a

Please sign in to comment.