Skip to content

fix: show TranscodeWaiting state instead of premature TranscodeActive#28

Open
negativeeddy wants to merge 1 commit into
masterfrom
fix/transcode-waiting-state
Open

fix: show TranscodeWaiting state instead of premature TranscodeActive#28
negativeeddy wants to merge 1 commit into
masterfrom
fix/transcode-waiting-state

Conversation

@negativeeddy

Copy link
Copy Markdown
Owner

Problem

When multiple discs are queued for transcoding with MaxConcurrentTranscodes=1, all jobs were marked TranscodeActive before acquiring the transcode slot. This caused the UI to show 6+ jobs as actively transcoding simultaneously, when in reality only 1 was actually encoding on the GTX.

The TranscodeSlotLimiter was working correctly — only 1 HandBrake/FFmpeg process ran at a time — but the status was misleading because TranscodeActive was set prematurely.

Fix

Backend (status timing)

  • ArmRipperService.StartTranscodeAsync: Sets TranscodeWaiting + "Waiting for transcode slot..." before calling the HandBrake/FFmpeg service
  • HandBrakeService.RunHandBrakeCommandAsync: Updates to TranscodeActive + "Transcoding..." only after acquiring the slot
  • FfmpegService.RunTranscodeAsync: Same pattern for the ffmpeg path

UI (striped blue indicator)

  • New CSS class .bg-primary-striped: Blue with diagonal hash marks (via repeating-linear-gradient) — visually distinct from solid blue bg-primary
  • Pipeline view: Transcode stage shows striped blue when TranscodeWaiting; progress bar shows indeterminate striped animation
  • Active job rows & dashboard: Status column shows "Waiting for GPU" striped badge
  • Job detail: Status badge, spinner, and SignalR handler all handle waiting_transcode

Visual

State Pipeline Stage Status Badge
Actually transcoding Solid blue bg-primary TranscodeActive
Waiting for slot Striped blue bg-primary-striped Waiting for GPU

Previously, all jobs were marked TranscodeActive before acquiring the
transcode slot, causing all queued jobs to appear as actively transcoding.
Only one job actually runs at a time (MaxConcurrentTranscodes=1) but the
UI showed 6+ jobs as active simultaneously.

Changes:
- Set TranscodeWaiting status before the HandBrake/FFmpeg service call
- Services update to TranscodeActive only after acquiring the slot
- Add striped blue CSS class (.bg-primary-striped) for the waiting state
- Pipeline view shows hash-marked blue on Transcode stage when waiting
- Active job views and job detail show 'Waiting for GPU' striped badge
- Progress bar shows indeterminate striped animation while waiting
- Spinner visible during TranscodeWaiting state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant