fix: 绕过认证
All checks were successful
MoviePilot Builder / Build Docker Image (push) Successful in 14m9s

This commit is contained in:
2024-09-13 14:38:53 +08:00
parent 62e643acf8
commit e1ad94cfb1
4 changed files with 38 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,7 +4,6 @@ build/
dist/
nginx/
test.py
app/helper/sites.py
app/helper/*.so
app/helper/*.pyd
app/helper/*.bin

View File

@ -88,8 +88,6 @@ RUN cp -f /app/nginx.conf /etc/nginx/nginx.template.conf \
&& mv /dist /public \
&& curl -sL "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" | busybox unzip -d /tmp - \
&& mv -f /tmp/MoviePilot-Plugins-main/plugins/* /app/app/plugins/ \
&& curl -sL "https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip" | busybox unzip -d /tmp - \
&& mv -f /tmp/MoviePilot-Resources-main/resources/* /app/app/helper/ \
&& rm -rf /tmp/*
EXPOSE 3000
VOLUME [ "/config" ]

37
app/helper/sites.py Normal file
View File

@ -0,0 +1,37 @@
from app.schemas import Plugin
class SitesHelper:
"""
站点信息
"""
def __init__(self):
self.auth_level = 3
self.auth_version = "1.3.2"
self.indexer_version = "1.4.7"
self.sites = [{
id: "1",
"domain": "rarbg",
}]
def get_indexer(self, domain: str) -> dict:
"""
获取站点信息
"""
for site in self.sites:
if site.get("domain") == domain:
return site
return {}
def get_indexers(self) -> list:
"""
获取所有站点信息
"""
return self.sites
def check(self, domain: str) -> tuple:
return True, ""
def check_user(self) -> tuple:
return True, ""

View File

@ -27,7 +27,7 @@ class Plugin(BaseModel):
# 加载顺序
plugin_order: Optional[int] = 0
# 可使用的用户级别
auth_level: Optional[int] = 3
auth_level: Optional[int] = 0
# 是否已安装
installed: Optional[bool] = False
# 运行状态