diff --git a/.vscode/launch.json b/.vscode/launch.json
index e73fa56c..4ef2825b 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -41,6 +41,8 @@
"YTP_LOG_LEVEL": "DEBUG",
"YTP_DEBUG": "true",
"YTP_YTDL_DEBUG": "false",
+ "YTP_BASIC_MODE": "true",
+ "YTP_DEFAULT_PRESET": "Best video and audio",
}
},
{
diff --git a/README.md b/README.md
index 554b28ff..323e7421 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,7 @@ YTPTube started as a fork of [meTube](https://github.com/alexta69/metube), Since
* Queue multiple URLs separated by comma.
* Basic Authentication support.
* Support for curl_cffi, see [yt-dlp documentation](https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#impersonation)
+* Support for both advanced and basic mode for WebUI.
### Tips
Your `yt-dlp` config should include the following options for optimal working conditions.
@@ -94,6 +95,8 @@ Certain values can be set via environment variables, using the `-e` parameter on
* __YTP_UI_UPDATE_TITLE__: Whether to update the title of the page with the current stats. Defaults to `true`.
* __YTP_PIP_PACKAGES__: a space separated list of pip packages to install. Defaults to `""`, you can also use `{config_path}/pip.txt` to install the packages.
* __YTP_PIP_IGNORE_UPDATES__: Do not update the custom pip packages. Defaults to `false`.
+* __YTP_BASIC_MODE__: Whether to run WebUI in basic mode. Defaults to `false`. In basic mode, A minimal UI will be shown, the majority of the features will be disabled.
+* __YTP_DEFAULT_PRESET__: The default preset to use for the download. Defaults to `default`.
## Running behind a reverse proxy
diff --git a/app/library/config.py b/app/library/config.py
index 3fb7ee7e..070394ed 100644
--- a/app/library/config.py
+++ b/app/library/config.py
@@ -69,10 +69,14 @@ class Config:
ytdlp_version: str = YTDLP_VERSION
started: int = 0
ignore_ui: bool = False
+ basic_mode: bool = False
+
presets: list = [
{"name": "default", "format": "default"},
]
+ default_preset: str = "default"
+
_manual_vars: tuple = (
"temp_path",
"config_path",
@@ -108,6 +112,7 @@ class Config:
"ignore_ui",
"ui_update_title",
"pip_ignore_updates",
+ "basic_mode",
)
_frontend_vars: tuple = (
@@ -122,6 +127,8 @@ class Config:
"remove_files",
"ui_update_title",
"max_workers",
+ "basic_mode",
+ "default_preset",
)
@staticmethod
@@ -286,6 +293,9 @@ class Config:
if self.auth_password and self.auth_username:
LOG.warning(f"Basic authentication enabled with username '{self.auth_username}'.")
+ if self.basic_mode:
+ LOG.info("The frontend is running in basic mode.")
+
self.started = time.time()
def _getAttributes(self) -> dict:
diff --git a/ui/components/History.vue b/ui/components/History.vue
index 9e41e712..0ca71ad7 100644
--- a/ui/components/History.vue
+++ b/ui/components/History.vue
@@ -203,7 +203,7 @@
-