diff --git a/program/downloader.py b/program/downloader.py index 476faa8..d0ba289 100644 --- a/program/downloader.py +++ b/program/downloader.py @@ -45,9 +45,10 @@ def song(_, message): global is_downloading query = " ".join(message.command[1:]) if is_downloading: - return await message.reply( + message.reply( "ยป Another download in progress, please try again after some time !" ) + return is_downloading = True m = message.reply("๐Ÿ”Ž finding song...") ydl_ops = {"format": "bestaudio[ext=m4a]"} @@ -62,7 +63,7 @@ def song(_, message): duration = results[0]["duration"] except Exception as e: - m.edit("โŒ song not found.\n\nplease give a valid song name.") + m.edit("โŒ song not found.\n\nplease give a valid song name !") print(str(e)) return m.edit("๐Ÿ“ฅ downloading song...") @@ -72,6 +73,7 @@ def song(_, message): audio_file = ydl.prepare_filename(info_dict) ydl.process_info(info_dict) rep = f"โ€ข uploader @{bn}" + host = str(info_dict["uploader"]) secmul, dur, dur_arr = 1, 0, duration.split(":") for i in range(len(dur_arr) - 1, -1, -1): dur += int(float(dur_arr[i])) * secmul @@ -80,6 +82,7 @@ def song(_, message): message.reply_audio( audio_file, caption=rep, + performer=host, thumb=thumb_name, parse_mode="md", title=title, diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..fadb070 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.10.0