Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
StarkGang committed Aug 7, 2021
1 parent d9bf9b5 commit f019af3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 44 deletions.
2 changes: 1 addition & 1 deletion any_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ async def download_file(message, url, file_name, show_progress=True):
await message.edit(f"<b><u>Downloading This File</b></u> \n<b>File :</b> <code>{file_name}</code> \n<b>File Size :</b> <code>Unknown</code>")
f.write(await r.read())
else:
total_length = int(total_length)
if not show_progress:
await message.edit(f"<b><u>Downloading This File</b></u> \n<b>File :</b> <code>{file_name}</code> \n<b>File Size :</b> <code>{humanbytes(total_length)}</code>")
f.write(await r.read())
return file_name
total_length = int(total_length)
async for chunk in r.content.iter_chunked(max(int(total_length/500), (1024*1024)*2)):
dl += len(chunk)
e_ = time.time()
Expand Down
1 change: 0 additions & 1 deletion carbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

@run_in_exc
def make_carbon(code, driver, lang="auto"):
code = urlencode(code)
url = f'https://carbon.now.sh/?l={lang}&code={code}'
driver.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command')
params = {'cmd': 'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': './'}}
Expand Down
38 changes: 0 additions & 38 deletions lyrics.py

This file was deleted.

4 changes: 2 additions & 2 deletions music_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def pl(client, message):
song += f"**Currently Playing :** `{group_call.song_name}` \n\n"
for sno, i in enumerate(s, start=1):
song += f"**{sno} ▶** [{i['song_name']}]({i['url']}) `| {i['singer']} | {i['dur']}` \n\n"
await play.edit(song)
await play.edit(song, disable_web_page_preview=True)

async def get_chat_(client, chat_):
chat_ = str(chat_)
Expand Down Expand Up @@ -122,8 +122,8 @@ async def ski_p(client, message):
if not s:
return await m_.edit("`No Song in List. So Stopping Song is A Smarter Way.`")
next_s = s[0]['raw']
s.pop(0)
name = str(s[0]['song_name'])
s.pop(0)
prev = group_call.song_name
group_call.input_filename = next_s
return await m_.edit(f"`Skipped {prev}. Now Playing {name}!`")
Expand Down
6 changes: 4 additions & 2 deletions night_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# All rights reserved.

from main_startup.core.decorators import friday_on_cmd
import logging
from main_startup import bot, Friday, Config
from main_startup.helper_func.basic_helpers import edit_or_reply, get_text
from xtraplugins.dB.nightmodedb import is_night_chat_in_db, get_all_night_chats, rm_night_chat, add_night_chat
Expand Down Expand Up @@ -77,7 +78,8 @@ async def job_close():
try:
await Friday.send_message(Config.LOG_GRP, f"[NIGHT MODE]\n\nFailed To Close The Group {ido}.\nError : {e}")
except:
pass
logging.info(e)


async def job_open():
lol = await get_all_night_chats()
Expand All @@ -104,7 +106,7 @@ async def job_open():
try:
await Friday.send_message(Config.LOG_GRP, f"[NIGHT MODE]\n\nFailed To Open The Group {ido}.\nError : {e}")
except:
pass
logging.info(e)


scheduler = AsyncIOScheduler()
Expand Down

0 comments on commit f019af3

Please sign in to comment.