# Download Videos from NotebookLM - Quick Guide

## Current Situation
- **Database**: 3 video slots configured (1 failed, 2 pending)
- **NotebookLM**: 3 videos exist and are ready
- **Server**: 0 video files downloaded yet

## Quick Download Steps

### 1. Open NotebookLM
```
https://notebooklm.google.com/notebook/0f38d000-7497-442c-9b67-8773b02a558b
```

### 2. Download Videos
1. Look for "Video Overview" or "ملخص مرئي" section
2. You should see 3 video files
3. For each video:
   - Click the three dots (⋮) menu
   - Select "Download"
   - Save as:
     - `video_1.mp4`
     - `video_2.mp4`
     - `video_3.mp4`

### 3. Upload to Server
Upload the files to:
```bash
/home/ashraffarid2010/jadwaai.com/app/static/uploads/notebooks/35/
```

You can use SCP/SFTP:
```bash
scp video_*.mp4 user@server:/home/ashraffarid2010/jadwaai.com/app/static/uploads/notebooks/35/
```

### 4. Update Database
Run this SQL for each video:

**For video_1.mp4:**
```sql
UPDATE notebook_assets
SET status = 'ready',
    file_path = 'uploads/notebooks/35/video_1.mp4',
    file_format = 'mp4',
    error_message = NULL,
    completed_at = NOW()
WHERE report_id = 35
  AND asset_type = 'video'
  AND asset_index = 1;
```

**For video_2.mp4:**
```sql
UPDATE notebook_assets
SET status = 'ready',
    file_path = 'uploads/notebooks/35/video_2.mp4',
    file_format = 'mp4',
    error_message = NULL,
    completed_at = NOW()
WHERE report_id = 35
  AND asset_type = 'video'
  AND asset_index = 2;
```

**For video_3.mp4:**
```sql
UPDATE notebook_assets
SET status = 'ready',
    file_path = 'uploads/notebooks/35/video_3.mp4',
    file_format = 'mp4',
    error_message = NULL,
    completed_at = NOW()
WHERE report_id = 35
  AND asset_type = 'video'
  AND asset_index = 3;
```

### 5. Verify
Refresh the Jadwa AI notebook page and you should see:
- 🎬 ملخص مرئي    3 نسخ    جاهز ✓
- Individual view/download buttons for each video

## Alternative: Use Admin Interface
If you have access to the Flask admin panel:
1. Navigate to report 35
2. Find the video assets (IDs 28, 31, 32)
3. Update each one with the file path and status

## Expected Result
After completing these steps, the video card will show:

```
🎬 ملخص مرئي    3 نسخ    جاهز ✓

نسخة 1:      [👁 عرض] [⬇ تحميل]
نسخة 2:      [👁 عرض] [⬇ تحميل]
نسخة 3:      [👁 عرض] [⬇ تحميل]
```

## Troubleshooting
**If videos don't show up:**
- Clear browser cache and refresh
- Check file permissions (should be readable by web server)
- Verify database updates were applied
- Check Flask logs for errors

**If videos exist but show wrong status:**
Run the repair script:
```bash
python3 scripts/repair_notebook_assets.py 35
```