fix bugs
This commit is contained in:
@ -33,6 +33,7 @@ class MessageChain(ChainBase):
|
||||
self.medtachain = MediaChain()
|
||||
self.torrent = TorrentHelper()
|
||||
self.eventmanager = EventManager()
|
||||
self.torrenthelper = TorrentHelper()
|
||||
|
||||
def process(self, body: Any, form: Any, args: Any) -> None:
|
||||
"""
|
||||
@ -111,7 +112,7 @@ class MessageChain(ChainBase):
|
||||
userid=userid)
|
||||
return
|
||||
# 搜索结果排序
|
||||
contexts = TorrentHelper.sort_torrents(contexts)
|
||||
contexts = self.torrenthelper.sort_torrents(contexts)
|
||||
# 更新缓存
|
||||
self._user_cache[userid] = {
|
||||
"type": "Torrent",
|
||||
|
@ -29,6 +29,7 @@ class SearchChain(ChainBase):
|
||||
self.siteshelper = SitesHelper()
|
||||
self.progress = ProgressHelper()
|
||||
self.systemconfig = SystemConfigOper()
|
||||
self.torrenthelper = TorrentHelper()
|
||||
|
||||
def search_by_tmdbid(self, tmdbid: int, mtype: MediaType = None) -> Optional[List[Context]]:
|
||||
"""
|
||||
@ -188,7 +189,7 @@ class SearchChain(ChainBase):
|
||||
media_info=mediainfo,
|
||||
torrent_info=torrent) for torrent in _match_torrents]
|
||||
# 排序
|
||||
contexts = TorrentHelper.sort_torrents(contexts)
|
||||
contexts = self.torrenthelper.sort_torrents(contexts)
|
||||
# 返回
|
||||
return contexts
|
||||
|
||||
|
Reference in New Issue
Block a user