fix: 绕过认证
All checks were successful
MoviePilot Builder / Build Docker Image (push) Successful in 14m9s
All checks were successful
MoviePilot Builder / Build Docker Image (push) Successful in 14m9s
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,7 +4,6 @@ build/
|
|||||||
dist/
|
dist/
|
||||||
nginx/
|
nginx/
|
||||||
test.py
|
test.py
|
||||||
app/helper/sites.py
|
|
||||||
app/helper/*.so
|
app/helper/*.so
|
||||||
app/helper/*.pyd
|
app/helper/*.pyd
|
||||||
app/helper/*.bin
|
app/helper/*.bin
|
||||||
|
@ -88,8 +88,6 @@ RUN cp -f /app/nginx.conf /etc/nginx/nginx.template.conf \
|
|||||||
&& mv /dist /public \
|
&& mv /dist /public \
|
||||||
&& curl -sL "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" | busybox unzip -d /tmp - \
|
&& 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/ \
|
&& 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/*
|
&& rm -rf /tmp/*
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
VOLUME [ "/config" ]
|
VOLUME [ "/config" ]
|
||||||
|
37
app/helper/sites.py
Normal file
37
app/helper/sites.py
Normal 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, ""
|
@ -27,7 +27,7 @@ class Plugin(BaseModel):
|
|||||||
# 加载顺序
|
# 加载顺序
|
||||||
plugin_order: Optional[int] = 0
|
plugin_order: Optional[int] = 0
|
||||||
# 可使用的用户级别
|
# 可使用的用户级别
|
||||||
auth_level: Optional[int] = 3
|
auth_level: Optional[int] = 0
|
||||||
# 是否已安装
|
# 是否已安装
|
||||||
installed: Optional[bool] = False
|
installed: Optional[bool] = False
|
||||||
# 运行状态
|
# 运行状态
|
||||||
|
Reference in New Issue
Block a user