chmod
This commit is contained in:
1 parent
ebc22d9c3a
commit
76def50a68
30 files changed
+8
-3
No files matched your search
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Regular → Executable
File mode changed.
Regular → Executable
+2
-2
@@ -10,7 +10,7 @@ require("dotenv").config();
|
|||||||
// ========================
|
// ========================
|
||||||
const MONGO_URI = process.env.MONGO_URI;
|
const MONGO_URI = process.env.MONGO_URI;
|
||||||
const DB_NAME = process.env.MONGO_DB || "downloads";
|
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);
|
const client = new MongoClient(MONGO_URI);
|
||||||
let queueCol, doneCol, failedCol;
|
let queueCol, doneCol, failedCol;
|
||||||
@@ -41,7 +41,7 @@ async function runJob(job) {
|
|||||||
"-t",
|
"-t",
|
||||||
job.token,
|
job.token,
|
||||||
"-o",
|
"-o",
|
||||||
process.env.OUTPUT_DIR,
|
OUTPUT_DIR,
|
||||||
];
|
];
|
||||||
|
|
||||||
const proc = spawn(cmd[0], cmd.slice(1));
|
const proc = spawn(cmd[0], cmd.slice(1));
|
||||||
|
|||||||
Regular → Executable
File mode changed.
Regular → Executable
+1
-1
@@ -73,7 +73,7 @@ router.post("/clear-queued", async (req, res) => {
|
|||||||
const db = await getDb();
|
const db = await getDb();
|
||||||
await db
|
await db
|
||||||
.collection("queue")
|
.collection("queue")
|
||||||
.deleteMany({}) //delete all
|
.deleteMany({ processing: { $ne: 1 } }) //delete all
|
||||||
|
|
||||||
// Redirect to status, controller fetches everything
|
// Redirect to status, controller fetches everything
|
||||||
res.redirect("/status");
|
res.redirect("/status");
|
||||||
|
|||||||
Regular → Executable
File mode changed.
Regular → Executable
BIN
Binary file not shown.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
+5
@@ -5,10 +5,12 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from requests import Response, get, RequestException
|
from requests import Response, get, RequestException
|
||||||
from clint.textui import progress
|
from clint.textui import progress
|
||||||
|
|
||||||
|
|
||||||
# Set up logging
|
# Set up logging
|
||||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
|
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:
|
except RequestException as e:
|
||||||
raise NetworkError(f"Failed to start download: {e}")
|
raise NetworkError(f"Failed to start download: {e}")
|
||||||
|
|
||||||
|
# Prepare save path
|
||||||
|
#os.makedirs(save_path, exist_ok=True)
|
||||||
|
|
||||||
# Download file with progress bar
|
# Download file with progress bar
|
||||||
with open(save_path, "wb") as file:
|
with open(save_path, "wb") as file:
|
||||||
if total_length:
|
if total_length:
|
||||||
|
|||||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Reference in new issue
Block a user