mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
refactor(string): split utilities by responsibility
This commit is contained in:
@@ -24,7 +24,7 @@ from app.modules.qqbot.api import (
|
||||
)
|
||||
from app.modules.qqbot.gateway import run_gateway
|
||||
from app.adapters.network.http import RequestUtils
|
||||
from app.domain.string import StringUtils
|
||||
from app.foundation import size as size_tools
|
||||
|
||||
# QQ Markdown 图片展示尺寸限制,避免竖版海报被客户端拉伸变形
|
||||
_DEFAULT_IMAGE_SIZE: Tuple[int, int] = (208, 320)
|
||||
@@ -449,7 +449,7 @@ class QQBot:
|
||||
meta = MetaInfo(t.title, t.description)
|
||||
name = f"{meta.season_episode} {meta.resource_term} {meta.video_term}"
|
||||
name = " ".join(name.split())
|
||||
lines.append(f"{i + 1}.【{t.site_name}】{name} {StringUtils.str_filesize(t.size)} {t.seeders}↑")
|
||||
lines.append(f"{i + 1}.【{t.site_name}】{name} {size_tools.format_compact_size(t.size)} {t.seeders}↑")
|
||||
text = "\n".join(lines)
|
||||
return self.send_msg(
|
||||
title=title or "种子列表",
|
||||
|
||||
Reference in New Issue
Block a user