From 5a35854f458aabf5c0223d4afa80a560c36528fa Mon Sep 17 00:00:00 2001 From: arabcoders Date: Thu, 16 Oct 2025 16:41:59 +0300 Subject: [PATCH 1/3] [FEAT] add custom download fields to simple mode. Closes #437 --- .gitignore | 1 + ui/app/components/Simple.vue | 69 +++++++++++++++++++++++++++++++++--- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0179ec38..7701ab66 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ build version.txt test_impl.py ./eslint.config.js +.pytest_cache diff --git a/ui/app/components/Simple.vue b/ui/app/components/Simple.vue index a24e7dc9..a1939e1b 100644 --- a/ui/app/components/Simple.vue +++ b/ui/app/components/Simple.vue @@ -13,8 +13,9 @@
-
@@ -29,7 +30,7 @@
-
+
+
+
+ +
+
+ +
+
+
@@ -213,7 +228,8 @@ const videoItem = ref(null) const formUrl = ref('') const formPreset = ref<{ preset: string }>({ preset: app.value.default_preset || '' }) const addInProgress = ref(false) -const showPresets = ref(false) +const showExtras = ref(false) +const dlFields = useStorage>('dl_fields', {}) const show_thumbnail = useStorage('show_thumbnail', true) const sortByNewest = (items: StoreItem[]): StoreItem[] => items.slice().sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0)) @@ -247,9 +263,50 @@ const addDownload = async (): Promise => { return } + let cli = '' + + const dlFieldsExtra = ['--no-download-archive'] + + const is_valid = (dl_field: string): boolean => { + if (dlFieldsExtra.includes(dl_field)) { + return true + } + + if (configStore.dl_fields && configStore.dl_fields.length > 0) { + return configStore.dl_fields.some(f => dl_field === f.field) + } + + return false + } + + if (dlFields.value && Object.keys(dlFields.value).length > 0) { + const joined = [] + for (const [key, value] of Object.entries(dlFields.value)) { + if (false === is_valid(key)) { + continue + } + + if ([undefined, null, '', false].includes(value as any)) { + continue + } + + const keyRegex = new RegExp(`(^|\\s)${key}(\\s|$)`) + if (cli && keyRegex.test(cli)) { + continue + } + + joined.push(true === value ? `${key}` : `${key} ${value}`) + } + + if (joined.length > 0) { + cli = joined.join(' ') + } + } + const payload: item_request[] = [{ url, preset: formPreset.value.preset || app.value.default_preset, + cli: cli || '', auto_start: true, }] @@ -274,6 +331,7 @@ const addDownload = async (): Promise => { formUrl.value = '' formPreset.value.preset = app.value.default_preset || '' + dlFields.value = {} } catch (error) { const message = error instanceof Error ? error.message : 'Failed to add download.' toast.error(message) @@ -544,6 +602,9 @@ const showMessage = (item: StoreItem) => { return (item.msg?.length || 0) > 0 } +// eslint-disable-next-line vue/no-side-effects-in-computed-properties +const sortedDLFields = computed(() => configStore.dl_fields.sort((a, b) => (a.order || 0) - (b.order || 0))) + const connectionStatusColor = computed(() => { switch (socketStore.connectionStatus) { case 'connected': From 9ea860a9672fec6f7284685a8a017fc1cd6bc2bf Mon Sep 17 00:00:00 2001 From: arabcoders Date: Thu, 16 Oct 2025 17:00:33 +0300 Subject: [PATCH 2/3] [FEAT] allow user to choose thumbnail aspect ratio. --- ui/app/assets/css/style.css | 1 + ui/app/components/FloatingImage.vue | 4 +++- ui/app/components/History.vue | 3 ++- ui/app/components/Queue.vue | 3 ++- ui/app/components/Settings.vue | 16 ++++++++++++++++ 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ui/app/assets/css/style.css b/ui/app/assets/css/style.css index cd841efe..fb18446a 100644 --- a/ui/app/assets/css/style.css +++ b/ui/app/assets/css/style.css @@ -370,3 +370,4 @@ div.is-centered { padding: 0; margin: 0 auto; } + diff --git a/ui/app/components/FloatingImage.vue b/ui/app/components/FloatingImage.vue index 0b190f3a..6db9b82e 100644 --- a/ui/app/components/FloatingImage.vue +++ b/ui/app/components/FloatingImage.vue @@ -8,7 +8,7 @@
{{ props.title }}
-
+
@@ -20,6 +20,7 @@ From 32bdbf5402c29bf9bd3aa62389c8a241a1dacd09 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Thu, 16 Oct 2025 17:21:21 +0300 Subject: [PATCH 3/3] update README --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a6ac051..e3c19ecc 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,17 @@ For simple API documentation, you can refer to the [API documentation](API.md). # Disclaimer -This project is not affiliated with yt-dlp, or any other service. It's a personal project that was created to -make downloading videos from the internet easier. It's not intended to be used for piracy or any other illegal activities. +This project is not affiliated with yt-dlp or any other service. + +It’s a personal project designed to make downloading videos from the internet more convenient. It’s not intended for +piracy or any unlawful use. + +This project was built primarily for my own needs and preferences. The UI might not be the most polished or visually +refined, but I’m happy with it as it is. You can, however, create and load your own UI for complete customization. I +plan to refactor the UI/UX in the future using [Nuxt/ui](https://ui.nuxt.com/). + +Contributions are welcome, but I may decline changes that don’t align with my vision for the project. Unsolicited pull +requests may be ignored. For suggestions or feature requests, please open a discussion or join the Discord server. # Social contact