From 83dc9f972ee1a6f1db1f082ff87ba48098fb7910 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Tue, 1 Feb 2022 16:58:05 +0700 Subject: [PATCH 1/3] name --- program/downloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/program/downloader.py b/program/downloader.py index 476faa8..01ad2eb 100644 --- a/program/downloader.py +++ b/program/downloader.py @@ -72,6 +72,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 +81,7 @@ def song(_, message): message.reply_audio( audio_file, caption=rep, + performer=host, thumb=thumb_name, parse_mode="md", title=title, From 26c46f3b60aca1fce4ffa65bb0fba0d0ea751012 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Tue, 1 Feb 2022 17:05:57 +0700 Subject: [PATCH 2/3] fixes --- program/downloader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/downloader.py b/program/downloader.py index 01ad2eb..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...") From 855ff92d84da4f8f1aaf3d51463462d9b106c937 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Tue, 1 Feb 2022 17:16:38 +0700 Subject: [PATCH 3/3] command runner --- runtime.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 runtime.txt 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