Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Music/MusicUtilities/helpers/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_readable_time(seconds: int) -> str:
for i in range(len(time_list)):
time_list[i] = str(time_list[i]) + time_suffix_list[i]
if len(time_list) == 4:
ping_time += f'{time_list.pop()}, '
ping_time += f"{time_list.pop()}, "
time_list.reverse()
ping_time += ":".join(time_list)
return ping_time
Expand Down
12 changes: 3 additions & 9 deletions Music/MusicUtilities/helpers/inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
def play_markup(videoid, user_id):
return [
[
InlineKeyboardButton(
text="💬 Support", url="https://t.me/idzeroidsupport"
),
InlineKeyboardButton(text="💬 Support", url="https://t.me/idzeroidsupport"),
InlineKeyboardButton(
text="🎛 Menu", callback_data=f"other {videoid}|{user_id}"
),
Expand Down Expand Up @@ -118,9 +116,7 @@ def search_markup(
InlineKeyboardButton(
text="[⇜]", callback_data=f"popat 1|{query}|{user_id}"
),
InlineKeyboardButton(
text="[❌]", callback_data=f"ppcl2 smex|{user_id}"
),
InlineKeyboardButton(text="[❌]", callback_data=f"ppcl2 smex|{user_id}"),
InlineKeyboardButton(
text="[⇝]", callback_data=f"popat 1|{query}|{user_id}"
),
Expand Down Expand Up @@ -166,9 +162,7 @@ def search_markup2(
InlineKeyboardButton(
text="[⇜]", callback_data=f"popat 2|{query}|{user_id}"
),
InlineKeyboardButton(
text="[❌]", callback_data=f"ppcl2 smex|{user_id}"
),
InlineKeyboardButton(text="[❌]", callback_data=f"ppcl2 smex|{user_id}"),
InlineKeyboardButton(
text="[⇝]", callback_data=f"popat 2|{query}|{user_id}"
),
Expand Down
2 changes: 1 addition & 1 deletion Music/MusicUtilities/helpers/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_readable_time(seconds: int) -> str:
for i in range(len(time_list)):
time_list[i] = str(time_list[i]) + time_suffix_list[i]
if len(time_list) == 4:
ping_time += f'{time_list.pop()}, '
ping_time += f"{time_list.pop()}, "
time_list.reverse()
ping_time += ":".join(time_list)
return ping_time
2 changes: 1 addition & 1 deletion Music/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def all_info(app, client):
BOT_ID = getme.id
ASSID = getme1.id
if getme.last_name:
BOT_NAME = f'{getme.first_name} {getme.last_name}'
BOT_NAME = f"{getme.first_name} {getme.last_name}"
else:
BOT_NAME = getme.first_name
BOT_USERNAME = getme.username
Expand Down
2 changes: 1 addition & 1 deletion Music/converter/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


async def convert(file_path: str) -> str:
out = path.join("raw_files", path.basename(f'{file_path}.raw'))
out = path.join("raw_files", path.basename(f"{file_path}.raw"))
if path.isfile(out):
return out
proc = await asyncio.create_subprocess_shell(
Expand Down
8 changes: 4 additions & 4 deletions Music/plugins/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,9 @@ async def P_list(_, CallbackQuery):
await CallbackQuery.message.delete()
m = await CallbackQuery.message.reply_text("Pasting Playlist to Bin")
link = await paste(msg)
preview = f'{link}/preview.png'
preview = f"{link}/preview.png"
print(link)
urlxp = f'{link}/index.txt'
urlxp = f"{link}/index.txt"
user_id = CallbackQuery.from_user.id
user_name = CallbackQuery.from_user.first_name
a2 = InlineKeyboardButton(
Expand Down Expand Up @@ -1029,8 +1029,8 @@ async def G_list(_, CallbackQuery):
await CallbackQuery.message.delete()
m = await CallbackQuery.message.reply_text("Pasting Playlist to Bin")
link = await paste(msg)
preview = f'{link}/preview.png'
urlxp = f'{link}/index.txt'
preview = f"{link}/preview.png"
urlxp = f"{link}/index.txt"
user_id = CallbackQuery.from_user.id
user_name = CallbackQuery.from_user.first_name
a1 = InlineKeyboardButton(
Expand Down
2 changes: 1 addition & 1 deletion Music/plugins/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

def time_to_seconds(time):
stringt = str(time)
return sum(int(x) * 60 ** i for i, x in enumerate(reversed(stringt.split(":"))))
return sum(int(x) * 60**i for i, x in enumerate(reversed(stringt.split(":"))))


@Client.on_message(command(["play", "play@idzeroid_bot"]))
Expand Down
8 changes: 6 additions & 2 deletions Music/plugins/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ async def pause_cmd(_, message):
f"**Deleted the No:{count} music in playlist**"
)
else:
return await message.reply_text("**No such saved music in playlist.**")
return await message.reply_text(
"**No such saved music in playlist.**"
)
await message.reply_text("You have no such music in Playlist.")


Expand Down Expand Up @@ -214,5 +216,7 @@ async def delgroupplaylist(_, message):
f"**Deleted the No:{count} music in group's playlist**"
)
else:
return await message.reply_text("**No such saved music in Group playlist.**")
return await message.reply_text(
"**No such saved music in Group playlist.**"
)
await message.reply_text("You have no such music in Group Playlist.")
33 changes: 12 additions & 21 deletions Music/plugins/song.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

def time_to_seconds(time):
stringt = str(time)
return sum(int(x) * 60 ** i for i, x in enumerate(reversed(stringt.split(":"))))
return sum(int(x) * 60**i for i, x in enumerate(reversed(stringt.split(":"))))


@Client.on_message(command(["music", "song", "download"]))
Expand Down Expand Up @@ -387,15 +387,9 @@ def search_markup(
),
],
[
InlineKeyboardButton(
text="⇜", callback_data=f"chonga 1|{query}|{user_id}"
),
InlineKeyboardButton(
text="🗑 Close", callback_data=f"ppcl2 smex|{user_id}"
),
InlineKeyboardButton(
text="⇝", callback_data=f"chonga 1|{query}|{user_id}"
),
InlineKeyboardButton(text="⇜", callback_data=f"chonga 1|{query}|{user_id}"),
InlineKeyboardButton(text="🗑 Close", callback_data=f"ppcl2 smex|{user_id}"),
InlineKeyboardButton(text="⇝", callback_data=f"chonga 1|{query}|{user_id}"),
],
]

Expand Down Expand Up @@ -435,25 +429,22 @@ def search_markup2(
),
],
[
InlineKeyboardButton(
text="⇜", callback_data=f"chonga 2|{query}|{user_id}"
),
InlineKeyboardButton(
text="🗑 Close", callback_data=f"ppcl2 smex|{user_id}"
),
InlineKeyboardButton(
text="⇝", callback_data=f"chonga 2|{query}|{user_id}"
),
InlineKeyboardButton(text="⇜", callback_data=f"chonga 2|{query}|{user_id}"),
InlineKeyboardButton(text="🗑 Close", callback_data=f"ppcl2 smex|{user_id}"),
InlineKeyboardButton(text="⇝", callback_data=f"chonga 2|{query}|{user_id}"),
],
]


def gets(videoid, user_id):
return [[
return [
[
InlineKeyboardButton(
text="📥 Audio", callback_data=f"gets audio|{videoid}|{user_id}"
),
InlineKeyboardButton(
text="📥 Video", callback_data=f"gets video|{videoid}|{user_id}"
),
], [InlineKeyboardButton(text="🗑 Close", callback_data="close2")]]
],
[InlineKeyboardButton(text="🗑 Close", callback_data="close2")],
]
8 changes: 4 additions & 4 deletions Music/plugins/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ async def gstats(_, message):
modules_count = "17"
sc = platform.system()
arch = platform.machine()
ram = f'{str(round(psutil.virtual_memory().total / (1024.0 ** 3)))} GB'
ram = f"{str(round(psutil.virtual_memory().total / (1024.0 ** 3)))} GB"
bot_uptime = int(time.time() - Music_START_TIME)
uptime = f"{get_readable_time((bot_uptime))}"
hdd = psutil.disk_usage("/")
total = hdd.total / (1024.0 ** 3)
total = hdd.total / (1024.0**3)
total = str(total)
used = hdd.used / (1024.0 ** 3)
used = hdd.used / (1024.0**3)
used = str(used)
free = hdd.free / (1024.0 ** 3)
free = hdd.free / (1024.0**3)
free = str(free)
msg = f"""
**Global Stats of Aries Music Bot**:\n\n
Expand Down