Merge remote-tracking branch 'origin/main'

This commit is contained in:
jxxghp 2023-10-04 07:33:38 +08:00
commit a970f90c6f
8 changed files with 22 additions and 11 deletions

View File

@ -156,7 +156,7 @@ docker pull jxxghp/moviepilot:latest
### 2. **用户认证** ### 2. **用户认证**
- **AUTH_SITE** 认证站点,支持`iyuu`/`hhclub`/`audiences`/`hddolby`/`zmpt`/`freefarm`/`hdfans`/`wintersakura`/`leaves`/`1ptba`/`icc2022`/`ptlsp` - **AUTH_SITE** 认证站点,支持`iyuu`/`hhclub`/`audiences`/`hddolby`/`zmpt`/`freefarm`/`hdfans`/`wintersakura`/`leaves`/`1ptba`/`icc2022`/`ptlsp`/`xingtan`
`MoviePilot`需要认证后才能使用,配置`AUTH_SITE`后,需要根据下表配置对应站点的认证参数。 `MoviePilot`需要认证后才能使用,配置`AUTH_SITE`后,需要根据下表配置对应站点的认证参数。
@ -174,6 +174,7 @@ docker pull jxxghp/moviepilot:latest
| 1ptba | `1PTBA_UID`用户ID<br/>`1PTBA_PASSKEY`:密钥 | | 1ptba | `1PTBA_UID`用户ID<br/>`1PTBA_PASSKEY`:密钥 |
| icc2022 | `ICC2022_UID`用户ID<br/>`ICC2022_PASSKEY`:密钥 | | icc2022 | `ICC2022_UID`用户ID<br/>`ICC2022_PASSKEY`:密钥 |
| ptlsp | `PTLSP_UID`用户ID<br/>`PTLSP_PASSKEY`:密钥 | | ptlsp | `PTLSP_UID`用户ID<br/>`PTLSP_PASSKEY`:密钥 |
| xingtan | `XINGTAN_UID`用户ID<br/>`XINGTAN_PASSKEY`:密钥 |
### 2. **进阶配置** ### 2. **进阶配置**

Binary file not shown.

View File

@ -158,10 +158,8 @@ class Telegram(metaclass=Singleton):
title = re.sub(r"\s+", " ", title).strip() title = re.sub(r"\s+", " ", title).strip()
free = torrent.volume_factor free = torrent.volume_factor
seeder = f"{torrent.seeders}" seeder = f"{torrent.seeders}"
description = torrent.description
caption = f"{caption}\n{index}.【{site_name}】[{title}]({link}) " \ caption = f"{caption}\n{index}.【{site_name}】[{title}]({link}) " \
f"{StringUtils.str_filesize(torrent.size)} {free} {seeder}\n" \ f"{StringUtils.str_filesize(torrent.size)} {free} {seeder}"
f"_{description}_"
index += 1 index += 1
if userid: if userid:

View File

@ -49,6 +49,7 @@ class BrushFlow(_PluginBase):
siteshelper = None siteshelper = None
siteoper = None siteoper = None
torrents = None torrents = None
sites = None
qb = None qb = None
tr = None tr = None
# 添加种子定时 # 添加种子定时
@ -88,6 +89,7 @@ class BrushFlow(_PluginBase):
self.siteshelper = SitesHelper() self.siteshelper = SitesHelper()
self.siteoper = SiteOper() self.siteoper = SiteOper()
self.torrents = TorrentsChain() self.torrents = TorrentsChain()
self.sites = SitesHelper()
if config: if config:
self._enabled = config.get("enabled") self._enabled = config.get("enabled")
self._notify = config.get("notify") self._notify = config.get("notify")
@ -115,6 +117,13 @@ class BrushFlow(_PluginBase):
self._save_path = config.get("save_path") self._save_path = config.get("save_path")
self._clear_task = config.get("clear_task") self._clear_task = config.get("clear_task")
# 过滤掉已删除的站点
self._brushsites = [site.get("id") for site in self.sites.get_indexers() if
not site.get("public") and site.get("id") in self._brushsites]
# 保存配置
self.__update_config()
if self._clear_task: if self._clear_task:
# 清除统计数据 # 清除统计数据
self.save_data("statistic", {}) self.save_data("statistic", {})
@ -1113,7 +1122,7 @@ class BrushFlow(_PluginBase):
{ {
'component': 'thead', 'component': 'thead',
'props': { 'props': {
'class': 'text-no-wrap' 'class': 'text-no-wrap'
}, },
'content': [ 'content': [
{ {
@ -1290,10 +1299,10 @@ class BrushFlow(_PluginBase):
else: else:
end_size = 0 end_size = 0
if begin_size and not end_size \ if begin_size and not end_size \
and torrent.size > float(begin_size) * 1024**3: and torrent.size > float(begin_size) * 1024 ** 3:
continue continue
elif begin_size and end_size \ elif begin_size and end_size \
and not float(begin_size) * 1024**3 <= torrent.size <= float(end_size) * 1024**3: and not float(begin_size) * 1024 ** 3 <= torrent.size <= float(end_size) * 1024 ** 3:
continue continue
# 做种人数 # 做种人数
if self._seeder: if self._seeder:
@ -1350,7 +1359,7 @@ class BrushFlow(_PluginBase):
break break
# 保种体积GB # 保种体积GB
if self._disksize \ if self._disksize \
and (torrents_size + torrent.size) > float(self._disksize) * 1024**3: and (torrents_size + torrent.size) > float(self._disksize) * 1024 ** 3:
logger.warn(f"当前做种体积 {StringUtils.str_filesize(torrents_size)} " logger.warn(f"当前做种体积 {StringUtils.str_filesize(torrents_size)} "
f"已超过保种体积 {self._disksize},停止新增任务") f"已超过保种体积 {self._disksize},停止新增任务")
break break
@ -1861,7 +1870,7 @@ class BrushFlow(_PluginBase):
return 0 return 0
torrents = downlader.get_downloading_torrents() torrents = downlader.get_downloading_torrents()
return len(torrents) or 0 return len(torrents) or 0
@staticmethod @staticmethod
def __get_pubminutes(pubdate: str) -> int: def __get_pubminutes(pubdate: str) -> int:
""" """
@ -1877,4 +1886,3 @@ class BrushFlow(_PluginBase):
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
return 0 return 0

View File

@ -673,6 +673,8 @@ class MediaSyncDel(_PluginBase):
paths = self._library_path.split("\n") paths = self._library_path.split("\n")
for path in paths: for path in paths:
sub_paths = path.split(":") sub_paths = path.split(":")
if len(sub_paths) < 2:
continue
media_path = media_path.replace(sub_paths[0], sub_paths[1]).replace('\\', '/') media_path = media_path.replace(sub_paths[0], sub_paths[1]).replace('\\', '/')
# 删除电影 # 删除电影
@ -765,6 +767,8 @@ class MediaSyncDel(_PluginBase):
paths = self._library_path.split("\n") paths = self._library_path.split("\n")
for path in paths: for path in paths:
sub_paths = path.split(":") sub_paths = path.split(":")
if len(sub_paths) < 2:
continue
media_path = media_path.replace(sub_paths[0], sub_paths[1]).replace('\\', '/') media_path = media_path.replace(sub_paths[0], sub_paths[1]).replace('\\', '/')
# 获取删除的记录 # 获取删除的记录

File diff suppressed because one or more lines are too long