From fe16c08daa187e5f16b4320e10e7b6f25ab8591c Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Wed, 16 Sep 2026 18:56:17 +0000 Subject: [PATCH] Implement Phase 6: MeTube download integration - MeTubeClient encapsulates all MeTube HTTP/Socket.IO calls (verified against the real MeTube source: /add returns no job id, GET /history gives a queue snapshot for reconciliation, filenames arrive already relative, percent is a 0-100 float) - download_jobs table + service: request/dedup active downloads, apply live Socket.IO events (added/updated/completed/canceled/cleared) matched by canonical YouTube URL, safe relative-path -> public media URL construction - Reconciliation on startup against MeTube's live queue/done state (section 19): non-terminal jobs recovered where possible, else marked "unknown"; already completed jobs are left untouched - POST/GET /api/videos/{id}/download(-status), recheck-local; feed/video detail now report real local availability instead of a stub - Frontend: download button with live status polling (queued/downloading %/ postprocessing/completed/failed+retry), local