Skip to content

Commit

Permalink
compression ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Jan 2, 2025
1 parent 5870310 commit 19bdf6b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruff_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
code-format:
permissions:
contents: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
4 changes: 2 additions & 2 deletions bot/helper/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ async def proceed_extract(self, dl_path, gid):
if (
not self.seed
and self.subproc is not None
and self.subproc.returncode == 0
and code == 0
):
for file_ in files:
if is_archive_split(file_) or is_archive(file_):
Expand Down Expand Up @@ -777,7 +777,7 @@ async def proceed_compress(self, dl_path, gid, o_files, ft_delete):
"7z",
f"-v{split_size}b",
"a",
"-mx=9",
"-mx=0",
f"-p{pswd}",
up_path,
dl_path,
Expand Down
6 changes: 5 additions & 1 deletion bot/modules/mediainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
edit_message,
five_minute_del,
send_message,
delete_message,
)


Expand Down Expand Up @@ -65,8 +66,11 @@ async def gen_mediainfo(message, link=None, media=None, msg=None):
await aioremove(des_path)

link_id = (await telegraph.create_page(title="MediaInfo", content=tc))["path"]
link = f'https://graph.org/{link_id}'
await delete_message(temp_send)
await TgClient.bot.send_web_page(message.chat.id, link, "<blockquote>MediaInfo generated successfully.</blockquote>", invert_media=True)
await temp_send.edit(
f"<blockquote>MediaInfo generated successfully<a href='https://graph.org/{link_id}'>.</a></blockquote>",
f,
disable_web_page_preview=False,
)

Expand Down
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fix = true
unsafe-fixes = true
line-length = 85
target-version = "py310"
target-version = "py313"

[lint.mccabe]
max-complexity = 100
Expand Down

0 comments on commit 19bdf6b

Please sign in to comment.