Enhance PVideoDl with finished_at tracking for downloads and UI updates. Added finished_at field to Download model, updated storage to handle legacy databases, and improved frontend to display recent downloads. Refactored scripts for better clarity and error handling.

This commit is contained in:
Leonid Pershin
2026-06-19 16:27:20 +03:00
parent 303de2b26c
commit 3e47e95fc4
14 changed files with 316 additions and 126 deletions
+16 -15
View File
@@ -1,22 +1,23 @@
@echo off
rem Прод-запуск одной командой: зависимости -> сборка фронта (если нужна) -> сервер.
rem Файлы складываются в downloads\, UI на http://127.0.0.1:8000
chcp 65001 >nul
rem Production launch: install deps, build frontend if needed, run the server.
rem Downloaded files go to downloads\ - UI at http://127.0.0.1:8000
setlocal
cd /d "%~dp0"
echo ==^> uv sync
call uv sync || exit /b 1
echo [1/3] uv sync
call uv sync
if errorlevel 1 exit /b 1
if not exist "frontend\build" (
echo ==^> Сборка фронтенда ^(frontend\build отсутствует^)
pushd frontend
call npm install || exit /b 1
call npm run build || exit /b 1
popd
) else (
echo ==^> Фронтенд уже собран — пропускаю сборку ^(удалите frontend\build для пересборки^)
)
if exist "frontend\build" goto serve
echo ==^> Запуск PVideoDl на http://127.0.0.1:8000
echo [2/3] building frontend (frontend\build missing)
pushd frontend
call npm install
if errorlevel 1 exit /b 1
call npm run build
if errorlevel 1 exit /b 1
popd
:serve
echo [3/3] starting PVideoDl at http://127.0.0.1:8000
uv run pvideodl