TheHamkerCat 5 năm trước cách đây
mục cha
commit
09a95c6ccd
2 tập tin đã thay đổi với 2 bổ sung và 13 xóa
  1. 2 7
      wbb/modules/music.py
  2. 0 6
      wbb/utils/functions.py

+ 2 - 7
wbb/modules/music.py

@@ -7,7 +7,6 @@ import os
 from random import randint
 from pyrogram import filters
 from wbb import app, SUDOERS, arq
-from wbb.utils.functions import convert_seconds_to_minutes
 from wbb.utils.errors import capture_err
 
 
@@ -104,13 +103,11 @@ async def jssong(_, message):
         sname = songs[0].song
         slink = songs[0].media_url
         ssingers = songs[0].singers
-        duration = int(songs[0].duration)
-        duration = convert_seconds_to_minutes(duration)
         await m.edit("Downloading")
         song = await download_song(slink)
         await m.edit("Uploading")
         await message.reply_audio(audio=song, title=sname,
-                                  performer=ssingers, duration=duration)
+                                  performer=ssingers)
         os.remove(song)
         await m.delete()
     except Exception as e:
@@ -141,13 +138,11 @@ async def deezsong(_, message):
         title = songs[0].title
         url = songs[0].url
         artist = songs[0].artist
-        duration = int(songs[0].duration)
-        duration = convert_seconds_to_minutes(duration)
         await m.edit("Downloading")
         song = await download_song(url)
         await m.edit("Uploading")
         await message.reply_audio(audio=song, title=title,
-                                  performer=artist, duration=duration)
+                                  performer=artist)
         os.remove(song)
         await m.delete()
     except Exception as e:

+ 0 - 6
wbb/utils/functions.py

@@ -1,6 +0,0 @@
-def convert_seconds_to_minutes(seconds):
-    seconds = seconds % (24 * 3600)
-    seconds %= 3600
-    minutes = seconds // 60
-    seconds %= 60
-    return "%02d:%02d" % (minutes, seconds)