mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-25 02:50:27 +08:00
@@ -23,6 +23,7 @@ RUN set -ex && \
|
||||
shadow \
|
||||
tini \
|
||||
openssl \
|
||||
busybox-suid \
|
||||
tzdata && \
|
||||
python3 -m pip install --no-cache-dir --upgrade pip && \
|
||||
sed -i '/bcrypt/d' requirements.txt && \
|
||||
|
||||
@@ -58,14 +58,12 @@ else:
|
||||
return RedirectResponse("/docs")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if os.getenv("IPV6"):
|
||||
host = "::"
|
||||
else:
|
||||
host = os.getenv("HOST", "0.0.0.0")
|
||||
os.mkdir("data/posters") if not os.path.exists("data/posters") else None
|
||||
uvicorn.run(
|
||||
app,
|
||||
host=host,
|
||||
|
||||
@@ -78,13 +78,8 @@ class Checker:
|
||||
@staticmethod
|
||||
def check_img_cache() -> bool:
|
||||
img_path = Path("data/posters")
|
||||
if img_path.exists():
|
||||
# If poster folder is not empty, return True
|
||||
if list(img_path.glob("*")):
|
||||
return True
|
||||
else:
|
||||
img_path.mkdir()
|
||||
return False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# print(Checker().check_downloader())
|
||||
requests.get("http://162.200.20.1", timeout=2)
|
||||
|
||||
Reference in New Issue
Block a user