diff --git a/backend/fetcher.py b/backend/fetcher.py index 20ffc86..d73f0e8 100644 --- a/backend/fetcher.py +++ b/backend/fetcher.py @@ -51,7 +51,7 @@ async def fetch_subscriptions(): # Step 2: For each channel, get latest videos new_count = 0 async with aiosqlite.connect(DB_PATH) as db: - for cid in channel_ids[:20]: + for cid in channel_ids[:50]: try: req = youtube.search().list( part="snippet", diff --git a/docker-compose.yml b/docker-compose.yml index 63db468..5a069dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,14 +7,13 @@ services: dockerfile: Dockerfile container_name: t-youtube restart: unless-stopped - network_mode: host + ports: + - "8001:8000" environment: - - OPENAI_API_KEY=${OPENAI_API_KEY:-sk-Kq5JbgmnEEkdzTqNAQ6bV6nztQ0ngeHTHF9Vg8nUglQvrOlx} - - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - - ANTHROPIC_BASE_URL=https://www.bytecatcode.org - - HTTP_PROXY=http://100.70.115.1:8118 - - HTTPS_PROXY=http://100.70.115.1:8118 - - NO_PROXY=localhost,127.0.0.1,100.0.0.0/8,192.168.0.0/16 + - DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} + - DEEPSEEK_BASE_URL=https://api.deepseek.com + - DEEPSEEK_MODEL=deepseek-chat + - DB_DIR=/app/data volumes: - ./data:/app/data - ./config:/app/config diff --git a/frontend/src/routes/YoutubeDashboard.svelte b/frontend/src/routes/YoutubeDashboard.svelte index 7750dec..f673627 100644 --- a/frontend/src/routes/YoutubeDashboard.svelte +++ b/frontend/src/routes/YoutubeDashboard.svelte @@ -8,6 +8,7 @@ let isSyncing = $state(false); let syncMessage = $state(''); let pendingCount = $state(0); + let nextSync = $state(localStorage.getItem('t-yt-next-sync') || ''); let theme = $state(localStorage.getItem('theme') || 'dark'); let summaryPanel = $state(null); let notes = $state(JSON.parse(localStorage.getItem('t-yt-notes') || '{}')); @@ -92,10 +93,25 @@ document.documentElement.className = theme; loadVideos(); loadPendingCount(); + updateSyncTimer(); window.addEventListener('keydown', handleKeydown); return () => window.removeEventListener('keydown', handleKeydown); }); + function updateSyncTimer() { + const el = document.getElementById('sync-timer'); + if (!el) return; + const now = new Date(); + const next = new Date(now); + next.setHours(3, 0, 0, 0); // 3 AM daily + if (now > next) next.setDate(next.getDate() + 1); + const diff = next - now; + const h = Math.floor(diff / 3600000); + const m = Math.floor((diff % 3600000) / 60000); + el.textContent = `Next sync in ${h}h ${m}m`; + setTimeout(updateSyncTimer, 60000); + } + async function loadPendingCount() { try { const res = await fetch('/api/videos?status=pending&limit=1'); @@ -191,16 +207,12 @@ text feed