Update PVideoDl to support custom download strategies and enhance cookie handling. Added new downloader registration system, updated README for clarity on downloaders, and introduced cookies configuration in settings. Frontend now includes a dedicated tab for download strategies and API endpoints for listing them.

This commit is contained in:
Leonid Pershin
2026-06-20 09:08:31 +03:00
parent 3e47e95fc4
commit eae4def0bf
15 changed files with 639 additions and 74 deletions
+5 -4
View File
@@ -2,7 +2,7 @@
import '../app.css';
import { onMount } from 'svelte';
import { page } from '$app/stores';
import { DownloadCloud, History, Wifi, WifiOff } from 'lucide-svelte';
import { DownloadCloud, History, Puzzle, Wifi, WifiOff } from 'lucide-svelte';
import * as api from '$lib/api';
import {
setDownloads,
@@ -35,7 +35,8 @@
const tabs = [
{ href: '/', label: 'Активные', icon: DownloadCloud },
{ href: '/history', label: 'История', icon: History }
{ href: '/history', label: 'История', icon: History },
{ href: '/downloaders', label: 'Загрузчики', icon: Puzzle }
];
const path = $derived($page.url.pathname);
</script>
@@ -63,7 +64,7 @@
<nav class="mb-8 flex gap-1 border-b border-zinc-800">
{#each tabs as tab (tab.href)}
{@const active = path === tab.href}
{@const count = tab.href === '/' ? $activeCount : $historyCount}
{@const count = tab.href === '/' ? $activeCount : tab.href === '/history' ? $historyCount : null}
<a
href={tab.href}
class="-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2.5 text-sm font-medium transition-colors {active
@@ -72,7 +73,7 @@
>
<tab.icon class="size-4" />
{tab.label}
{#if $hydrated && count > 0}
{#if $hydrated && count !== null && count > 0}
<span class="rounded-full bg-zinc-800 px-1.5 py-0.5 text-xs font-normal text-zinc-400"
>{count}</span
>