+
+
+ + {{ calcPath(item.folder) }} +
++ + {{ item.template }} +
++ + Has cookies +
diff --git a/app/library/HttpSocket.py b/app/library/HttpSocket.py
index 4ba96b6f..30ca13fc 100644
--- a/app/library/HttpSocket.py
+++ b/app/library/HttpSocket.py
@@ -93,6 +93,10 @@ class HttpSocket(Common):
@ws_event
async def cli_post(self, sid: str, data):
+ if not self.config.console_enabled:
+ await self.emitter.error("Console is disabled.", to=sid)
+ return
+
if not data:
await self.emitter.emit(Events.CLI_CLOSE, {"exitcode": 0}, to=sid)
return
diff --git a/app/library/config.py b/app/library/config.py
index a331c1ca..bea45fc9 100644
--- a/app/library/config.py
+++ b/app/library/config.py
@@ -143,6 +143,9 @@ class Config:
secret_key: str
"The secret key to use for the application."
+ console_enabled: bool = False
+ "Enable direct access to yt-dlp console."
+
_manual_vars: tuple = (
"temp_path",
"config_path",
@@ -200,6 +203,7 @@ class Config:
"default_preset",
"instance_title",
"sentry_dsn",
+ "console_enabled",
)
"The variables that are relevant to the frontend."
@@ -353,14 +357,13 @@ class Config:
# save key as bytes.
if os.path.exists(key_file) and os.path.getsize(key_file) > 5:
- with open(key_file,"rb") as f:
+ with open(key_file, "rb") as f:
self.secret_key = f.read().strip()
else:
self.secret_key = os.urandom(32)
with open(key_file, "wb") as f:
f.write(self.secret_key)
-
self.started = time.time()
def _get_attributes(self) -> dict:
diff --git a/ui/assets/css/style.css b/ui/assets/css/style.css
index f166f27f..58aa328c 100644
--- a/ui/assets/css/style.css
+++ b/ui/assets/css/style.css
@@ -259,3 +259,7 @@ hr {
.is-pre {
white-space: pre;
}
+
+.has-text-bold {
+ font-weight: bold;
+}
diff --git a/ui/layouts/default.vue b/ui/layouts/default.vue
index 865e86fd..d65dff04 100644
--- a/ui/layouts/default.vue
+++ b/ui/layouts/default.vue
@@ -5,9 +5,9 @@