5.7 KiB
Manual Selection Only - No Bulk Processing
Date: December 21, 2024 Purpose: Remove bulk processing, require explicit user selection for all encodings
Changes Made
New State: "READY"
Added a new file state to distinguish between discovered files and queued files:
| State | Color | Meaning |
|---|---|---|
| READY | Purple | File has been discovered and has subtitles, ready to be selected |
| PENDING | Yellow | User explicitly queued this file for encoding |
| PROCESSING | Blue | Currently being encoded |
| COMPLETED | Green | Successfully encoded |
| FAILED | Red | Encoding failed |
| SKIPPED | Gray | No subtitles or other skip reason |
Workflow Changes
OLD Workflow (Automatic):
- Scan library → Files with subtitles automatically marked as "pending"
- Start Processing → ALL files with subtitles encode
NEW Workflow (Manual Selection Required):
- Scan library → Files with subtitles marked as "ready" (NOT pending)
- User selects files → Choose specific movies using checkboxes or Quick Select
- Queue for encoding → Click "Queue Selected for Encoding" → Marks files as "pending"
- Start Processing → Only processes files explicitly marked as "pending"
Code Changes
1. reencode.py
ProcessingState Enum (lines 46-53):
class ProcessingState(Enum):
"""File processing states"""
READY = "ready" # Discovered, has subtitles, ready to be selected
PENDING = "pending" # User-selected, queued for encoding
PROCESSING = "processing" # Currently being encoded
COMPLETED = "completed" # Successfully encoded
FAILED = "failed" # Encoding failed
SKIPPED = "skipped" # No subtitles or other skip reason
add_file Method (lines 357-359):
# Files are marked as READY (not PENDING) when discovered
# User must explicitly select files to mark them as PENDING
state = ProcessingState.READY.value if has_subtitles else ProcessingState.SKIPPED.value
2. templates/dashboard.html
State Badge Colors (lines 1224-1230):
const stateBadgeColors = {
'ready': '#8b5cf6', // Purple - ready to be selected
'pending': '#fbbf24', // Yellow - queued for encoding
'processing': '#3b82f6', // Blue - currently encoding
'completed': '#10b981', // Green - done
'failed': '#ef4444', // Red - error
'skipped': '#64748b' // Gray - skipped
};
Filter Dropdown (lines 560-566):
- Added "Ready" option
- Changed "Pending" to "Pending (Queued)" for clarity
Quick Select Buttons (lines 589-595):
- Added "🎬 Ready" button (purple)
- Removed "Pending" and "Completed" buttons (only keep Ready and Failed)
- Reasoning: Users select "Ready" files to queue, or "Failed" files to retry
State Tooltips (lines 1239-1251):
ready: "Ready to encode - select this file to queue for encoding"pending: "Queued for encoding - will process when you click Start Processing"
Instructions Banner (lines 387-392):
Step 1: Select movies from the table below (use checkboxes or Quick Select buttons).
Step 2: Click "Queue Selected for Encoding" to mark them as pending.
Step 3: Click "Start Processing" at the top to begin encoding.
Button Text (line 610):
- Changed from "🎬 Encode Selected Movies"
- To "📥 Queue Selected for Encoding"
Confirmation Messages:
- Queue: "Queue N file(s) for encoding using profile X? They will be marked as PENDING..."
- Success: "N file(s) marked as PENDING! They are now queued for encoding. Now click Start Processing..."
User Experience
Before (Automatic Bulk Processing)
- Scan library
- ALL files with subtitles automatically queued
- Start Processing → encodes everything
- ❌ User has no control over what gets encoded
- ❌ Can't select specific files
- ❌ Unclear what "Start Processing" will do
After (Manual Selection Only)
- Scan library → Files show as "READY" (purple)
- User browses and selects specific files
- User clicks "Queue Selected for Encoding" → Files become "PENDING" (yellow)
- User clicks "Start Processing" → Only pending files encode
- ✅ Complete control over what gets encoded
- ✅ Clear workflow with visual feedback
- ✅ Can queue in batches
- ✅ Obvious what will happen when clicking Start
Migration Path
Existing Databases
Files currently in "pending" state will remain pending and will be processed when Start Processing is clicked. This is intentional - they were already queued.
New scans will mark files as "ready" instead of "pending".
No Breaking Changes
- API endpoints unchanged
- Database schema compatible (just new state value)
- Config files unchanged
- Docker commands unchanged
Benefits
- User Control: Users explicitly choose every file to encode
- Clarity: Clear 3-step workflow with visual indicators
- Safety: No accidental bulk encoding of entire library
- Flexibility: Queue files in batches, different profiles
- Transparency: Always know what's queued vs ready
- Better UX: Purple → Yellow → Blue → Green progression
Testing Checklist
- Scan library → Files marked as "ready" (purple)
- Select ready files → Checkbox works
- Click "Queue Selected for Encoding" → Files become "pending" (yellow)
- Click "Start Processing" → Only pending files encode
- Failed files → Can select and retry
- Filter by "Ready" → Shows only ready files
- Quick Select "Ready" → Selects all ready files
- Quick Select "Failed" → Selects all failed files
- Tooltips show correct information
- Success messages clear and helpful
Version
encoderPro Version: 3.3.0 (Manual Selection Only) Date: December 21, 2024