diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/controllers/pm2Controller.js b/controllers/pm2Controller.js old mode 100644 new mode 100755 diff --git a/controllers/queueController.js b/controllers/queueController.js old mode 100644 new mode 100755 diff --git a/lib/mongo.js b/lib/mongo.js old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/public/assets/favicon.ico b/public/assets/favicon.ico old mode 100644 new mode 100755 diff --git a/public/style.css b/public/style.css old mode 100644 new mode 100755 diff --git a/queue_worker.js b/queue_worker.js old mode 100644 new mode 100755 index 326ff13..db839fc --- a/queue_worker.js +++ b/queue_worker.js @@ -10,7 +10,7 @@ require("dotenv").config(); // ======================== const MONGO_URI = process.env.MONGO_URI; const DB_NAME = process.env.MONGO_DB || "downloads"; -const OUTPUT_DIR = process.env.OUTPUT_DIR || "/mnt/media/WIP/"; +const OUTPUT_DIR = process.env.OUTPUT_DIR || "/mnt/media/WIP"; const client = new MongoClient(MONGO_URI); let queueCol, doneCol, failedCol; @@ -41,7 +41,7 @@ async function runJob(job) { "-t", job.token, "-o", - process.env.OUTPUT_DIR, + OUTPUT_DIR, ]; const proc = spawn(cmd[0], cmd.slice(1)); diff --git a/requirements.txt b/requirements.txt old mode 100644 new mode 100755 diff --git a/routes/index.js b/routes/index.js old mode 100644 new mode 100755 index c4ed637..d480647 --- a/routes/index.js +++ b/routes/index.js @@ -73,7 +73,7 @@ router.post("/clear-queued", async (req, res) => { const db = await getDb(); await db .collection("queue") - .deleteMany({}) //delete all + .deleteMany({ processing: { $ne: 1 } }) //delete all // Redirect to status, controller fetches everything res.redirect("/status"); diff --git a/scripts/lib/__pycache__/proxer_utils.cpython-311.pyc b/scripts/lib/__pycache__/proxer_utils.cpython-311.pyc old mode 100644 new mode 100755 diff --git a/scripts/lib/__pycache__/proxer_utils.cpython-313.pyc b/scripts/lib/__pycache__/proxer_utils.cpython-313.pyc old mode 100644 new mode 100755 index 9f84a82..5c00962 Binary files a/scripts/lib/__pycache__/proxer_utils.cpython-313.pyc and b/scripts/lib/__pycache__/proxer_utils.cpython-313.pyc differ diff --git a/scripts/lib/__pycache__/proxer_utils.cpython-38.pyc b/scripts/lib/__pycache__/proxer_utils.cpython-38.pyc old mode 100644 new mode 100755 diff --git a/scripts/lib/__pycache__/script_utils.cpython-313.pyc b/scripts/lib/__pycache__/script_utils.cpython-313.pyc old mode 100644 new mode 100755 diff --git a/scripts/lib/__pycache__/script_utils.cpython-38.pyc b/scripts/lib/__pycache__/script_utils.cpython-38.pyc old mode 100644 new mode 100755 diff --git a/scripts/lib/proxer_utils.py b/scripts/lib/proxer_utils.py old mode 100644 new mode 100755 index 3973325..88497fe --- a/scripts/lib/proxer_utils.py +++ b/scripts/lib/proxer_utils.py @@ -5,10 +5,12 @@ """ import logging +import os from enum import Enum from requests import Response, get, RequestException from clint.textui import progress + # Set up logging logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") @@ -116,6 +118,9 @@ def download_mp4(mp4_url: str, save_path: str, label: str = "") -> None: except RequestException as e: raise NetworkError(f"Failed to start download: {e}") + # Prepare save path + #os.makedirs(save_path, exist_ok=True) + # Download file with progress bar with open(save_path, "wb") as file: if total_length: diff --git a/scripts/lib/script_utils.py b/scripts/lib/script_utils.py old mode 100644 new mode 100755 diff --git a/scripts/proxer-dl-series.py b/scripts/proxer-dl-series.py old mode 100644 new mode 100755 diff --git a/scripts/proxer-dl-video.py b/scripts/proxer-dl-video.py old mode 100644 new mode 100755 diff --git a/scripts/requirements.txt b/scripts/requirements.txt old mode 100644 new mode 100755 diff --git a/server.js b/server.js old mode 100644 new mode 100755 diff --git a/views/error.ejs b/views/error.ejs old mode 100644 new mode 100755 diff --git a/views/index.ejs b/views/index.ejs old mode 100644 new mode 100755 diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs old mode 100644 new mode 100755 diff --git a/views/partials/header.ejs b/views/partials/header.ejs old mode 100644 new mode 100755 diff --git a/views/pm2.ejs b/views/pm2.ejs old mode 100644 new mode 100755 diff --git a/views/status.ejs b/views/status.ejs old mode 100644 new mode 100755