diff --git a/README.md b/README.md index 4feb0a37..1f9fad2f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Web GUI for [yt-dlp](https://github.com/yt-dlp/yt-dlp) with playlist & channel s * Support for both advanced and basic mode for WebUI. * Bundled tools in container: curl-cffi, ffmpeg, ffprobe, aria2, rtmpdump, mkvtoolsnix, mp4box. * Automatic upcoming live stream re-queue. +* Apply `yt-dlp` options per custom defined conditions. # Run using docker command diff --git a/app/library/HttpAPI.py b/app/library/HttpAPI.py index 9c412ce6..b7a60fac 100644 --- a/app/library/HttpAPI.py +++ b/app/library/HttpAPI.py @@ -78,6 +78,7 @@ class HttpAPI(Common): "/notifications", "/changelog", "/logs", + "/conditions", "/browser", "/browser/{path:.*}", ] diff --git a/app/library/conditions.py b/app/library/conditions.py index 70cb2de3..b91beba1 100644 --- a/app/library/conditions.py +++ b/app/library/conditions.py @@ -297,6 +297,9 @@ class Conditions(metaclass=Singleton): Condition|None: The condition if found, None otherwise. """ + if len(self._items) < 1 or not info or not isinstance(info, dict) or len(info) < 1: + return None + from yt_dlp.utils import match_str for item in self.get_all(): diff --git a/ui/components/ConditionForm.vue b/ui/components/ConditionForm.vue new file mode 100644 index 00000000..efe4be7e --- /dev/null +++ b/ui/components/ConditionForm.vue @@ -0,0 +1,245 @@ +