Added support to queue many urls separated by comma

This commit is contained in:
ArabCoders 2024-12-17 20:43:58 +03:00
parent 9f00a8cdc3
commit 2782ee568d
6 changed files with 18 additions and 14 deletions

View file

@ -16,6 +16,7 @@ YTPTube started as a fork of [meTube](https://github.com/alexta69/metube), Since
* Tasks Runner. It allow you to queue channels for downloading using simple `json` file. * Tasks Runner. It allow you to queue channels for downloading using simple `json` file.
* Webhook sender. It allow you to add webhook endpoints that receive events related to downloads using simple `json` file. * Webhook sender. It allow you to add webhook endpoints that receive events related to downloads using simple `json` file.
* Multi-downloads support. * Multi-downloads support.
* Queue multiple URLs separated by comma.
* Basic Authentication support. * 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 curl_cffi, see [yt-dlp documentation](https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#impersonation)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 318 KiB

View file

@ -84,10 +84,10 @@
<NuxtLink target="_blank" :href="item.url">{{ item.title }}</NuxtLink> <NuxtLink target="_blank" :href="item.url">{{ item.title }}</NuxtLink>
</div> </div>
<div class="card-header-icon" v-if="item.filename"> <div class="card-header-icon">
<NuxtLink :href="makeDownload(config, item)" :download="item.filename?.split('/').reverse()[0]" <NuxtLink :href="makeDownload(config, item)" :download="item.filename?.split('/').reverse()[0]"
class="has-text-primary" v-tooltip="'Download item.'" v-if="item.status === 'finished'"> class="has-text-primary" v-tooltip="'Download item.'"
v-if="item.filename && item.status === 'finished'">
<span class="icon"><i class="fa-solid fa-download" /></span> <span class="icon"><i class="fa-solid fa-download" /></span>
</NuxtLink> </NuxtLink>

View file

@ -146,14 +146,18 @@ const addInProgress = ref(false)
const addDownload = () => { const addDownload = () => {
addInProgress.value = true; addInProgress.value = true;
url.value.split(',').forEach(url => {
socket.emit('add_url', { if (!url.trim()) {
url: url.value, return;
preset: selectedPreset.value, }
folder: downloadPath.value, socket.emit('add_url', {
ytdlp_config: ytdlpConfig.value, url: url,
ytdlp_cookies: ytdlpCookies.value, preset: selectedPreset.value,
output_template: output_template.value, folder: downloadPath.value,
ytdlp_config: ytdlpConfig.value,
ytdlp_cookies: ytdlpCookies.value,
output_template: output_template.value,
});
}); });
} }

View file

@ -27,13 +27,12 @@ export default defineNuxtConfig({
"meta": [ "meta": [
{ "charset": "utf-8" }, { "charset": "utf-8" },
{ "name": "viewport", "content": "width=device-width, initial-scale=1.0, maximum-scale=1.0" }, { "name": "viewport", "content": "width=device-width, initial-scale=1.0, maximum-scale=1.0" },
{ "name": "theme-color", "content": "#000000" } { "name": "theme-color", "content": "#000000" },
], ],
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }] link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
}, },
pageTransition: { name: 'page', mode: 'out-in' } pageTransition: { name: 'page', mode: 'out-in' }
}, },
router: { router: {
options: { options: {
linkActiveClass: "is-selected", linkActiveClass: "is-selected",