8000 [pull] v2 from jxxghp:v2 by pull[bot] · Pull Request #157 · comanche2008/MoviePilot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] v2 from jxxghp:v2 #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 8, 2025
Merged
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: 0 additions & 2 deletions app/chain/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from app.core.context import MediaInfo, Context
from app.core.meta import MetaBase
from app.db.user_oper import UserOper
from app.helper.memory import memory_optimized
from app.helper.torrent import TorrentHelper
from app.log import logger
from app.schemas import Notification, NotExistMediaInfo, CommingMessage
Expand Down Expand Up @@ -118,7 +117,6 @@ def process(self, body: Any, form: Any, args: Any) -> None:
# 处理消息
self.handle_message(channel=channel, source=source, userid=userid, username=username, text=text)

@memory_optimized(force_gc_after=True, log_memory=True)
def handle_message(self, channel: MessageChannel, source: str,
userid: Union[str, int], username: str, text: str) -> None:
"""
Expand Down
2 changes: 0 additions & 2 deletions app/chain/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from app.core.event import eventmanager, Event
from app.core.metainfo import MetaInfo
from app.db.systemconfig_oper import SystemConfigOper
from app.helper.memory import memory_optimized
from app.helper.progress import ProgressHelper
from app.helper.sites import SitesHelper
from app.helper.torrent import TorrentHelper
Expand Down Expand Up @@ -98,7 +97,6 @@ def last_search_results(self) -> List[Context]:
logger.error(f'加载搜索结果失败:{str(e)} - {traceback.format_exc()}')
return []

@memory_optimized(force_gc_after=True, log_memory=True)
def process(self, mediainfo: MediaInfo,
keyword: Optional[str] = None,
no_exists: Dict[int, Dict[int, NotExistMediaInfo]] = None,
Expand Down
3 changes: 0 additions & 3 deletions app/chain/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from app.db.site_oper import SiteOper
from app.db.subscribe_oper import SubscribeOper
from app.db.systemconfig_oper import SystemConfigOper
from app.helper.memory import memory_optimized
from app.helper.subscribe import SubscribeHelper
from app.helper.torrent import TorrentHelper
from app.log import logger
Expand Down Expand Up @@ -268,7 +267,6 @@ def exists(mediainfo: MediaInfo, meta: MetaBase = None):
return True
return False

@memory_optimized(force_gc_after=True, log_memory=True)
def search(self, sid: Optional[int] = None, state: Optional[str] = 'N', manual: Optional[bool] = False):
"""
订阅搜索
Expand Down Expand Up @@ -540,7 +538,6 @@ def get_subscribed_sites(self) -> Optional[List[int]]:

return ret_sites

@memory_optimized(force_gc_after=True, log_memory=True)
def match(self, torrents: Dict[str, List[Context]]):
"""
从缓存中匹配订阅,并自动下载
Expand Down
4 changes: 0 additions & 4 deletions app/chain/torrents.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from app.core.metainfo import MetaInfo
from app.db.site_oper import SiteOper
from app.db.systemconfig_oper import SystemConfigOper
from app.helper.memory import memory_optimized
from app.helper.rss import RssHelper
from app.helper.sites import SitesHelper
from app.helper.torrent import TorrentHelper
Expand Down Expand Up @@ -70,7 +69,6 @@ def clear_torrents(self):
self.remove_cache(self._rss_file)
logger.info(f'种子缓存数据清理完成')

@memory_optimized(force_gc_after=True, log_memory=True)
def browse(self, domain: str, keyword: Optional[str] = None, cat: Optional[str] = None,
page: Optional[int] = 0) -> List[TorrentInfo]:
"""
Expand All @@ -87,7 +85,6 @@ def browse(self, domain: str, keyword: Optional[str] = None, cat: Optional[str]
return []
return self.refresh_torrents(site=site, keyword=keyword, cat=cat, page=page)

@memory_optimized(force_gc_after=True, log_memory=True)
def rss(self, domain: str) -> List[TorrentInfo]:
"""
获取站点RSS内容,返回种子清单,TTL缓存3分钟
Expand Down Expand Up @@ -133,7 +130,6 @@ def rss(self, domain: str) -> List[TorrentInfo]:

return ret_torrents

@memory_optimized(force_gc_after=True, log_memory=True)
def refresh(self, stype: Optional[str] = None, sites: List[int] = None) -> Dict[str, List[Context]]:
"""
刷新站点最新资源,识别并缓存起来
Expand Down
2 changes: 0 additions & 2 deletions app/chain/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from app.db.transferhistory_oper import TransferHistoryOper
from app.helper.directory import DirectoryHelper
from app.helper.format import FormatParser
from app.helper.memory import memory_optimized
from app.helper.progress import ProgressHelper
from app.log import logger
from app.schemas import TransferInfo, TransferTorrent, Notification, EpisodeFormat, FileItem, TransferDirectoryConf, \
Expand Down Expand Up @@ -938,7 +937,6 @@ def __get_bluray_dir(_storage: str, _path: Path) -> Optional[FileItem]:

return trans_items

@memory_optimized(force_gc_after=True, log_memory=True)
def do_transfer(self, fileitem: FileItem,
meta: MetaBase = None, mediainfo: MediaInfo = None,
target_directory: TransferDirectoryConf = None,
Expand Down
14 changes: 4 additions & 10 deletions app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ class Config:
REPO_GITHUB_TOKEN: Optional[str] = None
# 大内存模式
BIG_MEMORY_MODE: bool = False
# 内存使用监控
MEMORY_MONITOR_ENABLE: bool = False
# 启用详细内存分析
MEMORY_DETAILED_ANALYSIS: bool = False
# 全局图片缓存,将媒体图片缓存到本地
GLOBAL_IMAGE_CACHE: bool = False
# 是否启用编码探测的性能模式
Expand Down Expand Up @@ -545,9 +541,8 @@ def CONF(self):
"bangumi": 512,
"fanart": 512,
"meta": (self.META_CACHE_EXPIRE or 24) * 3600,
"memory": 1 * 1024,
"scheduler": 50,
"threadpool": 50
"scheduler": 100,
"threadpool": 100
}
return {
"torrents": 100,
Expand All @@ -557,9 +552,8 @@ def CONF(self):
"bangumi": 256,
"fanart": 128,
"meta": (self.META_CACHE_EXPIRE or 2) * 3600,
"memory": 512,
"scheduler": 20,
"threadpool": 20
"scheduler": 50,
"threadpool": 50
}

@property
Expand Down
Loading
0